Project1
标题:
Window_Message的脚本略微改动后显示不了图片
[打印本页]
作者:
KISS_COMPUTER
时间:
2013-7-25 20:43
标题:
Window_Message的脚本略微改动后显示不了图片
本帖最后由 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谢谢
作者:
xTsukihime
时间:
2013-7-26 07:46
本帖最后由 xTsukihime 于 2013-7-26 08:30 编辑
class Window_Message
#--------------------------------------------------------------------------
# ● 翻页处理
#--------------------------------------------------------------------------
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)
@sprite = Sprite.new
@sprite.x = 0
@sprite.y = Graphics.height - 96
@sprite.z = 1000
@sprite.bitmap = Bitmap.new(96, 96)
@sprite.bitmap.blt(0, 0, source, rect)
source.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
end
复制代码
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1