Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
  2. #
  3. #Create a map name window in the menu
  4. #
  5. #★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
  6.  
  7.  
  8. #==============================================================================
  9. # ■ Window_Mapname
  10. #------------------------------------------------------------------------------
  11. #  Window displays the map name.
  12. #==============================================================================
  13.  
  14. class Window_Mapname < Window_Selectable
  15.   #--------------------------------------------------------------------------
  16.   # ● Object initialization
  17.   #--------------------------------------------------------------------------
  18.   def initialize
  19.     super(0,0, window_width, fitting_height(2))
  20.     refresh
  21.   end
  22.   #--------------------------------------------------------------------------
  23.   # ● Window width
  24.   #--------------------------------------------------------------------------
  25.   def window_width
  26.     return 160
  27.   end
  28.   #--------------------------------------------------------------------------
  29.   # ● Number of items
  30.   #--------------------------------------------------------------------------
  31.   def item_max
  32.     return 2
  33.   end
  34.   #--------------------------------------------------------------------------
  35.   # ● Refresh
  36.   #--------------------------------------------------------------------------
  37.   def refresh
  38.     contents.clear
  39.     change_color(system_color)
  40.     draw_text(0,0,item_width,item_height, "Location")
  41.     change_color(normal_color)
  42.     draw_text(0,24,item_width,item_height, $game_map.display_name)
  43.   end
  44.   #--------------------------------------------------------------------------
  45.   # ● Open window
  46.   #--------------------------------------------------------------------------
  47.   def open
  48.     refresh
  49.     super
  50.   end
  51. end
  52.  
  53. #==============================================================================
  54. # ■ Scene_Menu
  55. #------------------------------------------------------------------------------
  56. #  Class that performs menu screen processing.
  57. #==============================================================================
  58.  
  59. class Scene_Menu < Scene_MenuBase
  60.   #--------------------------------------------------------------------------
  61.   # ● Start map window
  62.   #--------------------------------------------------------------------------
  63.   alias m_start start
  64.   def start
  65.     m_start
  66.     create_map_window
  67.   end
  68.   #--------------------------------------------------------------------------
  69.   # ● Create map window
  70.   #--------------------------------------------------------------------------
  71.   def create_map_window
  72.     @map_window = Window_Mapname.new
  73.     @map_window.x = 0
  74.     @map_window.y = Graphics.height - @gold_window.height - @map_window.height
  75.   end
  76. end