#============================================================================== # ■ Window_BattleStatus #------------------------------------------------------------------------------ #  バトル画面でパーティメンバーのステータスを表示するウィンドウです。 #============================================================================== class Window_BattleStatus < Window_Selectable #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize super(0, 0, 416, 128) refresh self.active = false end #-------------------------------------------------------------------------- # ● 解放 #-------------------------------------------------------------------------- def dispose super end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def refresh self.contents.clear @item_max = $game_party.members.size for i in 0...@item_max draw_item(i) end end #-------------------------------------------------------------------------- # ● 項目の描画 # index : 項目番号 #-------------------------------------------------------------------------- def draw_item(index) x = index * 96 rect = Rect.new(x, 0, 96, 96) self.contents.clear_rect(rect) self.contents.font.color = normal_color actor = $game_party.members[index] draw_actor_face(actor, x + 3, y + 3, size = 90) self.contents.font.color = hp_color(actor) self.contents.font.size = size self.contents.draw_text(x, WLH * 1 + 20 - size, 80, WLH, actor.name) self.contents.font.size = 20 draw_actor_hp_gauge(actor, x + 3, y + 55, width = 90) draw_actor_hp(actor, x + 3, y + 57, width = 90) draw_actor_mp_gauge(actor, x + 3, y + 69, width = 90) draw_actor_mp(actor, x + 3, y + 71, width = 90) draw_actor_state(actor, x, y, width = 94) end #-------------------------------------------------------------------------- # ● カーソル #-------------------------------------------------------------------------- def update_cursor if @index < 0 self.cursor_rect.empty else rect = Rect.new(index * 96, 0, 96, 96) self.cursor_rect = rect end end end