class Scene_Menu < Scene_Base def create_command_window s1 = Vocab::item s2 = Vocab::save s3 = Vocab::game_end @command_window = Window_Command.new(160, [s1, s2, s3]) @command_window.index = 0 if $game_party.members.size == 0 # 如果無人在隊 @command_window.draw_item(0, false) # 禁用[用品] @command_window.draw_item(1, false) # 禁用[技能] @command_window.draw_item(2, false) # 禁用[整備] @command_window.draw_item(3, false) # 禁用[狀態] end if $game_system.save_disabled # 如果禁止存檔 @command_window.draw_item(4, false) # 禁用[存檔] end end def update_command_selection if Input.trigger?(Input::B) Sound.play_cancel $scene = Scene_Map.new elsif Input.trigger?(Input::C) if $game_party.members.size == 0 and @command_window.index < 4 Sound.play_buzzer return elsif $game_system.save_disabled and @command_window.index == 4 Sound.play_buzzer return end Sound.play_decision case @command_window.index when 0 # 用品 $scene = Scene_Item.new when 1 # 存檔 $scene = Scene_File.new(true, false, false) when 2 # 結束遊戲 $scene = Scene_End.new end end end end
class Scene_Menu < Scene_Base
def create_command_window
s1 = Vocab::item
s2 = Vocab::save
s3 = Vocab::game_end
@command_window = Window_Command.new(160, [s1, s2, s3])
@command_window.index = 0
if $game_party.members.size == 0 # 如果無人在隊
@command_window.draw_item(0, false) # 禁用[用品]
@command_window.draw_item(1, false) # 禁用[技能]
@command_window.draw_item(2, false) # 禁用[整備]
@command_window.draw_item(3, false) # 禁用[狀態]
end
if $game_system.save_disabled # 如果禁止存檔
@command_window.draw_item(4, false) # 禁用[存檔]
end
end
def update_command_selection
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Map.new
elsif Input.trigger?(Input::C)
if $game_party.members.size == 0 and @command_window.index < 4
Sound.play_buzzer
return
elsif $game_system.save_disabled and @command_window.index == 4
Sound.play_buzzer
return
end
Sound.play_decision
case @command_window.index
when 0 # 用品
$scene = Scene_Item.new
when 1 # 存檔
$scene = Scene_File.new(true, false, false)
when 2 # 結束遊戲
$scene = Scene_End.new
end
end
end
end
不太完美,不过将就用吧 |