#-------------------------------------------------------------------------------
# Redscarf_Menu
#
# Removes Save from main menu & adds a Location window
#
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# Scene_Title load the MapInfos to $data_map_infos
#-------------------------------------------------------------------------------
class Scene_Title
alias redscarf_main main
def main
$data_map_infos = load_data("Data/MapInfos.rxdata")
redscarf_main
end
end
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# This class is for all in-game windows. Change E to EXP
#==============================================================================
class Window_Base < Window
def draw_actor_exp(actor, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 48, 32, "EXP")
self.contents.font.color = normal_color
self.contents.draw_text(x + 24, y, 84, 32, actor.exp_s, 2)
self.contents.draw_text(x + 108, y, 12, 32, "/", 1)
self.contents.draw_text(x + 120, y, 84, 32, actor.next_exp_s)
end
end
#==============================================================================
# ** Window_Location
#------------------------------------------------------------------------------
# This window displays current map name on the menu screen.
#==============================================================================
class Window_Location < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, 160, 64)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = system_color
mapname = $data_map_infos[$game_map.map_id].name
# short_name is mapname - the last 4 characters
text_width = mapname.size
text_width -= 4
short_name = mapname.slice(0,text_width)
# replace mapname with short_name to remove last 4 characters
self.contents.draw_text(0, 0, 128, 32, mapname)
end
end
#-------------------------------------------------------------------------------
# Scene_Menu Remove Save & add a Location window
#-------------------------------------------------------------------------------
class Scene_Menu
def main
# Make command window
s0 = $data_system.words.item
s1 = $data_system.words.skill
s2 = $data_system.words.equip
s3 = "Status"
s4 = "End Game"
@command_window = Window_Command.new(160, [s0, s1, s2, s3, s4])
@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
# Make play time window
@playtime_window = Window_PlayTime.new
@playtime_window.x = 0
@playtime_window.y = 192
# Make gold window
@gold_window = Window_Gold.new
@gold_window.x = 0
@gold_window.y = 288
# Make Location window
@location_window = Window_Location.new
@location_window.x = 0
@location_window.y = 352
# 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
@gold_window.dispose
@status_window.dispose
@location_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update windows
@command_window.update
@playtime_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