EVENT GETMENUTILE: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
EVENT_GETMENUTILE is used to set a custom tile for the main menu background.
{{EventTable|1=EVENT_GETMENUTILE|2=[[screenpeek]]|3=[[i|player->i]]|4=1 value}}
 
EVENT_GETMENUTILE is [[EDuke32 event list|Menu Event]].
 
This [[event]] is fired when drawing the main menu background, and can be used to set a custom tile for it.


EXAMPLE:
EXAMPLE:


  gamevar MENU_TILE <flag> GAMEVAR_FLAG_GLOBAL
  gamevar [[MENU_TILE]] <flag> 0
   
   
  onevent EVENT_GETMENUTILE
  onevent EVENT_GETMENUTILE
   setvar [[RETURN]] <tilenum>
   setvar [[RETURN]] <tilenum>
  endevent
  endevent
gamevar MENU_TILE is used to set whether the screen is one picture or if it is tiled, like a texture.
Values for <flag>:
* 0 - Main Menu background is non-tilable
* 1 - Main Menu background is tilable


In the onevent code, set the gamevar RETURN to the tile you want the main menu background to be.
In the onevent code, set the gamevar RETURN to the tile you want the main menu background to be.


[[Category:Events]]
[[Category:Events]]

Latest revision as of 07:19, 4 February 2022

Event ID player# THISACTOR RETURN
EVENT_GETMENUTILE screenpeek player->i 1 value

EVENT_GETMENUTILE is Menu Event.

This event is fired when drawing the main menu background, and can be used to set a custom tile for it.

EXAMPLE:

gamevar MENU_TILE <flag> 0

onevent EVENT_GETMENUTILE
 setvar RETURN <tilenum>
endevent

In the onevent code, set the gamevar RETURN to the tile you want the main menu background to be.