# ▼▲▼ MeLT. プラグインB3 : ファインパートナー ▼▲▼ # # update 2007/ 7/22 # #============================================================================== # カスタマイズポイント #============================================================================== module XRXS_MeLT # # 各種ファイル名 (Windowskins) # NUM_SKIN_L = "NumberL" NUM_SKIN_S = "NumberS" HP = "HP" SP = "SP" HPBAR = "MenuHPBar" SPBAR = "MenuSPBar" STATUS_BACK= "MenuStatusBack3" # ステートID=>アイコン名 関連付けハッシュ STATE_ICON = {3=>"skill_024",5=>"skill_027",7=>"skill_026",8=>"skill_025"} end class Window_MenuStatus < Window_Selectable # 立ち絵描画位置 STAND_POS = [[320, 480], [128, 512]] # 名前部分 描画色 NAMECOLOR = Color.new(255,224,210,255) # 名前部分 縁取り色 HEMCOLOR = Color.new(115, 96, 82,255) # レベル部分 LEVEL_COLOR = Color.new(96,48, 0,255) end #============================================================================== # アクター立ち絵セッティング (ここで立ち絵を設定してください) #============================================================================== class Game_Actor < Game_Battler def stand_name # # アクターID => "ファイル名" (Pictures) 関連付けハッシュ # hash = { 5=>"Stand2", 6=>"Stand1" } return hash[self.id].to_s end end #============================================================================== # ■ Window_MenuStatus [再定義] #============================================================================== class Window_MenuStatus < Window_Selectable #-------------------------------------------------------------------------- # --- ウィンドウスライディングを搭載 --- #-------------------------------------------------------------------------- include XRXS_WindowSliding include XRXS_Cursor2 #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize super(192 + 32, -16, 464, 512) self.contents = Bitmap.new(width - 32, height - 32) self.opacity = 0 @slide_x_speed = -8 refresh self.active = false self.index = -1 @column_max = 1 end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def refresh self.contents.clear @item_max = [$game_party.actors.size, 2].min for i in 0...@item_max draw_menustatus(@item_max - 1 - i) end end #-------------------------------------------------------------------------- # ○ メニューステータスの描写 #-------------------------------------------------------------------------- def draw_menustatus(i) # アクターの取得 actor = $game_party.actors[i] return if actor == nil or i >= 2 # x = STAND_POS[i][0] y = STAND_POS[i][1] picture = RPG::Cache.picture(actor.stand_name) ox = picture.rect.width / 2 oy = picture.rect.height self.contents.blt(x - ox, y - oy, picture, picture.rect) # num_skin_l = RPG::Cache.windowskin(XRXS_MeLT::NUM_SKIN_L) num_skin_s = RPG::Cache.windowskin(XRXS_MeLT::NUM_SKIN_S) hp_bitmap = RPG::Cache.windowskin(XRXS_MeLT::HP) sp_bitmap = RPG::Cache.windowskin(XRXS_MeLT::SP) hpbar_skin = RPG::Cache.windowskin(XRXS_MeLT::HPBAR) spbar_skin = RPG::Cache.windowskin(XRXS_MeLT::SPBAR) back = RPG::Cache.windowskin(XRXS_MeLT::STATUS_BACK) # x = i == 0 ? 64 : 0 y = i == 0 ? 384 : 320 self.contents.blt(x, y, back, back.rect) # self.contents.font.color = NAMECOLOR self.contents.font.size = 16 self.contents.font.bold = true self.contents.draw_hemming_text(x + 4, y + 4, 80, 18, actor.name, 0, HEMCOLOR) # HP バーの描画 h = 10 rect = Rect.new(0,0,96,h) self.contents.blt(x + 4, y + 34, hpbar_skin, rect) rect.y = (actor.hp == actor.maxhp ? 2 * h : h) rect.width = 96 * actor.hp / actor.maxhp self.contents.blt(x + 4, y + 34, hpbar_skin, rect) # SP バーの描画 h = 8 rect = Rect.new(0,0,96,h) self.contents.blt(x + 102, y + 34, spbar_skin, rect) rect.y = (actor.sp == actor.maxsp ? 2 * h : h) rect.width = 96 * actor.sp / [actor.maxsp, 1].max self.contents.blt(x + 102, y + 34, spbar_skin, rect) # state_icon_names = [] for state_id in actor.states.sort icon_name = XRXS_MeLT::STATE_ICON[state_id] if icon_name != nil state_icon_names.push(icon_name) end end if state_icon_names.empty? self.contents.font.color = LEVEL_COLOR self.contents.font.size = 14 self.contents.font.bold = false self.contents.draw_text(x + 80, y + 2, 44, 20, "Lv." + actor.level.to_s, 2) else ix = x + 80 for icon_name in state_icon_names icon = RPG::Cache.icon(icon_name) self.contents.blt(ix, y + 2, icon, icon.rect) ix += 24 end end # self.contents.blt_number(x + 96, y + 44, num_skin_l, actor.hp) self.contents.blt_number(x + 196, y + 44, num_skin_s, actor.sp) self.contents.blt( x + 4, y + 34, hp_bitmap, hp_bitmap.rect) self.contents.blt( x + 104, y + 34, sp_bitmap, sp_bitmap.rect) end #-------------------------------------------------------------------------- # ● カーソルの矩形更新 #-------------------------------------------------------------------------- def update_cursor_rect if @index < 0 self.cursor_rect.empty else x = @index == 0 ? 64 : 0 y = @index == 0 ? 384 : 320 self.cursor_rect.set(x, y, 480, 48) end end #-------------------------------------------------------------------------- # ○ 解放とスライドアウト #-------------------------------------------------------------------------- def slideout! self.index = -1 super end end