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
Name | Type | Default |
---|---|---|
name | String | "Style" |
inherits | DialogicStyle | null |
layer_list | String[] | [] |
layer_info | Dictionary | {...} |
base_scene | PackedScene | null |
base_overrides | Dictionary | {} |
layers | DialogicStyleLayer[] | [] |
Methods
Property Descriptions
No description available.
No description available.
Stores the layer order
Stores the layer infos
No description available.
No description available.
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.
Starts preloading all the scenes used by this style.
func update_from_pre_alpha16 ( ) ⇒ void
No description available.