-
Notifications
You must be signed in to change notification settings - Fork 0
class_globals
reduz edited this page Feb 23, 2014
·
10 revisions
Inherits: Object\n\n### Brief Description
Contains global variables accessible from everywhere.
- bool has" ( String name ) const
- void set_order" ( String name, int pos )
- int get_order" ( String name ) const
- void set_persisting" ( String name, bool enable )
- bool is_persisting" ( String name ) const
- void clear" ( String name )
- String localize_path" ( String path ) const
- String globalize_path" ( String path ) const
- int save" ( )
- bool has_singleton" ( String arg0 ) const
- Object get_singleton" ( String arg0 ) const
Contains global variables accessible from everywhere. Use the normal object API, such as "Globals.get(variable)", "Globals.set(variable,value)" or "Globals.has(variable)" to access them. Variables stored in engine.cfg are also loaded into globals, making this object very useful for reading custom game configuration options.
== has ==
- bool has" ( String name ) const \ Return true if a configuration value is present. == set_order ==
- void set_order" ( String name, int pos ) \ Set the order of a configuration value (influences when saved to the config file). == get_order ==
- int get_order" ( String name ) const \ Return the order of a configuration value (influences when saved to the config file). == set_persisting ==
- void set_persisting" ( String name, bool enable ) \ If set to true, this value can be saved to the configuration file. This is useful for editors. == is_persisting ==
- bool is_persisting" ( String name ) const \ If returns true, this value can be saved to the configuration file. This is useful for editors. == clear ==
- void clear" ( String name ) \ Clear the whole configuration (not recommended, may break things). == localize_path ==
- String localize_path" ( String path ) const \ Convert a path to a localized path (res:// path). == globalize_path ==
- String globalize_path" ( String path ) const \ Convert a localized path (res://) to a full native OS path.