Location Window On Menu RMVX Help

Hi all i seem to be having issues adding a Location window on my menu and i don't know where i'm going
wrong its all i need to have my menu complete any help would be amazing thanks in advance
This shows the map name on the map. I used two lines from it to understand how to get the map name. So I wrote this.
Ruby:
class Window_Location < Window_Base
  def refresh
    self.contents.clear
    self.contents.font.color = normal_color
    self.contents.draw_text(0, -5, 120, 20, find_map_name, 2)
  end
  def find_map_name
    name = "no where"
    id = $game_map.map_id.to_s
    data = load_data("Data/MapInfos.rvdata")
    map_name = data[$game_map.map_id].name
    if !map_name.include?(id)
      name = map_name
    end
    return name
  end
end

class Scene_Menu < Scene_Base

  def start
    super
    create_menu_background
    create_command_window
    @gold_window = Window_Gold.new(0, 360)
    @status_window = Window_MenuStatus.new(160, 0)
    @location_window = Window_Location.new(0,313,160,48)
    @location_window.refresh
  end
  def terminate
    super
    dispose_menu_background
    @command_window.dispose
    @gold_window.dispose
    @status_window.dispose
    @location_window.dispose
  end
end
It's good to note that VX does not have map names like VX Ace. You have to rename all your maps.
I added in a condition that if the map is not renamed, it will say "no where".
Change some of it if you need to.
This shows the map name on the map. I used two lines from it to understand how to get the map name. So I wrote this.
Ruby:
class Window_Location < Window_Base
  def refresh
    self.contents.clear
    self.contents.font.color = normal_color
    self.contents.draw_text(0, -5, 120, 20, find_map_name, 2)
  end
  def find_map_name
    name = "no where"
    id = $game_map.map_id.to_s
    data = load_data("Data/MapInfos.rvdata")
    map_name = data[$game_map.map_id].name
    if !map_name.include?(id)
      name = map_name
    end
    return name
  end
end

class Scene_Menu < Scene_Base

  def start
    super
    create_menu_background
    create_command_window
    @gold_window = Window_Gold.new(0, 360)
    @status_window = Window_MenuStatus.new(160, 0)
    @location_window = Window_Location.new(0,313,160,48)
    @location_window.refresh
  end
  def terminate
    super
    dispose_menu_background
    @command_window.dispose
    @gold_window.dispose
    @status_window.dispose
    @location_window.dispose
  end
end
It's good to note that VX does not have map names like VX Ace. You have to rename all your maps.
I added in a condition that if the map is not renamed, it will say "no where".
Change some of it if you need to.
Excellent thank you very much Roninator2 I can finally get my menu complete of course I will give credit to you thanks again
Just put the script on its perfect i just have 1 quick question if this cant be done its fine

is there anyway to centre the Map Name in the Window please? every thing else is great its only because i have stretched the Window across the Menu

thanks again @Roninator2 as always you get the job done😀
Where it says...

self.contents.draw_text(0, -5, 120, 20, find_map_name, 2)

Replace the final 2 with 1 and you'll be ready to go.
Where it says...

self.contents.draw_text(0, -5, 120, 20, find_map_name, 2)

Replace the final 2 with 1 and you'll be ready to go.
just tried and not worked dont know why @kyonides
not worked dont know why
It does work. You must have something else stopping this.
Are you able to do a screen shot of that area (windows snipping tool) and your script list.

For reference the numbers in question are:
0 - left
1 - center
2 - right

self.contents.draw_text(0, -5, 120, 20, find_map_name, 0)
self.contents.draw_text(0, -5, 120, 20, find_map_name, 1)
self.contents.draw_text(0, -5, 120, 20, find_map_name, 2)
sorted it now i put a space where they shouldnt be one lol thanks all for the help

Original thread: https://forums.rpgmakerweb.com/threads/location-window-on-menu-rmvx-help.141046/