#★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
#
#Create a map name window in the menu
#
#★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
#==============================================================================
# ■ Window_Mapname
#------------------------------------------------------------------------------
# Window displays the map name.
#==============================================================================
class Window_Mapname < Window_Selectable
#--------------------------------------------------------------------------
# ● Object initialization
#--------------------------------------------------------------------------
def initialize
super(0,0, window_width, fitting_height(2))
refresh
end
#--------------------------------------------------------------------------
# ● Window width
#--------------------------------------------------------------------------
def window_width
return 160
end
#--------------------------------------------------------------------------
# ● Number of items
#--------------------------------------------------------------------------
def item_max
return 2
end
#--------------------------------------------------------------------------
# ● Refresh
#--------------------------------------------------------------------------
def refresh
contents.clear
change_color(system_color)
draw_text(0,0,item_width,item_height, "Location")
change_color(normal_color)
draw_text(0,24,item_width,item_height, $game_map.display_name)
end
#--------------------------------------------------------------------------
# ● Open window
#--------------------------------------------------------------------------
def open
refresh
super
end
end
#==============================================================================
# ■ Scene_Menu
#------------------------------------------------------------------------------
# Class that performs menu screen processing.
#==============================================================================
class Scene_Menu < Scene_MenuBase
#--------------------------------------------------------------------------
# ● Start map window
#--------------------------------------------------------------------------
alias m_start start
def start
m_start
create_map_window
end
#--------------------------------------------------------------------------
# ● Create map window
#--------------------------------------------------------------------------
def create_map_window
@map_window = Window_Mapname.new
@map_window.x = 0
@map_window.y = Graphics.height - @gold_window.height - @map_window.height
end
end