This set represents a set of variables in text, denoted by Implemented at e.g. UI.Variables/Speech.Variables. The event OnFind can be used to resolve a variable not found in either custom variables or the language (for localization) set. Nested variables (variables in a variables text) are evaluated at the point of replacement, not load.
Public Member Functions | |
FullVariableSet () | |
Creates a new complete variable set. More... | |
void | Divert (string groupName, GroupResolveEvent handler) |
Diverts the named group and processes it with the given handler. More... | |
void | GetValue (string variableName, Document document, LanguageTextEvent onResolved) |
Resolves a variable value, calling the given function when it's done. More... | |
void | SetValue (string code, string value) |
Sets a custom variable with the given name and value. This will take top priority. More... | |
Public Attributes | |
VariableSet | Custom |
The custom set of variables added and edited at runtime. More... | |
Dictionary< string, GroupResolveEvent > | Diverts |
All group diversions. More... | |
Properties | |
string | this[string code] [get, set] |
Gets or sets custom variables. More... | |
Events | |
GroupResolveEvent | OnFind |
The final fallback. Called when a variable hasn't been found anywhere else. More... | |
LanguageTextEvent | OnChange |
A callback called when a custom variable in this set is changed. More... | |
|
inline |
Creates a new complete variable set.
|
inline |
Diverts the named group and processes it with the given handler.
|
inline |
Resolves a variable value, calling the given function when it's done.
|
inline |
Sets a custom variable with the given name and value. This will take top priority.
code | The name of the variable to set. |
value | The value to set it to. |
VariableSet Dom.FullVariableSet.Custom |
The custom set of variables added and edited at runtime.
Dictionary<string,GroupResolveEvent> Dom.FullVariableSet.Diverts |
All group diversions.
|
getset |
Gets or sets custom variables.
code | The name of the variable to get/set. |
LanguageTextEvent Dom.FullVariableSet.OnChange |
A callback called when a custom variable in this set is changed.
GroupResolveEvent Dom.FullVariableSet.OnFind |
The final fallback. Called when a variable hasn't been found anywhere else.