#============================================================================== # ■ 二人パーティ画面_バトル画面 #------------------------------------------------------------------------------ #  バトル画面でパーティメンバーのステータスを表示するウィンドウです。 # # *月の下の宿 # URL:http://gekkasou.shiteyattari.com/ #============================================================================== module An #↓消さないでください Actor_BFace_x = [] #顔グラフィックの始点x座標(0〜48)、初期値24、数字が大きいほど右にずれる #12刻みにすることを推奨 #Actor_BFace_x[アクターの番号] = x座標 Actor_BFace_x[1] = 36 end #============================================================================== # ■ Window_BattleStatus #============================================================================== class Window_BattleStatus < Window_Selectable #-------------------------------------------------------------------------- # ● 顔グラフィックの描画 #-------------------------------------------------------------------------- def draw_face(face_name, face_index, x, y, size) bitmap = Cache.face(face_name) rect = Rect.new(0, 0, 0, 0) rect.x = face_index % 4 * 96 + [[size, 48].min, 0].max rect.y = face_index / 4 * 96 rect.width = 48 rect.height = 96 self.contents.blt(x, y, bitmap, rect) bitmap.dispose end #-------------------------------------------------------------------------- # ● アクターの顔グラフィック描画 #-------------------------------------------------------------------------- def draw_actor_face(actor, x, y) size = An::Actor_BFace_x[actor.id] size = 24 if size == nil draw_face(actor.face_name, actor.face_index, x, y, size) end #-------------------------------------------------------------------------- # ● 項目を描画する矩形の取得 #-------------------------------------------------------------------------- def item_rect(index) rect = Rect.new(0, 0, 0, 0) rect.width = (self.width - 32) / 2 - 4 rect.height = self.height - 24 rect.x = index * (rect.width + 8) rect.y = 0 return rect end #-------------------------------------------------------------------------- # ● 項目の描画 #-------------------------------------------------------------------------- def draw_item(index) rect = item_rect(index) rect.x += 4 rect.width -= 8 self.contents.clear_rect(rect) self.contents.font.color = normal_color actor = $game_party.members[index] draw_actor_face(actor, rect.x, rect.y+4) draw_actor_name(actor, rect.x + 56, rect.y + WLH * 0) draw_actor_state(actor, rect.x + 56, rect.y + WLH * 1) draw_actor_hp(actor, rect.x + 56, rect.y + WLH * 2, 120) draw_actor_mp(actor, rect.x + 56, rect.y + WLH * 3, 120) end end