mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-07-02 01:21:17 +00:00
Dialogue System
This commit is contained in:
parent
77765a581e
commit
1fa77f0c03
690 changed files with 46698 additions and 14 deletions
30
addons/dialogic/Editor/Events/Fields/field_bool_check.gd
Normal file
30
addons/dialogic/Editor/Events/Fields/field_bool_check.gd
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
@tool
|
||||
extends DialogicVisualEditorField
|
||||
|
||||
## Event block field for boolean values.
|
||||
|
||||
#region MAIN METHODS
|
||||
################################################################################
|
||||
func _ready() -> void:
|
||||
self.toggled.connect(_on_value_changed)
|
||||
|
||||
|
||||
func _load_display_info(info:Dictionary) -> void:
|
||||
pass
|
||||
|
||||
|
||||
func _set_value(value:Variant) -> void:
|
||||
match DialogicUtil.get_variable_value_type(value):
|
||||
DialogicUtil.VarTypes.STRING:
|
||||
self.button_pressed = value and not value.strip_edges() == "false"
|
||||
_:
|
||||
self.button_pressed = value and true
|
||||
#endregion
|
||||
|
||||
|
||||
#region SIGNAL METHODS
|
||||
################################################################################
|
||||
func _on_value_changed(value:bool) -> void:
|
||||
value_changed.emit(property_name, value)
|
||||
|
||||
#endregion
|
||||
Loading…
Add table
Add a link
Reference in a new issue