Changes

Jump to navigation Jump to search
Line 255: Line 255:  
  |name = MenuChanged
 
  |name = MenuChanged
 
  |desc = Raised after a game menu is opened, closed, or replaced.
 
  |desc = Raised after a game menu is opened, closed, or replaced.
 +
 +
|arg name 2 = <tt>e.OldMenu</tt>
 +
|arg type 2 = <tt>IClickableMenu</tt>
 +
|arg desc 2 = The old menu instance (or <tt>null</tt> if none).
    
  |arg name 1 = <tt>e.NewMenu</tt>
 
  |arg name 1 = <tt>e.NewMenu</tt>
 
  |arg type 1 = <tt>IClickableMenu</tt>
 
  |arg type 1 = <tt>IClickableMenu</tt>
  |arg desc 1 = The previous menu instance (or <tt>null</tt> if none).
+
  |arg desc 1 = The new menu instance (or <tt>null</tt> if none).
 +
}}
 +
{{/event
 +
|name = Rendering
 +
|desc = Raised before the game draws anything to the screen in a draw tick, as soon as the sprite batch is opened. The sprite batch may be closed and reopened multiple times after this event is called, but it's only raised once per draw tick. This event isn't useful for drawing to the screen, since the game will draw over it.
 +
 
 +
|arg name 1 = <tt>e.SpriteBatch</tt>
 +
|arg type 1 = <tt>SpriteBatch</tt>
 +
|arg desc 1 = The sprite batch being drawn. Add anything you want to appear on-screen to this sprite batch.
 +
}}
 +
{{/event
 +
|name = Rendered
 +
|desc = Raised after the game draws to the sprite patch in a draw tick, just before the final sprite batch is rendered to the screen. Since the game may open/close the sprite batch multiple times in a draw tick, the sprite batch may not contain everything being drawn and some things may already be rendered to the screen. Content drawn to the sprite batch at this point will be drawn over all vanilla content (including menus, HUD, and cursor).
 +
 
 +
|arg name 1 = <tt>e.SpriteBatch</tt>
 +
|arg type 1 = <tt>SpriteBatch</tt>
 +
|arg desc 1 = The sprite batch being drawn. Add anything you want to appear on-screen to this sprite batch.
 +
}}
 +
{{/event
 +
|name = RenderingActiveMenu
 +
|desc = When a menu is open (<tt>Game1.activeClickableMenu != null</tt>), raised before that menu is drawn to the screen. This includes the game's internal menus like the title screen. Content drawn to the sprite batch at this point will appear under the menu.
 +
 
 +
|arg name 1 = <tt>e.SpriteBatch</tt>
 +
|arg type 1 = <tt>SpriteBatch</tt>
 +
|arg desc 1 = The sprite batch being drawn. Add anything you want to appear on-screen to this sprite batch.
 +
}}
 +
{{/event
 +
|name = RenderedActiveMenu
 +
|desc = When a menu is open (<tt>Game1.activeClickableMenu != null</tt>), raised after that menu is drawn to the sprite batch but before it's rendered to the screen. Content drawn to the sprite batch at this point will appear over the menu and menu cursor.
 +
 
 +
|arg name 1 = <tt>e.SpriteBatch</tt>
 +
|arg type 1 = <tt>SpriteBatch</tt>
 +
|arg desc 1 = The sprite batch being drawn. Add anything you want to appear on-screen to this sprite batch.
 +
}}
 +
{{/event
 +
|name = RenderingHud
 +
|desc = Raised before drawing the HUD (item toolbar, clock, etc) to the screen. The vanilla HUD may be hidden at this point (e.g. because a menu is open). Content drawn to the sprite batch at this point will appear under the HUD.
   −
  |arg name 2 = <tt>e.PriorMenu</tt>
+
|arg name 1 = <tt>e.SpriteBatch</tt>
  |arg type 2 = <tt>IClickableMenu</tt>
+
|arg type 1 = <tt>SpriteBatch</tt>
  |arg desc 2 = The new menu instance (or <tt>null</tt> if none).
+
|arg desc 1 = The sprite batch being drawn. Add anything you want to appear on-screen to this sprite batch.
 +
}}
 +
{{/event
 +
|name = RenderedHud
 +
|desc = Raised after drawing the HUD (item toolbar, clock, etc) to the sprite batch, but before it's rendered to the screen. The vanilla HUD may be hidden at this point (e.g. because a menu is open). Content drawn to the sprite batch at this point will appear over the HUD.
 +
 
 +
|arg name 1 = <tt>e.SpriteBatch</tt>
 +
|arg type 1 = <tt>SpriteBatch</tt>
 +
|arg desc 1 = The sprite batch being drawn. Add anything you want to appear on-screen to this sprite batch.
 +
}}
 +
{{/event
 +
|name = WindowResized
 +
|desc = Raised after the game window is resized.
 +
 
 +
|arg name 1 = <tt>e.OldSize</tt>
 +
|arg type 1 = <tt>Point</tt>
 +
|arg desc 1 = The previous window width (<tt>e.OldSize.X</tt>) and height (<tt>e.OldSize.Y</tt>).
 +
 
 +
  |arg name 2 = <tt>e.NewSize</tt>
 +
  |arg type 2 = <tt>Point</tt>
 +
  |arg desc 2 = The new window width (<tt>e.NewSize.X</tt>) and height (<tt>e.NewSize.Y</tt>).
 
}}
 
}}
 
|}
 
|}
      
===Game loop===
 
===Game loop===
translators
8,441

edits

Navigation menu