#============================================================================== # ■ VX-RGSS-8 コマンドスキル<コマンド表示> [Ver.1.0.0] by Claimh #------------------------------------------------------------------------------ #  スキル画面、バトル画面で、使用できるスキルの一覧を表示するウィンドウです。 #============================================================================== #============================================================================== # ■ Window_Skill #============================================================================== class Window_Skill < Window_Selectable #-------------------------------------------------------------------------- # ● オブジェクト初期化 # x : ウィンドウの X 座標 # y : ウィンドウの Y 座標 # width : ウィンドウの幅 # height : ウィンドウの高さ # actor : アクター #-------------------------------------------------------------------------- def initialize(x, y, width, height, actor) super(x, y, width, height) @actor = actor @column_max = 1 # 1行表示 self.index = 0 refresh end #-------------------------------------------------------------------------- # ● 項目の描画 # index : 項目番号 #-------------------------------------------------------------------------- def draw_item(index) rect = item_rect(index) self.contents.clear_rect(rect) skill = @data[index] if skill != nil rect.width -= 4 enabled = @actor.skill_can_use?(skill) draw_item_name(skill, rect.x, rect.y, enabled) self.contents.draw_text(rect.x + 240, rect.y, 48, 24, @actor.calc_mp_cost(skill), 2) # コマンド表示 cmd_list = CommandSkill.get_key_list(skill.id) if cmd_list.nil? self.contents.draw_text(rect.x + 288 + 32, rect.y, 204, 24, "Non Command") else command = "" for i in 0...cmd_list.size command += Input.key_converter(cmd_list[i]) + " " end self.contents.draw_text(rect.x + 288 + 32, rect.y, 204, 24, command) end end end end