查看: 2539|回复: 1

[已经解决] Window_Message的脚本略微改动后显示不了图片

[复制链接]
梦石
0
星屑
50
在线时间
19 小时
注册时间
2013-7-21
回帖
8
发表于 2013-7-25 20:43:13 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
本帖最后由 KISS_COMPUTER 于 2013-7-26 09:36 编辑

  #--------------------------------------------------------------------------
  # ● 翻页处理
  #--------------------------------------------------------------------------
  def new_page(text, pos)
    contents.clear
  ################
    face_name = $game_message.face_name
    face_index = $game_message.face_index
    source = Cache.face(face_name)
    rect = Rect.new(face_index % 4 * 96, face_index / 4 * 96, 96, 96)
    bitmap = Bitmap.new(96, 96)
    bitmap.blt(0, 0, source, rect)
    sprite = Sprite.new
    sprite.x = 0
    sprite.y = Graphics.height - 96
    sprite.z = 1000
    sprite.bitmap = bitmap
    source.dispose
    bitmap.dispose
  ################
    reset_font_settings
    pos[:x] = new_line_x
    pos[:y] = 0
    pos[:new_x] = new_line_x
    pos[:height] = calc_line_height(text)
    clear_flags
  end


#####行内为改动的部分,请指教是哪里出现了问题,O(∩_∩)O谢谢
梦石
0
星屑
50
在线时间
135 小时
注册时间
2013-6-10
回帖
28
发表于 2013-7-26 07:46:54 | 显示全部楼层
本帖最后由 xTsukihime 于 2013-7-26 08:30 编辑

  1. class Window_Message
  2.   #--------------------------------------------------------------------------
  3.   # ● 翻页处理
  4.   #--------------------------------------------------------------------------
  5.   def new_page(text, pos)
  6.     contents.clear
  7.   ################
  8.     face_name = $game_message.face_name
  9.     face_index = $game_message.face_index
  10.     source = Cache.face(face_name)
  11.     rect = Rect.new(face_index % 4 * 96, face_index / 4 * 96, 96, 96)
  12.     @sprite = Sprite.new
  13.     @sprite.x = 0
  14.     @sprite.y = Graphics.height - 96
  15.     @sprite.z = 1000
  16.     @sprite.bitmap = Bitmap.new(96, 96)
  17.     @sprite.bitmap.blt(0, 0, source, rect)
  18.     source.dispose
  19.   ################
  20.     reset_font_settings
  21.     pos[:x] = new_line_x
  22.     pos[:y] = 0
  23.     pos[:new_x] = new_line_x
  24.     pos[:height] = calc_line_height(text)
  25.     clear_flags
  26.   end
  27. end
复制代码

评分

参与人数 1星屑 +100 收起 理由
Sion + 100 感谢帮忙

查看全部评分

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部