Anvil
Anvil.API.Events.ModuleEvents.OnNuiEvent Class Reference

Called when a player triggers an event in the NUI system. More...

+ Inheritance diagram for Anvil.API.Events.ModuleEvents.OnNuiEvent:
+ Collaboration diagram for Anvil.API.Events.ModuleEvents.OnNuiEvent:

Public Member Functions

T? GetEventPayload< T > ()
 Gets the payload data associated with this event. More...
 

Properties

int ArrayIndex = NWScript.NuiGetEventArrayIndex() [get]
 Get the array index of the current event.
This can be used to get the index into an array, for example when rendering lists of buttons.
Returns -1 if the event is not originating from within an array. More...
 
NwObjectContext [get]
 
string ElementId = NWScript.NuiGetEventElement() [get]
 Gets the ID of the NuiElement that triggered the event. More...
 
NuiEventType EventType [get]
 Gets the type of Nui event that occurred. More...
 
NwPlayer Player = NWScript.NuiGetEventPlayer().ToNwPlayer()! [get]
 Gets the player that triggered this event. More...
 
NuiWindowToken Token [get]
 Gets the window token associated with this event. More...
 
- Properties inherited from Anvil.API.Events.IEvent
NwObjectContext [get]
 

Detailed Description

Called when a player triggers an event in the NUI system.

Member Function Documentation

◆ GetEventPayload< T >()

T? Anvil.API.Events.ModuleEvents.OnNuiEvent.GetEventPayload< T > ( )
inline

Gets the payload data associated with this event.

Template Parameters
T
Returns
The payload data, or null if the event has no payload.

Property Documentation

◆ ArrayIndex

int Anvil.API.Events.ModuleEvents.OnNuiEvent.ArrayIndex = NWScript.NuiGetEventArrayIndex()
get

Get the array index of the current event.
This can be used to get the index into an array, for example when rendering lists of buttons.
Returns -1 if the event is not originating from within an array.

◆ ElementId

string Anvil.API.Events.ModuleEvents.OnNuiEvent.ElementId = NWScript.NuiGetEventElement()
get

Gets the ID of the NuiElement that triggered the event.

◆ EventType

NuiEventType Anvil.API.Events.ModuleEvents.OnNuiEvent.EventType
get

Gets the type of Nui event that occurred.

◆ Player

NwPlayer Anvil.API.Events.ModuleEvents.OnNuiEvent.Player = NWScript.NuiGetEventPlayer().ToNwPlayer()!
get

Gets the player that triggered this event.

◆ Token

NuiWindowToken Anvil.API.Events.ModuleEvents.OnNuiEvent.Token
get

Gets the window token associated with this event.


The documentation for this class was generated from the following file: