The Config class provides access to Leap Motion system configuration information. More...
Public Types | |
| enum | ValueType |
| Enumerates the possible data types for configuration values. More... | |
Public Member Functions | |
| Config (int connectionKey) | |
| Creates a new Config object for setting runtime configuration settings. More... | |
| bool | Get< T > (string key, Action< T > onResult) |
| Requests a configuration value. More... | |
| bool | GetBool (string key) |
| Gets the boolean representation for the specified key. More... | |
| bool | GetFloat (string key) |
| Gets the floating point representation for the specified key. More... | |
| bool | GetInt32 (string key) |
| Gets the 32-bit integer representation for the specified key. More... | |
| bool | GetString (string key) |
| Gets the string representation for the specified key. More... | |
| bool | Save () |
| Saves the current state of the config. More... | |
| bool | Set< T > (string key, T value, Action< bool > onResult) |
| Sets a configuration value. More... | |
| bool | SetBool (string key, bool value) |
| Sets the boolean representation for the specified key. More... | |
| bool | SetFloat (string key, float value) |
| Sets the floating point representation for the specified key. More... | |
| bool | SetInt32 (string key, int value) |
| Sets the 32-bit integer representation for the specified key. More... | |
| bool | SetString (string key, string value) |
| Sets the string representation for the specified key. More... | |
| Config.ValueType | Type (string key) |
| The data type for a configuration parameter. More... | |
|
strong |
Enumerates the possible data types for configuration values.
The Config::type() function returns an item from the ValueType enumeration.
| Config | ( | int | connectionKey | ) |
Creates a new Config object for setting runtime configuration settings.
Note that the Controller.Config provides a properly initialized Config object already.
| connectionKey | The id of the connnection. This id must match the key used to create the Controller. |
| bool Get< T > | ( | string | key, |
| Action< T > | onResult | ||
| ) |
Requests a configuration value.
| key | The string identifier for the setting. |
| onResult | The action to take when the Leap service returns the config value. The Action delegate must take a parameter matching the config value type. The current value of the setting is passed to this delegate. |
| bool GetBool | ( | string | key | ) |
Gets the boolean representation for the specified key.
@ deprecated use Get<bool>(key, delegate)
| bool GetFloat | ( | string | key | ) |
Gets the floating point representation for the specified key.
@ deprecated use Get<float>(key, delegate)
| bool GetInt32 | ( | string | key | ) |
Gets the 32-bit integer representation for the specified key.
@ deprecated use Get<Int32>(key, delegate)
| bool GetString | ( | string | key | ) |
Gets the string representation for the specified key.
@ deprecated use Get<string>(key, delegate)
| bool Save | ( | ) |
Saves the current state of the config.
| bool Set< T > | ( | string | key, |
| T | value, | ||
| Action< bool > | onResult | ||
| ) |
Sets a configuration value.
| key | The string identifier for the setting. |
| onResult | The action to take when the Leap service sets the config value. The Action delegate must take a boolean parameter. The service calls this delegate with the value true if the setting was changed successfully and false, otherwise. |
| T | : | IConvertible |
| bool SetBool | ( | string | key, |
| bool | value | ||
| ) |
Sets the boolean representation for the specified key.
| bool SetFloat | ( | string | key, |
| float | value | ||
| ) |
Sets the floating point representation for the specified key.
| bool SetInt32 | ( | string | key, |
| int | value | ||
| ) |
Sets the 32-bit integer representation for the specified key.
| bool SetString | ( | string | key, |
| string | value | ||
| ) |
Sets the string representation for the specified key.
| Config.ValueType Type | ( | string | key | ) |
The data type for a configuration parameter.
@ deprecated Always returns Config.ValueType.TYPE_UNKNOWN
C# and Unity