Anvil
Loading...
Searching...
No Matches
Anvil.API.Events.ModuleEvents.OnNuiEvent Class Referencesealed

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.
 

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.
 
NwObjectContext [get]
 
string ElementId = NWScript.NuiGetEventElement() [get]
 Gets the ID of the NuiElement that triggered the event.
 
NuiEventType EventType [get]
 Gets the type of Nui event that occurred.
 
NwPlayer Player = NWScript.NuiGetEventPlayer().ToNwPlayer()! [get]
 Gets the player that triggered this event.
 
NuiWindowToken Token [get]
 Gets the window token associated with this event.
 
- Properties inherited from Anvil.API.Events.IEvent

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

◆ Context

NwObject? Anvil.API.Events.ModuleEvents.OnNuiEvent.Context
get

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