赞 | 1 |
VIP | 255 |
好人卡 | 52 |
积分 | 1 |
经验 | 77416 |
最后登录 | 2016-1-18 |
在线时间 | 1269 小时 |
Lv1.梦旅人 薄凉看客
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 1269 小时
- 注册时间
- 2010-6-20
- 帖子
- 1316
|
- #==============================================================================
- # ■ Window_MenuStatus
- #------------------------------------------------------------------------------
- # 显示菜单画面和同伴状态的窗口。
- #==============================================================================
- class Window_MenuStatus < Window_Selectable
- #--------------------------------------------------------------------------
- # ● 初始化目标
- #--------------------------------------------------------------------------
- def initialize
- super(0, 0, 640, 480 - 68)
- self.contents = Bitmap.new(width - 32, 480)
- refresh
- self.active = false
- self.index = -1
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- @item_max = $game_party.actors.size
- for i in 0...$game_party.actors.size
- x = 64
- y = i * 140
- y = (i-3) * 140 if self.index == 3
- actor = $game_party.actors[i]
- draw_actor_graphic(actor, x - 40, y + 80)
- draw_actor_name(actor, x, y)
- draw_actor_class(actor, x + 144, y)
- draw_actor_level(actor, x, y + 32)
- draw_actor_state(actor, x + 90, y + 32)
- draw_actor_exp(actor, x, y + 64)
- draw_actor_hp(actor, x + 236, y + 32)
- draw_actor_sp(actor, x + 236, y + 64)
- end
- end
- #--------------------------------------------------------------------------
- # ● 刷新光标矩形
- #--------------------------------------------------------------------------
- def update_cursor_rect
- if self.index != @old_index
- refresh
- @old_index = self.index
- end
- if self.index < 0
- self.cursor_rect.empty
- else
- if self.index < 3
- self.cursor_rect.set(
- 0, self.index * 140, self.width / @column_max - 32, 96)
- else
- self.cursor_rect.set(
- 0, (self.index-3) * 140, self.width / @column_max - 32, 96)
- end
- end
- end
- end
复制代码 |
|