class Scene_Menu
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Make command window
if LegACy::ICON
s1 = ' ' + $data_system.words.item
s2 = ' ' + $data_system.words.skill
s3 = ' ' + $data_system.words.equip
s4 = ' ' + 'Status'
s5 = ' ' + 'Save'
s6 = ' ' + 'Exit'
t1 = ' ' + 'Recov.'
t2 = ' ' + 'Weapon'
t3 = ' ' + 'Armor'
t4 = ' ' + 'Accessory'
t5 = ' ' + 'Key'
t6 = ' ' + 'Misc.'
else
s1 = ' ' + $data_system.words.item
s2 = ' ' + $data_system.words.skill
s3 = ' ' + $data_system.words.equip
s4 = ' ' + 'Status'
s5 = 'Save'
s6 = 'Exit'
t1 = ' ' + 'Recov.'
t2 = ' ' + 'Weapon'
t3 = ' ' + 'Armor'
t4 = ' ' + 'Accessory'
t5 = 'Key'
t6 = 'Misc.'
end
u1 = 'To Title'
u2 = 'Quit'
v1 = 'Optimize'
v2 = 'Unequip All'
@command_window = Window_NewCommand.new(320, [s1, s2, s3, s4, s5, s6])
@command_window = Window_NewCommand.new(320, [s1, s2, s3, s4, s5, s6], LegACy::ICON_NAME[0]) if LegACy::ICON
@command_window.y = -96
@command_window.index = @menu_index
# If number of party members is 0
if $game_party.actors.size == 0
# Disable items, skills, equipment, and status
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
end
# If save is forbidden
if $game_system.save_disabled
# Disable save
@command_window.disable_item(4)
end
# Make stat window
@stat_window = Window_Stat.new
@stat_window.x = 320
@stat_window.y = -96
# Make status window
@status_window = Window_NewMenuStatus.new
@status_window.x = 640
@status_window.y = 96
@location_window = Window_Location.new
@location_window.y = 480
@actor_window = Window_Actor.new
@actor_window.x = -160
@actor_window.y = 96
@itemcommand_window = Window_NewCommand.new(320, [t1, t2, t3, t4, t5, t6])
@itemcommand_window = Window_NewCommand.new(320, [t1, t2, t3, t4, t5, t6], LegACy::ICON_NAME[1]) if LegACy::ICON
@itemcommand_window.x = -320
@itemcommand_window.active = false
@help_window = Window_NewHelp.new
@help_window.x = -640
@help_window.y = 432
@item_window = Window_NewItem.new
@item_window.x = -480
@item_window.help_window = @help_window
@skill_window = Window_NewSkill.new(@actor)
@skill_window.x = -480
@skill_window.help_window = @help_window
if LegACy::ABS
@hotkey_window = Window_Hotkey.new
@hotkey_window.x = -480
end
@equipstat_window = Window_EquipStat.new(@actor)
@equipstat_window.x = -480
@equip_window = Window_Equipment.new(@actor)
@equip_window.x = -240
@equip_window.help_window = @help_window
@equipitem_window = Window_EquipmentItem.new(@actor, 0)
@equipitem_window.x = -240
@equipitem_window.help_window = @help_window
@equipenhanced_window = Window_Command.new(160, [v1, v2])
@equipenhanced_window.x = -160
@equipenhanced_window.active = false
@playerstatus_window = Window_NewStatus.new(@actor)
@playerstatus_window.x = -640
@file_window = Window_File.new
@file_window.x = -640
@filestatus_window = Window_FileStatus.new(@file_window)
@filestatus_window.x = -320
@end_window = Window_Command.new(120, [u1, u2])
@end_window.x = 640
@end_window.active = false
@spriteset = Spriteset_Map.new
@windows = [@command_window, @stat_window, @status_window,
@location_window, @actor_window, @itemcommand_window,@help_window,
@item_window, @skill_window, @equipstat_window, @equip_window,
@equipitem_window, @equipenhanced_window, @playerstatus_window,
@file_window, @filestatus_window, @end_window]
@windows.push(@hotkey_window) if LegACy::ABS
@windows.each {|i| i.opacity = LegACy::WIN_OPACITY}
@windows.each {|i| i.z = LegACy::WIN_Z}
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of windows
@spriteset.dispose
@windows.each {|i| i.dispose}
end
end