# Scene_Menu
#------------------------------------------------------------------
#=================================
class Scene_Menu
#-----------------------------------------------------------------
#menu_index
#help by Deke (x-rpg forum)
#-----------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
def main
@spriteset = Spriteset_Map.new
s1 = "Bag"
s2 = " "
s3 = "Save"
s4 = "Options"
s5 = "Exit"
s6 = "Pokemon"
s7 = "Pokedex"
if $game_switches[1] == true
$game_switches[2] = false
$game_switches[3] = false
commands = [s1,s2,s3,s4,s5]
y = 100
end
if $game_switches[2] == true
$game_switches[1] = false
$game_switches[3] = false
commands = [s6, s1, s2, s3, s4, s5]
y = 80
end
if $game_switches[3] == true
$game_switches[1] = false
$game_switches[2] = false
commands = [s7, s6,s1, s2, s3, s4, s5]
y = 60
end
if $game_system.save_disabled
commands.delete!("Save")
end
@command_window = Window_Command.new(160, commands)
@command_window.index = @menu_index
@command_window.x = 560 - @command_window.width / 2
@command_window.y = y
if $game_party.actors.size == 0
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
end
@my_window = My_Window.new
@playtime_window = Window_Time.new
@playtime_window.x = 0
@playtime_window.y = 0
@steps_window = Window_Steps.new
@steps_window.x = 800#160
@steps_window.y = 800#384
@gold_window = Window_Gold.new
@gold_window.x = 0
@gold_window.y = 600
@status_window = Window_MenuStatus.new
@status_window.x = 0
@status_window.y = 600
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@my_window.dispose
@command_window.dispose
@playtime_window.dispose
@steps_window.dispose
@gold_window.dispose
@status_window.dispose
@spriteset.dispose
end
#--------------------------------------------------------------------------
def update
@my_window.update
@command_window.update
@playtime_window.update
@steps_window.update
@gold_window.update
@status_window.update
@spriteset.update
if @command_window.active
update_command
return
end
if @status_window.active
update_status
return
end
end
#--------------------------------------------------------------------------
def update_command
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
if Input.trigger?(Input::C)
if $game_party.actors.size == 0 and @command_window.index < 4
$game_system.se_play($data_system.buzzer_se)
return
end
case @command_window.commands[@command_window.index]
when "Bag"
$game_system.se_play($data_system.decision_se)
when " "
$game_system.se_play($data_system.decision_se)
when "Save"
if $game_system.save_disabled
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
$scene = Scene_Save.new
when "Options"
$game_system.se_play($data_system.decision_se)
when "Exit"
$game_system.se_play($data_system.decision_se)
$scene = Scene_Map.new
when "Pokemon"
$game_system.se_play($data_system.decision_se)
when "Pokedex"
$game_system.se_play($data_system.decision_se)
end # of case
end # of conditional
end # of method
#--------------------------------------------------------------------------
#def update_status
#if Input.trigger?(Input::B)
#$game_system.se_play($data_system.cancel_se)
#@command_window.active = true
#@status_window.active = false
#@status_window.index = -1
#return
#end
#if Input.trigger?(Input::C)
#case @command_window.commands.[@command_window.index]
#when ######################HERE
#if $game_party.actors[@status_window.index].restriction >= 2
#$game_system.se_play($data_system.buzzer_se)
#return
#end
#$game_system.se_play($data_system.decision_se)
#$scene = Scene_Skill.new(@status_window.index)
#when ######################HERE
#$game_system.se_play($data_system.decision_se)
#$scene = Scene_Equip.new(@status_window.index)
#when ######################HERE
#$game_system.se_play($data_system.decision_se)
#$scene = Scene_Status.new(@status_window.index)
#end # of case
#return
#end # of conditional
#end # of method
end # of Scene_Menu class definition