Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

DialogicStyle

This contains the source code documentation of the class DialogicStyle.

DialogicStyle

Inherits: Resource

A style represents a collection of layers and settings. A style can inherit from another style.

Properties


Methods

ReturnsMethod
intget_layer_count ( )
intget_layer_index ( id: String )
boolhas_layer ( id: String )
boolhas_layer_index ( index: int )
Stringget_layer_id_at_index ( index: int )
Dictionaryget_layer_info ( id: String )
Stringget_new_layer_id ( )
Stringadd_layer ( scene: String, overrides: Dictionary = {}, id: String = "##" )
voiddelete_layer ( id: String )
voidmove_layer ( from_index: int, to_index: int )
voidset_layer_scene ( layer_id: String, scene: String )
voidset_layer_overrides ( layer_id: String, overrides: Dictionary )
voidset_layer_setting ( layer_id: String, setting: String, value: Variant )
voidremove_layer_setting ( layer_id: String, setting: String )
boolinherits_anything ( )
DialogicStyleget_inheritance_root ( )
Dictionarymerge_layer_infos ( new_layer_info: Dictionary, ancestor_info: Dictionary )
Dictionaryget_layer_inherited_info ( id: String, inherited_only: bool = false )
Arrayget_layer_inherited_list ( )
voidrealize_inheritance ( )
DialogicStyleclone ( )
voidprepare ( )
voidupdate_from_pre_alpha16 ( )

Property Descriptions

var name = "Style"

No description available.


var inherits = null

No description available.


var layer_list = []

Stores the layer order


var layer_info = {...}

Stores the layer infos


var base_scene = null

No description available.


var base_overrides = {}

No description available.


var layers = []

No description available.


Method Descriptions

func get_layer_count ( ) ⇒ int

Returns the amount of layers (the base layer is not included).


func get_layer_index ( id: String ) ⇒ int

Returns the index of the layer with id in the layer list. Returns -1 for the base layer (id=="") which is not in the layer list.


func has_layer ( id: String ) ⇒ bool

Returns true if id is a valid id for a layer.


func has_layer_index ( index: int ) ⇒ bool

Returns true if index is a valid index for a layer.


func get_layer_id_at_index ( index: int ) ⇒ String

Returns the id of the layer at index.


func get_layer_info ( id: String ) ⇒ Dictionary

No description available.


func get_new_layer_id ( ) ⇒ String

Returns a new layer id not yet in use.


func add_layer ( scene: String, overrides: Dictionary = {}, id: String = "##" ) ⇒ String

Adds a layer with the given scene and overrides. Returns the new layers id.


func delete_layer ( id: String ) ⇒ void

Deletes the layer with the given id. Deleting the base layer is not allowed.


func move_layer ( from_index: int, to_index: int ) ⇒ void

Moves the layer at from_index to to_index.


func set_layer_scene ( layer_id: String, scene: String ) ⇒ void

Changes the scene property of the DialogicStyleLayer resource at layer_id.


func set_layer_overrides ( layer_id: String, overrides: Dictionary ) ⇒ void

No description available.


func set_layer_setting ( layer_id: String, setting: String, value: Variant ) ⇒ void

Changes an override of the DialogicStyleLayer resource at layer_id.


func remove_layer_setting ( layer_id: String, setting: String ) ⇒ void

Resets (removes) an override of the DialogicStyleLayer resource at layer_id.


func inherits_anything ( ) ⇒ bool

Returns true if this style is inheriting from another style.


func get_inheritance_root ( ) ⇒ DialogicStyle

Returns the base style of this style.


func merge_layer_infos ( new_layer_info: Dictionary, ancestor_info: Dictionary ) ⇒ Dictionary

This merges some layer_info with it's param ancestors layer info.


func get_layer_inherited_info ( id: String, inherited_only: bool = false ) ⇒ Dictionary

Returns the layer info of the layer at id taking into account inherited info. If inherited_only is true, the local info is not included.


func get_layer_inherited_list ( ) ⇒ Array

Returns the layer list of the root style.


func realize_inheritance ( ) ⇒ void

Applies inherited info to the local layers. Then removes inheritance.


func clone ( ) ⇒ DialogicStyle

Creates a fresh new style with the same settings.


func prepare ( ) ⇒ void

Starts preloading all the scenes used by this style.


func update_from_pre_alpha16 ( ) ⇒ void

No description available.