#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# This class performs menu screen processing.
#==============================================================================
class Scene_Menu
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Make command window
s1 = $data_system.words.item
s2 = $data_system.words.skill
s3 = $data_system.words.equip
s4 = "Status"
s5 = "Save"
s6 = "End Game"
# Add 3 empty menu items to stretch window - BREW
s7 = ""
s8 = ""
s9 = ""
# Add the 3 new items to the menu - BREW
@command_window = Window_Command.new(160, \
[s1, s2, s3, s4, s5, s6, s7, s8, s9])
@command_window.index = @menu_index
# Disable the empty menu items - BREW
@command_window.disable_item(6)
@command_window.disable_item(7)
@command_window.disable_item(8)
# 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 play time window
@playtime_window = Window_PlayTime.new
@playtime_window.x = 0
# Move the playtime window down 96 pixels
# (32 pixels per line of text, 32 pixels for margins)
@playtime_window.y = 224 + 96
# Make steps window
# Don't make the steps window - BREW
# @steps_window = Window_Steps.new
# @steps_window.x = 0
# @steps_window.y = 320
# Make gold window
@gold_window = Window_Gold.new
@gold_window.x = 0
@gold_window.y = 416
# Make status window
@status_window = Window_MenuStatus.new
@status_window.x = 160
@status_window.y = 0
# 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
@command_window.dispose
@playtime_window.dispose
# Don't need to dispose it - BREW
# @steps_window.dispose
@gold_window.dispose
@status_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Prevent cursor from selecting empty menu items - BREW
if @command_window.index == 6
@command_window.index = 0
end
if @command_window.index == 8
@command_window.index = 5
end
# Update windows
@command_window.update
@playtime_window.update
# Don't need to update it either - BREW
# @steps_window.update
@gold_window.update
@status_window.update
# If command window is active: call update_command
if @command_window.active
update_command
return
end
# If status window is active: call update_status
if @status_window.active
update_status
return
end
end
end