赞 | 0 |
VIP | 30 |
好人卡 | 18 |
积分 | 1 |
经验 | 6108 |
最后登录 | 2014-5-20 |
在线时间 | 92 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 92 小时
- 注册时间
- 2013-2-23
- 帖子
- 130
|
没怎么细测,会直接获取对话框的头像资料不需要额外设定,想让头像覆盖对话框把Z值调到高于200就行了。
基本上只是把头像绘制出来没怎么考虑原本对话框......嘛反正那个调整应该不难_(:3」∠)_- #==============================================================================
- # ■ Window_Message
- #------------------------------------------------------------------------------
- # 显示文字信息的窗口。
- #==============================================================================
- class Window_Message < Window_Base
- #--------------------------------------------------------------------------
- # ● 初始化对象
- #--------------------------------------------------------------------------
- alias def_initialize_message initialize
- def initialize
- def_initialize_message
- create_face_sprite
- end
- #--------------------------------------------------------------------------
- # ● 更新画面
- #--------------------------------------------------------------------------
- alias def_update_message update
- def update
- def_update_message
- update_face_sprite
- end
- #--------------------------------------------------------------------------
- # ● 创建头像精灵
- #--------------------------------------------------------------------------
- def create_face_sprite
- @face_sprite = Sprite.new
- @face_sprite.y = Graphics.height - 288
- @face_sprite.z = 190
- @face_sprite.bitmap = Bitmap.new(272, 288)
- end
- #--------------------------------------------------------------------------
- # ● 更新头像位图
- #--------------------------------------------------------------------------
- def update_face_sprite
- if $game_message.face_name == ""
- @face_sprite.bitmap.clear
- else
- face_name = Cache.face($game_message.face_name)
- face_index = $game_message.face_index
- face_rect = Rect.new(face_index % 4 * 272, face_index / 4 * 288, 272, 288)
- @face_sprite.bitmap.blt(0, 0, face_name, face_rect, 255)
- end
- end
- end
复制代码 |
评分
-
查看全部评分
|