Adding a new window in main menu.

  I'm trying to learn how to add windows to menu screens. Right now my goal is just to make a new window in the middle of the main menu screen, what is in it, and what size it is doesn't really matter, about the size of the gold window would be fine. I've tried just copying over what i saw in another window and doing it that way but i didn't have any luck. If anyone could point me towards some information to get started on it i'd appreciate it. This is just a practice exercise to learn how to make new windows, the window doesn't have any purpose.
This is a good read: http://forums.rpgmakerweb.com/index.php?/topic/44234-menu-script-tutorial/

Otherwise, putting a new window would just be setting a handler (those variables that start with @) to = Window_WindowName.new

Edit: Those aren't called handlers, whoops. I think the proper name for them are "instance variables"
mjshi i don't understand what in that link you posted shows me how to make a new window, it looks like a lot of stuff to modify existing windows, i just want to know how to put a new empty window on the main menu, i was hoping for something more simple, there seems to be ALOT of custom stuff in there that doesn't pertain to what i'm trying to do
I've moved this thread to learning Ruby. Please be sure to post your threads in the correct forum next time. Thank you.
The second part of what I said--  this is how you add a window to a scene:

In the initialization part of your scene, put

@insertHandler = Window_WindowName.new

then you can further customize it with

@insertHandler.x = blah

@insertHandler.y = blah

@insertHandler.viewport = @viewport

etc. 
O.k. great, i was messing around with that stuff earlear but i couldn't figure it out, i'll try again and post what i have so maybe you or someone else can tell me what i'm doing wrong.
Alright i'm sure i'm not even close to doing this right but maybe one of you can tell explain this better to me. So i created a window at the bottom of the "windows" list in the script editor and named it Window_New just below DebugRight. I'll show the script that is inside of it, i tried to copy what was inside the Gold window but remove anything that had to do with the contents of the gold window. It seemed like the window with the least stuff in it and would an easy one to look at to reproduce.

#==============================================================================# ** Window_New#------------------------------------------------------------------------------# This window is a new window.#==============================================================================class Window_New < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(0, 0, window_width, fitting_height(4)) refresh end #-------------------------------------------------------------------------- # * Get Window Width #-------------------------------------------------------------------------- def window_width return 160 end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh contents.clear end #-------------------------------------------------------------------------- # * Open Window #-------------------------------------------------------------------------- def open refresh super endendI then went to the Menu Scene, this is the scene i want the window to appear on. I tried to again reproduce what it looked like was there for the gold window but to make it apply to the Window_New, i changed to X, Y to get it closer to the middle of the screen. I put in the define create_new_window area, below it i didnt touch, i only copied down far enough so you could see the create gold_window that i was looking at.

Code:
#==============================================================================# ** Scene_Menu#------------------------------------------------------------------------------#  This class performs the menu screen processing.#==============================================================================class Scene_Menu < Scene_MenuBase  #--------------------------------------------------------------------------  # * Start Processing  #--------------------------------------------------------------------------  def start    super    create_new_window    create_command_window    create_gold_window    create_status_window  end  #--------------------------------------------------------------------------  # * Create New Window  #--------------------------------------------------------------------------  def create_new_window    @new_window = Window_New.new    @new_window.x = 320    @new_window.y = 240  end  #--------------------------------------------------------------------------  # * Create Command Window  #--------------------------------------------------------------------------  def create_command_window    @command_window = Window_MenuCommand.new    @command_window.set_handler(:item,      method(:command_item))    @command_window.set_handler(:skill,     method(:command_personal))    @command_window.set_handler(:equip,     method(:command_personal))    @command_window.set_handler(:status,    method(:command_personal))    @command_window.set_handler(:formation, method(:command_formation))    @command_window.set_handler(:save,      method(:command_save))    @command_window.set_handler(:game_end,  method(:command_game_end))    @command_window.set_handler(:cancel,    method(:return_scene))  end  #--------------------------------------------------------------------------  # * Create Gold Window  #--------------------------------------------------------------------------  def create_gold_window    @gold_window = Window_Gold.new    @gold_window.x = 0    @gold_window.y = Graphics.height - @gold_window.height  end
Are there any problems when you run it? It looks fine at the moment.
No errors but no new windows appear on the main menu.
Oh it worked! I changed the height of the MenuStatus window down to 100 just to make sure it wasnt hiding behind it, and low and behold there it was. Thank you so much for your help Mjshi i've been working on that off and on for the last eight hours. 
Messed up part is, that's exactly what i did this morning like eight or more hours ago and assumed it was wrong because i couldn't see the window because it was obscured. DOH!
I'm making windows like this:

Spoiler
Code:
#=========[ Custom Window ]=====================================================#-----------< Change position, opacity and font >-------------------------------CUSTOM_WINDOW_POSITION_X = 40CUSTOM_WINDOW_POSITION_Y = 215CUSTOM_WINDOW_WIDTH = 400CUSTOM_WINDOW_HEIGHT = 200CUSTOM_WINDOW_OPACITY = 50  #---------< Initialize >--------------------------------------------------------class Window_CustomWindow < Window_Base  def initialize(x, y)    super(x, y, CUSTOM_WINDOW_WIDTH, CUSTOM_WINDOW_HEIGHT)    self.opacity = CUSTOM_WINDOW_OPACITY    refresh    end   #-------< Draw Content >------------------------------------------------------  def refresh    self.contents.clear   #The you can put stuff (Text, Icons etc.)    self.contents.font.color = Color.new(25,125,255) # Change text below to blueish    self.contents.draw_text(50, 0, 300, 24, "Hello in blue color", 0) # draw text    self.contents.font.color = normal_color # change color back to normal    self.contents.draw_text(0, 50, 50, 24, "#{$game_party.gold}", 2) #draw current gold value    draw_icon(5, 200, 50) # draw some icon    end # Refreshend # class  #---------< Create window >---------------------------------------------------#~ e.g.  class Scene_Menu < Scene_MenuBase # This would draw that window in menu    class Scene_Item < Scene_ItemBase # This will draw window in Item Scene    # You can change that to scene, where you want to put that window in.    # Take a look on default Scene scripts to see the classes etc.     #---------< Start >---------------------------------------------------------    alias customwindow_start start    def start    customwindow_start    create_customwindow_window    end     #---------< Create >--------------------------------------------------------    def create_customwindow_window    @customwindow_window = Window_CustomWindow.new(    CUSTOM_WINDOW_POSITION_X, CUSTOM_WINDOW_POSITION_Y)    end  end#=========[ END ]===============================================================
So it has its own script slot and you can remove that easily anytime...
I hope it's not done badly, because I know my scripting skills can be rally funny.
@everybody go ahead, tell me how bad it is.
Your indentation towards the end is kinda strange, but otherwise it looks fine. I'm curious as to why you choose to use variables instead of editing position directly, though (I've always been taught that the fewer the variables, the better), is there a specific reason for that?
Yup, I also think if there's less stuff, then it's better, though I don't think it does matter that much -  in my case, it can, because I should put these in a module... Right? I'm still learning. The reason of this is, that I changed some stuff to make it more for public use, the comments and such are just for anybody else rather than me.. Personally, I'm getting rid of these and putting them directly to save space and such.

Original thread: https://forums.rpgmakerweb.com/threads/adding-a-new-window-in-main-menu.44757/