Changes

Jump to navigation Jump to search
→‎Display: add Rendered/Rendering as separate events
Line 263: Line 263:  
  |arg type 1 = <tt>IClickableMenu</tt>
 
  |arg type 1 = <tt>IClickableMenu</tt>
 
  |arg desc 1 = The new 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
 
{{/event
translators
8,445

edits

Navigation menu