| 赞 | 0 |
| VIP | |
| 好人卡 | |
| 积分 | 2 |
| 经验 | |
| 最后登录 | 2023-7-22 |
| 在线时间 | 173 小时 |
天空之神
- 梦石
- 0
- 星屑
- 156
- 在线时间
- 173 小时
- 注册时间
- 2009-5-3
- 回帖
- 552
|
发表于 2015-4-8 22:34:51
|
显示全部楼层
RGSS的绘图确实比较恶心,纯靠坐标来定位的……
我对于Window_Status的修改建议如下:- #==============================================================================
- # ■ Window_MenuStatus
- #------------------------------------------------------------------------------
- # 显示菜单画面和同伴状态的窗口。
- #==============================================================================
- class Window_MenuStatus < Window_Selectable
- #--------------------------------------------------------------------------
- # ● 初始化对像
- # x : 窗口 X 座标
- # y : 窗口 Y 座标
- #--------------------------------------------------------------------------
- def initialize(x, y)
- super(x, y, 400, 4*WLH+32)
- refresh
- self.active = false
- self.index = -1
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- @item_max = $game_party.members.size
- for actor in $game_party.members
- draw_actor_face(actor, 2+actor.index*192, 2, 92)
- x = 104 + actor.index* 196
- y = WLH / 2
- draw_actor_name(actor, x, y)
- draw_actor_class(actor, x, y + WLH * 2)
- draw_actor_level(actor, x, y + WLH * 1)
- end
- end
- #--------------------------------------------------------------------------
- # ● 更新光标
- #--------------------------------------------------------------------------
- def update_cursor
- if @index < 0 # 无光标
- self.cursor_rect.empty
- elsif @index < @item_max # 一般
- @width = contents.width * 0.5
- self.cursor_rect.set(@index * @width, 0 , @width, 96)
- elsif @index >= 100 # 使用本身
- self.cursor_rect.set(0, (@index - 100) * 96, contents.width, 96)
- else # 全体
- self.cursor_rect.set(0, 0, contents.width, @item_max * 96)
- end
- end
- end
复制代码 不建议lz擅自更改类名,有可能会出现其他的问题,最好还是使用标准的 Window_Status 作为类名。
我的代码版本和lz不一样,所以没法测试了…… |
评分
-
查看全部评分
|