diff --git a/addons/dialogic/Editor/Common/DCSS.gd b/addons/dialogic/Editor/Common/DCSS.gd index e64cc360e..c094f6358 100644 --- a/addons/dialogic/Editor/Common/DCSS.gd +++ b/addons/dialogic/Editor/Common/DCSS.gd @@ -1,6 +1,6 @@ @tool class_name DCSS - + static func inline(style:Dictionary) -> StyleBoxFlat: var scale:float = DialogicUtil.get_editor_scale() var s := StyleBoxFlat.new() @@ -45,7 +45,7 @@ static func inline(style:Dictionary) -> StyleBoxFlat: static func style(node, style:Dictionary) -> StyleBoxFlat: var s:StyleBoxFlat = inline(style) - + node.set('theme_override_styles/normal', s) node.set('theme_override_styles/focus', s) node.set('theme_override_styles/read_only', s) diff --git a/addons/dialogic/Editor/Common/toolbar.gd b/addons/dialogic/Editor/Common/toolbar.gd index 1c9e18d2d..2877ecb84 100644 --- a/addons/dialogic/Editor/Common/toolbar.gd +++ b/addons/dialogic/Editor/Common/toolbar.gd @@ -10,7 +10,7 @@ func _ready(): if owner.get_parent() is SubViewport: return %CustomButtons.custom_minimum_size.y = 33 * DialogicUtil.get_editor_scale() - + for child in get_children(): if child is Button: child.queue_free() @@ -34,7 +34,7 @@ func add_custom_button(label:String, icon:Texture) -> Button: button.text = label button.icon = icon # button.flat = true - + button.size_flags_vertical = Control.SIZE_SHRINK_BEGIN %CustomButtons.add_child(button) # custom_minimum_size.y = button.size.y diff --git a/addons/dialogic/Editor/TimelineEditor/VisualEditor/AddEventButton.gd b/addons/dialogic/Editor/TimelineEditor/VisualEditor/AddEventButton.gd index dae316d78..9fe4e16db 100644 --- a/addons/dialogic/Editor/TimelineEditor/VisualEditor/AddEventButton.gd +++ b/addons/dialogic/Editor/TimelineEditor/VisualEditor/AddEventButton.gd @@ -16,9 +16,9 @@ extends Button func _ready() -> void: tooltip_text = visible_name - + custom_minimum_size = Vector2(get_theme_font("font", 'Label').get_string_size(text).x+35,30) * DialogicUtil.get_editor_scale() - + add_theme_color_override("font_color", get_theme_color("font_color", "Editor")) add_theme_color_override("font_color_hover", get_theme_color("accent_color", "Editor")) apply_base_button_style() diff --git a/addons/dialogic/Modules/Character/DefaultAnimations/shake_x.gd b/addons/dialogic/Modules/Character/DefaultAnimations/shake_x.gd index 6b22c9974..a3f366a22 100644 --- a/addons/dialogic/Modules/Character/DefaultAnimations/shake_x.gd +++ b/addons/dialogic/Modules/Character/DefaultAnimations/shake_x.gd @@ -3,7 +3,7 @@ extends DialogicAnimation func animate(): var tween := (node.create_tween() as Tween) tween.set_ease(Tween.EASE_IN_OUT).set_trans(Tween.TRANS_SINE) - + var strength :float = node.get_viewport().size.x/60 tween.tween_property(node, 'position:x', orig_pos.x+strength, time*0.2) tween.tween_property(node, 'position:x', orig_pos.x-strength, time*0.1) @@ -13,5 +13,5 @@ func animate(): tween.tween_property(node, 'position:x', orig_pos.x-strength, time*0.1) tween.tween_property(node, 'position:x', orig_pos.x+strength, time*0.1) tween.tween_property(node, 'position:x', orig_pos.x, time*0.2) - + tween.finished.connect(emit_signal.bind('finished_once')) diff --git a/addons/dialogic/Modules/Character/DefaultAnimations/shake_y.gd b/addons/dialogic/Modules/Character/DefaultAnimations/shake_y.gd index 63f78ba5c..9fe3a9146 100644 --- a/addons/dialogic/Modules/Character/DefaultAnimations/shake_y.gd +++ b/addons/dialogic/Modules/Character/DefaultAnimations/shake_y.gd @@ -3,7 +3,7 @@ extends DialogicAnimation func animate(): var tween := (node.create_tween() as Tween) tween.set_ease(Tween.EASE_IN_OUT).set_trans(Tween.TRANS_SINE) - + var strength :float = node.get_viewport().size.y/40 tween.tween_property(node, 'position:y', orig_pos.y+strength, time*0.2) tween.tween_property(node, 'position:y', orig_pos.y-strength, time*0.1) @@ -13,5 +13,5 @@ func animate(): tween.tween_property(node, 'position:y', orig_pos.y-strength, time*0.1) tween.tween_property(node, 'position:y', orig_pos.y+strength, time*0.1) tween.tween_property(node, 'position:y', orig_pos.y, time*0.2) - + tween.finished.connect(emit_signal.bind('finished_once')) diff --git a/addons/dialogic/Modules/Character/DefaultAnimations/tada.gd b/addons/dialogic/Modules/Character/DefaultAnimations/tada.gd index ee9f001ec..38eef4a96 100644 --- a/addons/dialogic/Modules/Character/DefaultAnimations/tada.gd +++ b/addons/dialogic/Modules/Character/DefaultAnimations/tada.gd @@ -3,9 +3,9 @@ extends DialogicAnimation func animate(): var tween := (node.create_tween() as Tween) tween.set_trans(Tween.TRANS_SINE).set_ease(Tween.EASE_OUT) - + var strength :float = 0.01 - + tween.set_parallel(true) tween.tween_property(node, 'scale', Vector2(1,1)*(1+strength), time*0.3) tween.tween_property(node, 'rotation', -strength, time*0.1).set_delay(time*0.2) @@ -15,5 +15,5 @@ func animate(): tween.tween_property(node, 'rotation', -strength, time*0.1).set_delay(time*0.6) tween.chain().tween_property(node, 'scale', Vector2(1,1), time*0.3) tween.parallel().tween_property(node, 'rotation', 0.0, time*0.3) - + tween.finished.connect(emit_signal.bind('finished_once')) diff --git a/addons/dialogic/Modules/DefaultLayoutParts/Layer_History/example_history_item.gd b/addons/dialogic/Modules/DefaultLayoutParts/Layer_History/example_history_item.gd index f01fa0ffa..d52a25951 100644 --- a/addons/dialogic/Modules/DefaultLayoutParts/Layer_History/example_history_item.gd +++ b/addons/dialogic/Modules/DefaultLayoutParts/Layer_History/example_history_item.gd @@ -21,7 +21,7 @@ func load_info(text:String, character:String = "", character_color: Color =Color name_label.show() else: name_label.hide() - + var icon_node : TextureRect = get_icon() if icon == null: icon_node.hide() diff --git a/addons/dialogic/Resources/CharacterResourceLoader.gd b/addons/dialogic/Resources/CharacterResourceLoader.gd index 4ec24ad6c..e4afce83e 100644 --- a/addons/dialogic/Resources/CharacterResourceLoader.gd +++ b/addons/dialogic/Resources/CharacterResourceLoader.gd @@ -28,13 +28,13 @@ func _handles_type(typename: StringName) -> bool: func _load(path: String, original_path: String, use_sub_threads: bool, cache_mode: int): # print('[Dialogic] Reimporting character "' , path, '"') var file := FileAccess.open(path, FileAccess.READ) - + if not file: # For now, just let editor know that for some reason you can't # read the file. print("[Dialogic] Error opening file:", FileAccess.get_open_error()) return FileAccess.get_open_error() - + return dict_to_inst(str_to_var(file.get_as_text())) diff --git a/addons/dialogic/Resources/CharacterResourceSaver.gd b/addons/dialogic/Resources/CharacterResourceSaver.gd index 84947c56c..c2c9f4bff 100644 --- a/addons/dialogic/Resources/CharacterResourceSaver.gd +++ b/addons/dialogic/Resources/CharacterResourceSaver.gd @@ -11,23 +11,23 @@ func _get_recognized_extensions(resource: Resource) -> PackedStringArray: func _recognize(resource: Resource) -> bool: # Cast instead of using "is" keyword in case is a subclass resource = resource as DialogicCharacter - + if resource: return true - + return false # Save the resource func _save(resource: Resource, path: String = '', flags: int = 0): var file := FileAccess.open(path, FileAccess.WRITE) - + if not file: # For now, just let editor know that for some reason you can't # read the file. print("[Dialogic] Error opening file:", FileAccess.get_open_error()) return FileAccess.get_open_error() - + var result := var_to_str(inst_to_dict(resource)) file.store_string(result) # print('[Dialogic] Saved character "' , path, '"') diff --git a/addons/dialogic/Resources/TimelineResourceLoader.gd b/addons/dialogic/Resources/TimelineResourceLoader.gd index 185454122..9f9c3f6d8 100644 --- a/addons/dialogic/Resources/TimelineResourceLoader.gd +++ b/addons/dialogic/Resources/TimelineResourceLoader.gd @@ -27,13 +27,13 @@ func _handles_type(typename: StringName) -> bool: # parse the file and return a resource func _load(path: String, original_path: String, use_sub_threads: bool, cache_mode: int): var file := FileAccess.open(path, FileAccess.READ) - + if not file: # For now, just let editor know that for some reason you can't # read the file. print("[Dialogic] Error opening file:", FileAccess.get_open_error()) return FileAccess.get_open_error() - + var tml := DialogicTimeline.new() tml.from_text(file.get_as_text()) return tml