Anvil
Anvil.API.NuiBindStrRef Class Reference
+ Inheritance diagram for Anvil.API.NuiBindStrRef:
+ Collaboration diagram for Anvil.API.NuiBindStrRef:

Public Member Functions

 NuiBindStrRef (string key)
 
StrRefGetBindValue (NwPlayer player, int uiToken)
 Queries the specified player for the value of this binding. More...
 
List< StrRef?>? GetBindValues (NwPlayer player, int uiToken)
 Queries the specified player for the array of values assigned to this binding. More...
 
void SetBindValue (NwPlayer player, int uiToken, StrRef? value)
 Assigns a value to the binding for the specified player. More...
 
void SetBindValues (NwPlayer player, int uiToken, IEnumerable< StrRef?> values)
 Assigns an array of values to the binding for the specified player. More...
 
void SetBindWatch (NwPlayer player, int uiToken, bool watch)
 Marks this property as watched/un-watched.
A watched bind will invoke the NUI script event every time its value changes. More...
 

Properties

string Key [get]
 

Additional Inherited Members

- Static Public Member Functions inherited from Anvil.API.NuiProperty< string >
static NuiBind< T > CreateBind (string key)
 Creates a Nui variable binding that can be changed at runtime. More...
 
static NuiValue< T > CreateValue (T value)
 Creates a readonly Nui variable that cannot be changed at runtime. More...
 
static implicit operator NuiProperty< T > (T value)
 

Member Function Documentation

◆ GetBindValue()

StrRef? Anvil.API.NuiBindStrRef.GetBindValue ( NwPlayer  player,
int  uiToken 
)
inline

Queries the specified player for the value of this binding.

Parameters
playerThe player to query.
uiTokenThe associated UI token.
Returns
The current value of the binding.

◆ GetBindValues()

List<StrRef?>? Anvil.API.NuiBindStrRef.GetBindValues ( NwPlayer  player,
int  uiToken 
)
inline

Queries the specified player for the array of values assigned to this binding.

Parameters
playerThe player to query.
uiTokenThe associated UI token.
Returns
The current values of the binding.

◆ SetBindValue()

void Anvil.API.NuiBindStrRef.SetBindValue ( NwPlayer  player,
int  uiToken,
StrRef value 
)
inline

Assigns a value to the binding for the specified player.

Parameters
playerThe player whose binding will be updated.
uiTokenThe unique UI token to be updated.
valueThe new value to assign.

◆ SetBindValues()

void Anvil.API.NuiBindStrRef.SetBindValues ( NwPlayer  player,
int  uiToken,
IEnumerable< StrRef?>  values 
)
inline

Assigns an array of values to the binding for the specified player.

Parameters
playerThe player whose binding will be updated.
uiTokenThe unique UI token to be updated.
valuesThe new value to assign.

◆ SetBindWatch()

void Anvil.API.NuiBindStrRef.SetBindWatch ( NwPlayer  player,
int  uiToken,
bool  watch 
)
inline

Marks this property as watched/un-watched.
A watched bind will invoke the NUI script event every time its value changes.

Parameters
playerThe player whose binding will be updated.
uiTokenThe unique UI token to be updated.
watchTrue if the value should be watched, false if it should not be watched.

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