diff --git a/addons/dialogic/Modules/DefaultLayoutParts/Layer_History/history_layer.tscn b/addons/dialogic/Modules/DefaultLayoutParts/Layer_History/history_layer.tscn index 3c602e6d6..53f7f3563 100644 --- a/addons/dialogic/Modules/DefaultLayoutParts/Layer_History/history_layer.tscn +++ b/addons/dialogic/Modules/DefaultLayoutParts/Layer_History/history_layer.tscn @@ -27,7 +27,14 @@ size_flags_horizontal = 3 size_flags_vertical = 3 mouse_filter = 2 script = ExtResource("1_4mqm3") +font_use_global_size = null +font_custom_size = null +font_use_global_fonts = null +font_custom_normal = null +font_custom_bold = null +font_custom_italics = null HistoryItem = ExtResource("2_x1xgk") +disabled = null [node name="HistoryBox" type="ScrollContainer" parent="."] unique_name_in_owner = true diff --git a/addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Portraits/vn_portrait_layer.tscn b/addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Portraits/vn_portrait_layer.tscn index d90d49281..374bc60ff 100644 --- a/addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Portraits/vn_portrait_layer.tscn +++ b/addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Portraits/vn_portrait_layer.tscn @@ -29,15 +29,6 @@ anchor_bottom = 1.0 grow_vertical = 2 mouse_filter = 2 script = ExtResource("1_rxdcc") -mode = 0 -position_index = 0 -portrait_prefix = "" -size_mode = 3 -mirrored = false -origin_anchor = 7 -origin_offset = Vector2(0, 0) -debug_character = null -debug_character_portrait = "" metadata/_edit_use_anchors_ = true [node name="DialogicNode_PortraitContainer2" type="Control" parent="Portraits"] @@ -49,15 +40,7 @@ grow_horizontal = 2 grow_vertical = 2 mouse_filter = 2 script = ExtResource("1_rxdcc") -mode = 0 position_index = 1 -portrait_prefix = "" -size_mode = 3 -mirrored = false -origin_anchor = 7 -origin_offset = Vector2(0, 0) -debug_character = null -debug_character_portrait = "" metadata/_edit_use_anchors_ = true [node name="DialogicNode_PortraitContainer3" type="Control" parent="Portraits"] @@ -69,15 +52,7 @@ grow_horizontal = 2 grow_vertical = 2 mouse_filter = 2 script = ExtResource("1_rxdcc") -mode = 0 position_index = 2 -portrait_prefix = "" -size_mode = 3 -mirrored = false -origin_anchor = 7 -origin_offset = Vector2(0, 0) -debug_character = null -debug_character_portrait = "" metadata/_edit_use_anchors_ = true [node name="DialogicNode_PortraitContainer4" type="Control" parent="Portraits"] @@ -89,15 +64,7 @@ grow_horizontal = 2 grow_vertical = 2 mouse_filter = 2 script = ExtResource("1_rxdcc") -mode = 0 position_index = 3 -portrait_prefix = "" -size_mode = 3 -mirrored = false -origin_anchor = 7 -origin_offset = Vector2(0, 0) -debug_character = null -debug_character_portrait = "" metadata/_edit_use_anchors_ = true [node name="DialogicNode_PortraitContainer5" type="Control" parent="Portraits"] @@ -110,13 +77,5 @@ grow_horizontal = 2 grow_vertical = 2 mouse_filter = 2 script = ExtResource("1_rxdcc") -mode = 0 position_index = 4 -portrait_prefix = "" -size_mode = 3 -mirrored = false -origin_anchor = 7 -origin_offset = Vector2(0, 0) -debug_character = null -debug_character_portrait = "" metadata/_edit_use_anchors_ = true diff --git a/addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Textbox/vn_textbox_layer.tscn b/addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Textbox/vn_textbox_layer.tscn index 924c69fe4..263440079 100644 --- a/addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Textbox/vn_textbox_layer.tscn +++ b/addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Textbox/vn_textbox_layer.tscn @@ -291,14 +291,7 @@ textbox_root = NodePath("..") [node name="DialogicNode_TypeSounds" type="AudioStreamPlayer" parent="DialogicTextAnchor/DialogTextAnimationParent/Sizer/DialogTextPanel/DialogicNode_DialogText"] unique_name_in_owner = true script = ExtResource("4_ma5mw") -enabled = true -mode = 0 -sounds = Array[AudioStream]([]) -end_sound = null play_every_character = 0 -pitch_variance = 0.0 -volume_variance = 0.0 -ignore_characters = " .," [node name="NextIndicator" type="Control" parent="DialogicTextAnchor/DialogTextAnimationParent/Sizer/DialogTextPanel"] unique_name_in_owner = true diff --git a/addons/dialogic/Modules/History/subsystem_history.gd b/addons/dialogic/Modules/History/subsystem_history.gd index b0eb3e990..f9e917487 100644 --- a/addons/dialogic/Modules/History/subsystem_history.gd +++ b/addons/dialogic/Modules/History/subsystem_history.gd @@ -78,9 +78,9 @@ func store_full_event(event:DialogicEvent) -> void: ## Takes the current timeline event and creates a unique key for it. ## Uses the timeline resource path as well. func _current_event_key() -> String: - var resource_path : String = dialogic.current_timeline.resource_path - var event_idx : String = str(dialogic.current_event_idx) - var event_key : String = resource_path + event_idx + var resource_path = dialogic.current_timeline.resource_path + var event_idx = str(dialogic.current_event_idx) + var event_key = resource_path+event_idx return event_key @@ -89,7 +89,7 @@ func event_was_read(_event: DialogicEvent) -> void: if !already_read_history_enabled: return - var event_key : String = _current_event_key() + var event_key = _current_event_key() already_read_history_content[event_key] = dialogic.current_event_idx @@ -104,7 +104,7 @@ func check_already_read(event: DialogicEvent) -> void: if event.event_name != "Text": return - var event_key : String = _current_event_key() + var event_key = _current_event_key() if event_key in already_read_history_content: already_read_event_reached.emit() diff --git a/addons/dialogic/Other/DialogicGameHandler.gd b/addons/dialogic/Other/DialogicGameHandler.gd index 0a2a8fa4e..c4558bc5c 100644 --- a/addons/dialogic/Other/DialogicGameHandler.gd +++ b/addons/dialogic/Other/DialogicGameHandler.gd @@ -34,28 +34,28 @@ var current_event_idx: int = 0 ## relevant for the current situation var current_state_info: Dictionary = {} ## Current state (see [States] enum) -var current_state : States = States.IDLE: +var current_state := States.IDLE: get: return current_state set(new_state): current_state = new_state emit_signal('state_changed', new_state) ## Emitted when [current_state] change. -signal state_changed(new_state : States) +signal state_changed(new_state) ## When true, many dialogic process won't continue until it's false again. -var paused : bool = false: +var paused := false: set(value): paused = value if paused: - for subsystem : Node in get_children(): - if subsystem.has_method(&'pause'): - subsystem.call(&'pause') + for subsystem in get_children(): + if subsystem.has_method('pause'): + subsystem.pause() dialogic_paused.emit() else: - for subsystem : Node in get_children(): - if subsystem.has_method(&'resume'): - subsystem.call(&'resume') + for subsystem in get_children(): + if subsystem.has_method('resume'): + subsystem.resume() dialogic_resumed.emit() ## Emitted when [paused] changes to true. @@ -66,12 +66,12 @@ signal dialogic_resumed signal timeline_ended() signal timeline_started() -signal event_handled(resource : Variant) +signal event_handled(resource) ## Emitted when the Signal event was reached -signal signal_event(argument : Variant) +signal signal_event(argument) ## Emitted when [signal] effect was reached in text. -signal text_signal(argument : Variant) +signal text_signal(argument) ## Autoloads are added first, so this happens REALLY early on game startup. diff --git a/addons/dialogic/Other/DialogicUtil.gd b/addons/dialogic/Other/DialogicUtil.gd index e993e576f..013399f4e 100644 --- a/addons/dialogic/Other/DialogicUtil.gd +++ b/addons/dialogic/Other/DialogicUtil.gd @@ -13,9 +13,9 @@ static func get_editor_scale() -> float: ## Although this does in fact always return a EditorPlugin node, ## that class is apparently not present in export and referencing it here creates a crash. static func get_dialogic_plugin() -> Node: - for child : Node in Engine.get_main_loop().get_root().get_children(): + for child in Engine.get_main_loop().get_root().get_children(): if child.get_class() == "EditorNode": - return child.get_node(^'DialogicPlugin') + return child.get_node('DialogicPlugin') return null #endregion @@ -24,10 +24,9 @@ static func get_dialogic_plugin() -> Node: static func autoload() -> DialogicGameHandler: if Engine.is_editor_hint(): return null - if not Engine.get_main_loop().root.has_node(^"Dialogic"): + if not Engine.get_main_loop().root.has_node("Dialogic"): return null - return Engine.get_main_loop().root.get_node(^"Dialogic") - + return Engine.get_main_loop().root.get_node("Dialogic") #region FILE SYSTEM ################################################################################ diff --git a/addons/dialogic/Resources/dialogic_layout_layer.gd b/addons/dialogic/Resources/dialogic_layout_layer.gd index fb05822ad..aceef4110 100644 --- a/addons/dialogic/Resources/dialogic_layout_layer.gd +++ b/addons/dialogic/Resources/dialogic_layout_layer.gd @@ -1,6 +1,6 @@ @tool class_name DialogicLayoutLayer -extends Control +extends Node ## Base class that should be extended by custom dialogic layout layers. diff --git a/addons/dialogic/Resources/dialogic_style.gd b/addons/dialogic/Resources/dialogic_style.gd index ccd48f3df..4256864a5 100644 --- a/addons/dialogic/Resources/dialogic_style.gd +++ b/addons/dialogic/Resources/dialogic_style.gd @@ -86,6 +86,9 @@ func move_layer(from_index:int, to_index:int) -> void: if not has_layer(from_index) or not has_layer(to_index-1): return + if from_index < to_index: + to_index -1 + var info: DialogicLayoutLayer = layers.pop_at(from_index) layers.insert(to_index, info) changed.emit()