# ▽△▽ XRXSv17-AS2. パーティインデックス ▽△▽ # # publish 2010/ 3/27 # update - 11/ 1/10a # # [伸縮対応] # (FSM規格のホコグラにも対応しています) # #============================================================================== # 設定 #============================================================================== module XRXSV17 ASListingScenes = [Scene_Equip, Scene_Skill, Scene_Status] end #============================================================================== # デザイン変更 #============================================================================== class Window_SkillStatus < Window_Base WLH = 48 def refresh listing_mode = XRXSV17::ASListingScenes.include?($scene.class) # self.contents.clear @item_max = $game_party.members.size x_indent = 16 y1 = WLH - 24 for i in 0...@item_max actor = $game_party.members[i] if actor != nil opacity = (listing_mode ? (actor == @actor ? 255 : 128) : 255) draw_character(actor.character_name, actor.character_index, x_indent, WLH, opacity) x_indent += 32 if not listing_mode mw = (@item_max <= 4 ? 72 : (@item_max <= 6 ? 40 : 24)) draw_actor_hp(actor, x_indent-20, y1, mw) x_indent += mw + 8 end end end if listing_mode refresh_draw_meter(x_indent, @actor, 128) end self.opacity = 0 self.y = -12 end def refresh_draw_meter(x_start, actor, meter_width) y1 = WLH - 24 meter_width = 128 x_end = self.contents.width width_rest = x_end - x_start if width_rest >= 108 + (meter_width + 16) * 2 + 24 state_width = (width_rest - (108 + (meter_width + 16) * 2)) / 24 * 24 width_rest -= state_width draw_actor_state(@actor, x_start + width_rest, y1, state_width) end if width_rest >= 108 + (meter_width + 8) * 2 width_rest -= meter_width + 8 draw_actor_mp(@actor, x_start + width_rest, y1, meter_width) end if width_rest >= 108 + (meter_width + 8) width_rest -= meter_width + 8 draw_actor_hp(@actor, x_start + width_rest, y1, meter_width) end if width_rest >= 108 width_rest -= 108 draw_actor_name(@actor, x_start + width_rest, y1) end end #-------------------------------------------------------------------------- # ▼ 歩行グラフィックの描画 #-------------------------------------------------------------------------- def draw_character(character_name, character_index, x, y, opacity = 255) return if character_name == nil bitmap = Cache.character(character_name) sign = character_name[/^[\!\$]./] if sign != nil and sign.include?('$') cw = bitmap.width / 3 ch = bitmap.height / 4 else cw = bitmap.width / 12 ch = bitmap.height / 8 end n = character_index src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch) self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, opacity) end end