VR Development Framework
v 1.0.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
static bool AVR.Core.AVR_Settings.get_bool ( string  token)
inlinestatic

Get a registered setting of the type bool.

Parameters
tokenToken identifying the given setting. A setting declared as domain = { setting = true } will be retrievable with the token /domain/setting.
Returns
Registered setting if a valid is found, otherwise false.

Definition at line 130 of file AVR_Settings.cs.

130  {
131  if (settings.TryGetValue(token, out string ret)) {
132  return bool.Parse(ret);
133  }
134  else if (!initialized)
135  {
136  initialize();
137  return get_bool(token);
138  }
139  else
140  {
141  AVR_DevConsole.warn("Settings do not contain key \"" + token + "\". Using default value of false.");
142  return false;
143  }
144  }
static void initialize()
Initialize settings. Calling multiple times will have no effect, use reconfigure() if you want to re-...
Definition: AVR_Settings.cs:25
static Dictionary< string, string > settings
Dictionary containing all settings by their key. A setting declared as domain = { setting = true } wi...
Definition: AVR_Settings.cs:42
static bool initialized
Definition: AVR_Settings.cs:16
static bool get_bool(string token)
Get a registered setting of the type bool.