#============================================================================== # ■ VXAce-RGSS3-9-menu パーティー編集画面 -default- [Ver.1.0.0] by Claimh #------------------------------------------------------------------------------ # デフォルトの入れ替え画面に[入れ替えロック]機能を適応します #============================================================================== #============================================================================== # ■ Window_MenuStatus #============================================================================== class Window_MenuStatus < Window_Selectable attr_accessor :exchenge_mode # 並び替えモード #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- alias initialize_partyedit initialize def initialize(x, y) @exchenge_mode = false initialize_partyedit(x, y) end #-------------------------------------------------------------------------- # ● 選択項目の有効状態を取得 #-------------------------------------------------------------------------- def current_item_enabled? return false if @exchenge_mode and disable_exchenge?(@index) super end #-------------------------------------------------------------------------- # ● 入れ替え可否状態を取得 #-------------------------------------------------------------------------- def disable_exchenge?(index) return false if index < 0 $game_party.members[index].lock_change end #-------------------------------------------------------------------------- # ● 項目の描画 #-------------------------------------------------------------------------- alias draw_item_patryedit draw_item def draw_item(index) draw_item_patryedit(index) return unless disable_exchenge?(index) rect = item_rect_for_text(index) draw_icon(PartyEdit::LOCK_ICON_IDX, rect.x, rect.y) end end #============================================================================== # ■ Scene_Menu #============================================================================== class Scene_Menu < Scene_MenuBase #-------------------------------------------------------------------------- # ● コマンド[並び替え] #-------------------------------------------------------------------------- alias command_formation_partyedit command_formation def command_formation command_formation_partyedit @status_window.exchenge_mode = true end #-------------------------------------------------------------------------- # ● 並び替え[キャンセル] #-------------------------------------------------------------------------- alias on_formation_cancel_partyedit on_formation_cancel def on_formation_cancel on_formation_cancel_partyedit @status_window.exchenge_mode = false end end