This contains the source code documentation of the class subsystem_Styles.
subsystem_Styles
Inherits: DialogicSubsystem
Subsystem that manages loading layouts with specific styles applied.
Methods
| Returns | Method |
|---|---|
| void | clear_game_state ( _clear_flag: int = 0 ) |
| void | load_game_state ( load_flag: int = 0 ) |
| Node | change_style ( style_name: String = "", is_base_style: bool = true ) |
| Node | load_style ( style_name: String = "", parent: Node = null, is_base_style: bool = true, state_reload: bool = false ) |
| DialogicLayoutBase | create_layout ( style: DialogicStyle, parent: Node = null ) |
| void | reload_current_info_into_new_style ( ) |
| String | get_current_style ( ) |
| bool | has_active_layout_node ( ) |
| DialogicLayoutBase | get_layout_node ( ) |
| Node | get_first_node_in_layout ( group_name: String ) |
| void | preload_style ( name_or_path: String = "" ) |
Signals
signal style_changed ( info: Dictionary )
No description available.
Method Descriptions
func clear_game_state ( _clear_flag: int = 0 ) ⇒ void
No description available.
func load_game_state ( load_flag: int = 0 ) ⇒ void
No description available.
func change_style ( style_name: String = "", is_base_style: bool = true ) ⇒ Node
This helper method calls load_style, but with the state_reload as true, which is commonly wanted if you expect a game to already be in progress.
func load_style ( style_name: String = "", parent: Node = null, is_base_style: bool = true, state_reload: bool = false ) ⇒ Node
Loads a style. Consider using the simpler change_style if you want to change the style while another style is already in use.
If state_reload is true, the current state will be loaded into a new layout scenes nodes. That should not be done before calling start() or load() as it would be unnecessary or cause double-loading.
func create_layout ( style: DialogicStyle, parent: Node = null ) ⇒ DialogicLayoutBase
Method that adds a layout scene with all the necessary layers. The layout scene will be added to the tree root and returned.
func reload_current_info_into_new_style ( ) ⇒ void
When changing to a different layout scene, we have to load all the info from the current_state_info (basically
func get_current_style ( ) ⇒ String
Returns the style currently in use
func has_active_layout_node ( ) ⇒ bool
No description available.
func get_layout_node ( ) ⇒ DialogicLayoutBase
No description available.
func get_first_node_in_layout ( group_name: String ) ⇒ Node
Similar to get_tree().get_first_node_in_group('group_name') but filtered to the active layout node subtree
func preload_style ( name_or_path: String = "" ) ⇒ void
No description available.