diff --git a/addons/dialogic/Editor/Events/BranchEnd.gd b/addons/dialogic/Editor/Events/BranchEnd.gd index 21aa87cba..0514d8af8 100644 --- a/addons/dialogic/Editor/Events/BranchEnd.gd +++ b/addons/dialogic/Editor/Events/BranchEnd.gd @@ -35,7 +35,7 @@ func set_indent(indent: int): indent_node.custom_minimum_size = Vector2(indent_size * indent, 0) indent_node.visible = indent != 0 current_indent_level = indent - update() + queue_redraw() func parent_node_changed(): if parent_node: diff --git a/addons/dialogic/Editor/Events/EventNode/EventNode.gd b/addons/dialogic/Editor/Events/EventNode/EventNode.gd index eb3be5960..568177cb3 100644 --- a/addons/dialogic/Editor/Events/EventNode/EventNode.gd +++ b/addons/dialogic/Editor/Events/EventNode/EventNode.gd @@ -68,11 +68,11 @@ func load_data(data): func set_warning(text): warning.show() - warning.hint_tooltip = text + warning.tooltip_text = text func remove_warning(text = ''): - if warning.hint_tooltip == text or text == '': + if warning.tooltip_text == text or text == '': warning.hide() @@ -80,7 +80,7 @@ func set_indent(indent: int): indent_node.custom_minimum_size = Vector2(indent_size * indent, 0) indent_node.visible = indent != 0 current_indent_level = indent - update() + queue_redraw() ## ***************************************************************************** @@ -374,7 +374,7 @@ func _on_ExpandButton_toggled(button_pressed): %ExpandButton.set_pressed_no_signal(button_pressed) expanded = button_pressed body_container.visible = button_pressed - get_parent().get_parent().update() + get_parent().get_parent().queue_redraw() func _on_EventNode_gui_input(event): diff --git a/addons/dialogic/Editor/Events/Fields/ComplexPicker.gd b/addons/dialogic/Editor/Events/Fields/ComplexPicker.gd index 3b0851042..c61b532ec 100644 --- a/addons/dialogic/Editor/Events/Fields/ComplexPicker.gd +++ b/addons/dialogic/Editor/Events/Fields/ComplexPicker.gd @@ -50,7 +50,7 @@ func set_value(value, text : String = '') -> void: elif file_extension != "" && file_extension != ".dch" && file_extension != ".dtl": $Search.text = value.resource_path - $Search.hint_tooltip = value.resource_path + $Search.tooltip_text = value.resource_path elif value: $Search.text = value else: diff --git a/addons/dialogic/Editor/Events/Fields/FilePicker.gd b/addons/dialogic/Editor/Events/Fields/FilePicker.gd index 8cd9a9222..276466e2c 100644 --- a/addons/dialogic/Editor/Events/Fields/FilePicker.gd +++ b/addons/dialogic/Editor/Events/Fields/FilePicker.gd @@ -42,7 +42,7 @@ func set_left_text(value:String): func set_value(value): %Field.text = value.get_file() - %Field.hint_tooltip = value + %Field.tooltip_text = value %ClearButton.visible = !value.is_empty() func _on_OpenButton_pressed() -> void: diff --git a/addons/dialogic/Editor/Settings/Settings_Translations.gd b/addons/dialogic/Editor/Settings/Settings_Translations.gd index 40e2e7be3..12ba0f853 100644 --- a/addons/dialogic/Editor/Settings/Settings_Translations.gd +++ b/addons/dialogic/Editor/Settings/Settings_Translations.gd @@ -99,8 +99,8 @@ func erase_translations(): if trans_path.ends_with('.csv'): for x_file in DialogicUtil.listdir(trans_path.get_base_dir()): if x_file.ends_with('.translation'): - trans_files.erase(trans_path.get_base_dir().plus_file(x_file)) - dir.remove(trans_path.get_base_dir().plus_file(x_file)) + trans_files.erase(trans_path.get_base_dir().path_join(x_file)) + dir.remove(trans_path.get_base_dir().path_join(x_file)) dir.remove(DialogicUtil.get_project_setting('dialogic/translation_path', '')) ProjectSettings.set_setting('dialogic/translation_path', null) @@ -110,8 +110,8 @@ func erase_translations(): dir.remove(timeline_path.trim_suffix('.dtl')+'_translation.csv') for x_file in DialogicUtil.listdir(timeline_path.get_base_dir()): if x_file.ends_with('.translation'): - trans_files.erase(timeline_path.get_base_dir().plus_file(x_file)) - dir.remove(timeline_path.get_base_dir().plus_file(x_file)) + trans_files.erase(timeline_path.get_base_dir().path_join(x_file)) + dir.remove(timeline_path.get_base_dir().path_join(x_file)) var tml:DialogicTimeline = load(timeline_path) for event in tml.get_events(): @@ -141,7 +141,7 @@ func _on_TransUpdate_pressed(): if !mode: for file in DialogicUtil.listdir(timeline_path.get_base_dir()): - file = timeline_path.get_base_dir().plus_file(file) + file = timeline_path.get_base_dir().path_join(file) if file.ends_with('.translation'): if not file in trans_files: trans_files.append(file) @@ -150,7 +150,7 @@ func _on_TransUpdate_pressed(): if mode: var trans_folder = DialogicUtil.get_project_setting('dialogic/translation_path', '').get_base_dir() for file in DialogicUtil.listdir(trans_folder): - file = trans_folder.plus_file(file) + file = trans_folder.path_join(file) if file.ends_with('.translation'): if not file in trans_files: trans_files.append(file) diff --git a/addons/dialogic/Editor/VisualEditor/AddEventButton.gd b/addons/dialogic/Editor/VisualEditor/AddEventButton.gd index 5fc2f9b58..2c5345129 100644 --- a/addons/dialogic/Editor/VisualEditor/AddEventButton.gd +++ b/addons/dialogic/Editor/VisualEditor/AddEventButton.gd @@ -18,7 +18,7 @@ func _ready(): self_modulate = Color(1,1,1) if visible_name != '': text = ' ' + visible_name - #hint_tooltip = DTS.translate(hint_tooltip) + #tooltip_text = DTS.translate(tooltip_text) var _scale = DialogicUtil.get_editor_scale() custom_minimum_size = Vector2(30,30)* _scale @@ -46,7 +46,7 @@ func set_color(color): func _get_drag_data(position): var preview_label = Label.new() - preview_label.text = 'Add Event %s' % [ hint_tooltip ] + preview_label.text = 'Add Event %s' % [ tooltip_text ] if self.text != '': preview_label.text = text diff --git a/addons/dialogic/Editor/VisualEditor/TimelineArea.gd b/addons/dialogic/Editor/VisualEditor/TimelineArea.gd index 163bd88dc..913eedac0 100644 --- a/addons/dialogic/Editor/VisualEditor/TimelineArea.gd +++ b/addons/dialogic/Editor/VisualEditor/TimelineArea.gd @@ -14,9 +14,8 @@ func _ready(): mouse_exited.connect(_on_mouse_exited) gui_input.connect(_on_gui_input) - set('theme_override_styles/bg', DCSS.inline({ - 'background': get_theme_color('dark_color_1', 'Editor') - })) + + set('theme_override_styles/panel', get_theme_stylebox("Background", "EditorStyles")) func _can_drop_data(position, data): diff --git a/addons/dialogic/Editor/VisualEditor/VisualEditor.gd b/addons/dialogic/Editor/VisualEditor/VisualEditor.gd index 638df00d6..3d844fa88 100644 --- a/addons/dialogic/Editor/VisualEditor/VisualEditor.gd +++ b/addons/dialogic/Editor/VisualEditor/VisualEditor.gd @@ -868,14 +868,14 @@ func get_index_under_cursor(): func move_block_up(block): if block.get_index() < 1: return false %Timeline.move_child(block, block.get_index() - 1) - %TimelineArea.update() + %TimelineArea.queue_redraw() something_changed() return true func move_block_down(block): %Timeline.move_child(block, block.get_index() + 1) - %TimelineArea.update() + %TimelineArea.queue_redraw() something_changed() return true @@ -946,7 +946,7 @@ func indent_events() -> void: event.set_indent(0) indent += delayed_indent - %TimelineArea.update() + %TimelineArea.queue_redraw() func add_extra_scroll_area_to_timeline(): diff --git a/addons/dialogic/Editor/VisualEditor/VisualEditor.tscn b/addons/dialogic/Editor/VisualEditor/VisualEditor.tscn index fae68a911..208fc387b 100644 --- a/addons/dialogic/Editor/VisualEditor/VisualEditor.tscn +++ b/addons/dialogic/Editor/VisualEditor/VisualEditor.tscn @@ -1,13 +1,11 @@ -[gd_scene load_steps=5 format=3 uid="uid://ynhtuxgwp3se"] +[gd_scene load_steps=4 format=3 uid="uid://ynhtuxgwp3se"] [ext_resource type="Script" path="res://addons/dialogic/Editor/VisualEditor/VisualEditor.gd" id="1_pybf8"] [ext_resource type="Theme" path="res://addons/dialogic/Editor/Theme/MainTheme.tres" id="2_3mt7r"] [ext_resource type="Script" path="res://addons/dialogic/Editor/VisualEditor/TimelineArea.gd" id="3_1580x"] -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_mvi7o"] -bg_color = Color(0, 0, 0, 1) - [node name="TimelineVisualEditor" type="MarginContainer"] +anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 theme_override_constants/margin_left = 5 @@ -16,9 +14,10 @@ theme_override_constants/margin_bottom = 5 script = ExtResource("1_pybf8") [node name="View" type="HSplitContainer" parent="."] +layout_mode = 2 offset_left = 5.0 -offset_right = 1675.0 -offset_bottom = 1045.0 +offset_right = 1147.0 +offset_bottom = 643.0 size_flags_horizontal = 3 size_flags_vertical = 3 theme = ExtResource("2_3mt7r") @@ -26,166 +25,195 @@ split_offset = 7 [node name="TimelineArea" type="ScrollContainer" parent="View"] unique_name_in_owner = true -offset_right = 1408.0 -offset_bottom = 1045.0 +layout_mode = 2 +offset_right = 730.0 +offset_bottom = 643.0 size_flags_horizontal = 3 size_flags_vertical = 3 -theme_override_styles/bg = SubResource("StyleBoxFlat_mvi7o") script = ExtResource("3_1580x") [node name="Timeline" type="VBoxContainer" parent="View/TimelineArea"] unique_name_in_owner = true -offset_right = 1408.0 -offset_bottom = 1045.0 +layout_mode = 2 +offset_right = 730.0 +offset_bottom = 643.0 grow_horizontal = 2 grow_vertical = 2 size_flags_horizontal = 3 size_flags_vertical = 3 [node name="ScrollContainer" type="ScrollContainer" parent="View"] -custom_minimum_size = Vector2(250, 0) -offset_left = 1420.0 -offset_right = 1670.0 -offset_bottom = 1045.0 +custom_minimum_size = Vector2(400, 0) +layout_mode = 2 +offset_left = 742.0 +offset_right = 1142.0 +offset_bottom = 643.0 [node name="EventContainer" type="VBoxContainer" parent="View/ScrollContainer"] -offset_right = 250.0 -offset_bottom = 1045.0 +layout_mode = 2 +offset_right = 392.0 +offset_bottom = 820.0 size_flags_horizontal = 3 size_flags_vertical = 3 [node name="HBoxContainer6" type="HBoxContainer" parent="View/ScrollContainer/EventContainer"] -offset_right = 250.0 +layout_mode = 2 +offset_right = 392.0 offset_bottom = 26.0 [node name="Label" type="Label" parent="View/ScrollContainer/EventContainer/HBoxContainer6"] +layout_mode = 2 offset_right = 39.0 offset_bottom = 26.0 text = "Main" [node name="HSeparator2" type="HSeparator" parent="View/ScrollContainer/EventContainer/HBoxContainer6"] +layout_mode = 2 offset_left = 43.0 -offset_right = 250.0 +offset_right = 392.0 offset_bottom = 26.0 size_flags_horizontal = 3 [node name="FlexContainer0" type="HFlowContainer" parent="View/ScrollContainer/EventContainer"] +layout_mode = 2 offset_top = 30.0 -offset_right = 250.0 -offset_bottom = 30.0 +offset_right = 392.0 +offset_bottom = 154.0 size_flags_horizontal = 3 [node name="HBoxContainer5" type="HBoxContainer" parent="View/ScrollContainer/EventContainer"] -offset_top = 34.0 -offset_right = 250.0 -offset_bottom = 60.0 +layout_mode = 2 +offset_top = 158.0 +offset_right = 392.0 +offset_bottom = 184.0 [node name="Label2" type="Label" parent="View/ScrollContainer/EventContainer/HBoxContainer5"] +layout_mode = 2 offset_right = 40.0 offset_bottom = 26.0 text = "Logic" [node name="HSeparator2" type="HSeparator" parent="View/ScrollContainer/EventContainer/HBoxContainer5"] +layout_mode = 2 offset_left = 44.0 -offset_right = 250.0 +offset_right = 392.0 offset_bottom = 26.0 size_flags_horizontal = 3 [node name="FlexContainer1" type="HFlowContainer" parent="View/ScrollContainer/EventContainer"] -offset_top = 64.0 -offset_right = 250.0 -offset_bottom = 64.0 +layout_mode = 2 +offset_top = 188.0 +offset_right = 392.0 +offset_bottom = 248.0 size_flags_horizontal = 3 [node name="HBoxContainer3" type="HBoxContainer" parent="View/ScrollContainer/EventContainer"] -offset_top = 68.0 -offset_right = 250.0 -offset_bottom = 94.0 +layout_mode = 2 +offset_top = 252.0 +offset_right = 392.0 +offset_bottom = 278.0 [node name="Label3" type="Label" parent="View/ScrollContainer/EventContainer/HBoxContainer3"] +layout_mode = 2 offset_right = 67.0 offset_bottom = 26.0 text = "Timeline" [node name="HSeparator2" type="HSeparator" parent="View/ScrollContainer/EventContainer/HBoxContainer3"] +layout_mode = 2 offset_left = 71.0 -offset_right = 250.0 +offset_right = 392.0 offset_bottom = 26.0 size_flags_horizontal = 3 [node name="FlexContainer2" type="HFlowContainer" parent="View/ScrollContainer/EventContainer"] -offset_top = 98.0 -offset_right = 250.0 -offset_bottom = 98.0 +layout_mode = 2 +offset_top = 282.0 +offset_right = 392.0 +offset_bottom = 406.0 size_flags_horizontal = 3 [node name="HBoxContainer4" type="HBoxContainer" parent="View/ScrollContainer/EventContainer"] -offset_top = 102.0 -offset_right = 250.0 -offset_bottom = 128.0 +layout_mode = 2 +offset_top = 410.0 +offset_right = 392.0 +offset_bottom = 436.0 [node name="Label4" type="Label" parent="View/ScrollContainer/EventContainer/HBoxContainer4"] +layout_mode = 2 offset_right = 98.0 offset_bottom = 26.0 text = "Audio/Visual" [node name="HSeparator2" type="HSeparator" parent="View/ScrollContainer/EventContainer/HBoxContainer4"] +layout_mode = 2 offset_left = 102.0 -offset_right = 250.0 +offset_right = 392.0 offset_bottom = 26.0 size_flags_horizontal = 3 [node name="FlexContainer3" type="HFlowContainer" parent="View/ScrollContainer/EventContainer"] -offset_top = 132.0 -offset_right = 250.0 -offset_bottom = 132.0 +layout_mode = 2 +offset_top = 440.0 +offset_right = 392.0 +offset_bottom = 564.0 size_flags_horizontal = 3 [node name="HBoxContainer" type="HBoxContainer" parent="View/ScrollContainer/EventContainer"] -offset_top = 136.0 -offset_right = 250.0 -offset_bottom = 162.0 +layout_mode = 2 +offset_top = 568.0 +offset_right = 392.0 +offset_bottom = 594.0 [node name="Label5" type="Label" parent="View/ScrollContainer/EventContainer/HBoxContainer"] +layout_mode = 2 offset_right = 48.0 offset_bottom = 26.0 text = "Godot" [node name="HSeparator2" type="HSeparator" parent="View/ScrollContainer/EventContainer/HBoxContainer"] +layout_mode = 2 offset_left = 52.0 -offset_right = 250.0 +offset_right = 392.0 offset_bottom = 26.0 size_flags_horizontal = 3 [node name="FlexContainer4" type="HFlowContainer" parent="View/ScrollContainer/EventContainer"] -offset_top = 166.0 -offset_right = 250.0 -offset_bottom = 166.0 +layout_mode = 2 +offset_top = 598.0 +offset_right = 392.0 +offset_bottom = 722.0 size_flags_horizontal = 3 [node name="OtherContainer" type="HBoxContainer" parent="View/ScrollContainer/EventContainer"] -offset_top = 170.0 -offset_right = 250.0 -offset_bottom = 196.0 +layout_mode = 2 +offset_top = 726.0 +offset_right = 392.0 +offset_bottom = 752.0 [node name="Label6" type="Label" parent="View/ScrollContainer/EventContainer/OtherContainer"] +layout_mode = 2 offset_right = 46.0 offset_bottom = 26.0 text = "Other" [node name="HSeparator2" type="HSeparator" parent="View/ScrollContainer/EventContainer/OtherContainer"] +layout_mode = 2 offset_left = 50.0 -offset_right = 250.0 +offset_right = 392.0 offset_bottom = 26.0 size_flags_horizontal = 3 [node name="FlexContainer5" type="HFlowContainer" parent="View/ScrollContainer/EventContainer"] -offset_top = 200.0 -offset_right = 250.0 -offset_bottom = 200.0 +layout_mode = 2 +offset_top = 756.0 +offset_right = 392.0 +offset_bottom = 816.0 size_flags_horizontal = 3 [node name="Spacer" type="Control" parent="View/ScrollContainer/EventContainer"] -offset_top = 204.0 -offset_right = 250.0 -offset_bottom = 204.0 +layout_mode = 2 +anchors_preset = 0 +offset_top = 820.0 +offset_right = 392.0 +offset_bottom = 820.0 diff --git a/addons/dialogic/Events/Background/Display_Background.gd b/addons/dialogic/Events/Background/Display_Background.gd index 0f7a3dd0a..fd81e2456 100644 --- a/addons/dialogic/Events/Background/Display_Background.gd +++ b/addons/dialogic/Events/Background/Display_Background.gd @@ -1,6 +1,6 @@ extends TextureRect -class_name DialogicNode_Background, 'icon.png' +class_name DialogicDisplay_Background func _ready(): add_to_group('dialogic_bg_image') diff --git a/addons/dialogic/Events/Background/event.gd b/addons/dialogic/Events/Background/event.gd index 5097d4710..a87fb3f8b 100644 --- a/addons/dialogic/Events/Background/event.gd +++ b/addons/dialogic/Events/Background/event.gd @@ -13,7 +13,7 @@ func _execute() -> void: func get_required_subsystems() -> Array: return [ {'name':'Backgrounds', - 'subsystem':get_script().resource_path.get_base_dir().plus_file('Subsystem_Backgrounds.gd')}, + 'subsystem':get_script().resource_path.get_base_dir().path_join('Subsystem_Backgrounds.gd')}, ] diff --git a/addons/dialogic/Events/Character/Display_PortraitHolder.gd b/addons/dialogic/Events/Character/Display_PortraitHolder.gd index 9ddb53e44..1887d12c9 100644 --- a/addons/dialogic/Events/Character/Display_PortraitHolder.gd +++ b/addons/dialogic/Events/Character/Display_PortraitHolder.gd @@ -1,6 +1,7 @@ extends CanvasLayer -class_name DialogicNode_PortraitHolder, 'icon.png' +class_name DialogicDisplay_PortraitHolder + func _ready(): add_to_group('dialogic_portrait_holder') diff --git a/addons/dialogic/Events/Character/Display_PortraitPosition.gd b/addons/dialogic/Events/Character/Display_PortraitPosition.gd index 861f2a9d4..8cdf4b705 100644 --- a/addons/dialogic/Events/Character/Display_PortraitPosition.gd +++ b/addons/dialogic/Events/Character/Display_PortraitPosition.gd @@ -1,4 +1,4 @@ -extends Position2D +extends Marker2D class_name DialogicNode_PortraitPosition diff --git a/addons/dialogic/Events/Character/Settings_Portrait.gd b/addons/dialogic/Events/Character/Settings_Portrait.gd index b4ec204ee..a509b9da2 100644 --- a/addons/dialogic/Events/Character/Settings_Portrait.gd +++ b/addons/dialogic/Events/Character/Settings_Portrait.gd @@ -15,9 +15,9 @@ func refresh(): %JoinDefault.resource_icon = get_theme_icon("Animation", "EditorIcons") %LeaveDefault.resource_icon = get_theme_icon("Animation", "EditorIcons") %JoinDefault.set_value(DialogicUtil.get_project_setting('dialogic/animations/join_default', - get_script().resource_path.get_base_dir().plus_file('DefaultAnimations/fade_in_up.gd'))) + get_script().resource_path.get_base_dir().path_join('DefaultAnimations/fade_in_up.gd'))) %LeaveDefault.set_value(DialogicUtil.get_project_setting('dialogic/animations/leave_default', - get_script().resource_path.get_base_dir().plus_file('DefaultAnimations/fade_out_down.gd'))) + get_script().resource_path.get_base_dir().path_join('DefaultAnimations/fade_out_down.gd'))) %JoinDefaultLength.set_value(DialogicUtil.get_project_setting('dialogic/animations/join_default_length', 0.5)) %LeaveDefaultLength.set_value(DialogicUtil.get_project_setting('dialogic/animations/leave_default_length', 0.5)) %LeaveDefaultWait.button_pressed = DialogicUtil.get_project_setting('dialogic/animations/leave_default_wait', true) @@ -63,7 +63,7 @@ func get_leave_animation_suggestions(search_text): return suggestions func list_animations() -> Array: - var list = DialogicUtil.listdir(get_script().resource_path.get_base_dir().plus_file('DefaultAnimations'), true, false, true) + var list = DialogicUtil.listdir(get_script().resource_path.get_base_dir().path_join('DefaultAnimations'), true, false, true) list.append_array(DialogicUtil.listdir(DialogicUtil.get_project_setting('dialogic/animations/custom_folder', 'res://addons/dialogic_additions/Animations'), true, false, true)) return list diff --git a/addons/dialogic/Events/Character/Subsystem_Portraits.gd b/addons/dialogic/Events/Character/Subsystem_Portraits.gd index e3951540a..809f15f96 100644 --- a/addons/dialogic/Events/Character/Subsystem_Portraits.gd +++ b/addons/dialogic/Events/Character/Subsystem_Portraits.gd @@ -259,7 +259,7 @@ func update_rpg_portrait_mode(character:DialogicCharacter = null, portrait:Strin for joined_character in dialogic.current_state_info.portraits: if not character or (joined_character != character.resource_path): var AnimationName = DialogicUtil.get_project_setting('dialogic/animations/leave_default', - get_script().resource_path.get_base_dir().plus_file('DefaultAnimations/fade_out_down.gd')) + get_script().resource_path.get_base_dir().path_join('DefaultAnimations/fade_out_down.gd')) var AnimationLength = DialogicUtil.get_project_setting('dialogic/animations/leave_default_length', 0.5) var anim = animate_portrait(load(joined_character), AnimationName, AnimationLength) @@ -270,7 +270,7 @@ func update_rpg_portrait_mode(character:DialogicCharacter = null, portrait:Strin if (not char_joined) and character and portrait in character.portraits: var AnimationName = DialogicUtil.get_project_setting('dialogic/animations/join_default', - get_script().resource_path.get_base_dir().plus_file('DefaultAnimations/fade_in_up.gd')) + get_script().resource_path.get_base_dir().path_join('DefaultAnimations/fade_in_up.gd')) var AnimationLength = DialogicUtil.get_project_setting('dialogic/animations/join_default_length', 0.5) add_portrait(character, portrait, 1, false) var anim = animate_portrait(character, AnimationName, AnimationLength) diff --git a/addons/dialogic/Events/Character/event.gd b/addons/dialogic/Events/Character/event.gd index 3a093ee40..19e3de9a9 100644 --- a/addons/dialogic/Events/Character/event.gd +++ b/addons/dialogic/Events/Character/event.gd @@ -45,7 +45,7 @@ func _execute() -> void: if n: if AnimationName.is_empty(): AnimationName = DialogicUtil.get_project_setting('dialogic/animations/join_default', - get_script().resource_path.get_base_dir().plus_file('DefaultAnimations/fade_in_up.gd')) + get_script().resource_path.get_base_dir().path_join('DefaultAnimations/fade_in_up.gd')) AnimationLength = DialogicUtil.get_project_setting('dialogic/animations/join_default_length', 0.5) AnimationWait = DialogicUtil.get_project_setting('dialogic/animations/join_default_wait', true) if AnimationName: @@ -64,7 +64,7 @@ func _execute() -> void: if _leave_all: if AnimationName.is_empty(): AnimationName = DialogicUtil.get_project_setting('dialogic/animations/leave_default', -get_script().resource_path.get_base_dir().plus_file('DefaultAnimations/fade_out_down.gd')) +get_script().resource_path.get_base_dir().path_join('DefaultAnimations/fade_out_down.gd')) AnimationLength = DialogicUtil.get_project_setting('dialogic/animations/leave_default_length', 0.5) AnimationWait = DialogicUtil.get_project_setting('dialogic/animations/leave_default_wait', true) @@ -86,7 +86,7 @@ get_script().resource_path.get_base_dir().plus_file('DefaultAnimations/fade_out_ if dialogic.Portraits.is_character_joined(Character): if AnimationName.is_empty(): AnimationName = DialogicUtil.get_project_setting('dialogic/animations/leave_default', - get_script().resource_path.get_base_dir().plus_file('DefaultAnimations/fade_out_down.gd')) + get_script().resource_path.get_base_dir().path_join('DefaultAnimations/fade_out_down.gd')) AnimationLength = DialogicUtil.get_project_setting('dialogic/animations/leave_default_length', 0.5) AnimationWait = DialogicUtil.get_project_setting('dialogic/animations/leave_default_wait', true) @@ -124,8 +124,8 @@ get_script().resource_path.get_base_dir().plus_file('DefaultAnimations/fade_out_ func get_required_subsystems() -> Array: return [ {'name':'Portraits', - 'subsystem': get_script().resource_path.get_base_dir().plus_file('Subsystem_Portraits.gd'), - 'settings': get_script().resource_path.get_base_dir().plus_file('PortraitSettings.tscn'), + 'subsystem': get_script().resource_path.get_base_dir().path_join('Subsystem_Portraits.gd'), + 'settings': get_script().resource_path.get_base_dir().path_join('PortraitSettings.tscn'), }, ] @@ -386,7 +386,7 @@ func get_animation_suggestions(search_text): func list_animations() -> Array: - var list = DialogicUtil.listdir(get_script().resource_path.get_base_dir().plus_file('DefaultAnimations'), true, false, true) + var list = DialogicUtil.listdir(get_script().resource_path.get_base_dir().path_join('DefaultAnimations'), true, false, true) list.append_array(DialogicUtil.listdir(DialogicUtil.get_project_setting('dialogic/animations/custom_folder', 'res://addons/dialogic_additions/Animations'), true, false, true)) return list diff --git a/addons/dialogic/Events/Choice/Display_ChoiceButton.gd b/addons/dialogic/Events/Choice/Display_ChoiceButton.gd index 87ad690f7..455fb37b2 100644 --- a/addons/dialogic/Events/Choice/Display_ChoiceButton.gd +++ b/addons/dialogic/Events/Choice/Display_ChoiceButton.gd @@ -1,6 +1,7 @@ extends Button -class_name DialogicNode_ChoiceButton, 'icon.png' +class_name DialogicDisplay_ChoiceButton + @export var choice_index:int = -1 diff --git a/addons/dialogic/Events/Choice/event.gd b/addons/dialogic/Events/Choice/event.gd index 9fba98c62..6010ef567 100644 --- a/addons/dialogic/Events/Choice/event.gd +++ b/addons/dialogic/Events/Choice/event.gd @@ -16,8 +16,8 @@ func _execute() -> void: func get_required_subsystems() -> Array: return [ {'name':'Choices', - 'subsystem': get_script().resource_path.get_base_dir().plus_file('Subsystem_Choices.gd'), - 'settings':get_script().resource_path.get_base_dir().plus_file('ChoicesSettings.tscn'), + 'subsystem': get_script().resource_path.get_base_dir().path_join('Subsystem_Choices.gd'), + 'settings':get_script().resource_path.get_base_dir().path_join('ChoicesSettings.tscn'), }, ] @@ -42,7 +42,7 @@ func is_expected_parent_event(event:DialogicEvent): # return a control node that should show on the END BRANCH node func get_end_branch_control() -> Control: - return load(get_script().resource_path.get_base_dir().plus_file('Choice_End.tscn')).instantiate() + return load(get_script().resource_path.get_base_dir().path_join('Choice_End.tscn')).instantiate() ################################################################################ ## SAVING/LOADING diff --git a/addons/dialogic/Events/Condition/event.gd b/addons/dialogic/Events/Condition/event.gd index ba7c573e4..6869c3a56 100644 --- a/addons/dialogic/Events/Condition/event.gd +++ b/addons/dialogic/Events/Condition/event.gd @@ -57,7 +57,7 @@ func _init() -> void: # return a control node that should show on the END BRANCH node func get_end_branch_control() -> Control: - return load(get_script().resource_path.get_base_dir().plus_file('Condition_End.tscn')).instantiate() + return load(get_script().resource_path.get_base_dir().path_join('Condition_End.tscn')).instantiate() ################################################################################ ## SAVING/LOADING diff --git a/addons/dialogic/Events/Converter/event.gd b/addons/dialogic/Events/Converter/event.gd index 1ed314943..69af59d5c 100644 --- a/addons/dialogic/Events/Converter/event.gd +++ b/addons/dialogic/Events/Converter/event.gd @@ -7,7 +7,7 @@ class_name DialogicConverterEvent func get_required_subsystems() -> Array: return [ {'name':'Converter', - 'subsystem': get_script().resource_path.get_base_dir().plus_file('Subsystem_Converter.gd'), - 'settings': get_script().resource_path.get_base_dir().plus_file('Settings_Converter.tscn') + 'subsystem': get_script().resource_path.get_base_dir().path_join('Subsystem_Converter.gd'), + 'settings': get_script().resource_path.get_base_dir().path_join('Settings_Converter.tscn') }, ] diff --git a/addons/dialogic/Events/Glossary/event.gd b/addons/dialogic/Events/Glossary/event.gd index 117bea4bd..87d62ddc0 100644 --- a/addons/dialogic/Events/Glossary/event.gd +++ b/addons/dialogic/Events/Glossary/event.gd @@ -8,8 +8,8 @@ func _execute() -> void: func get_required_subsystems() -> Array: return [ {'name':'Glossary', - 'subsystem': get_script().resource_path.get_base_dir().plus_file('Subsystem_Glossary.gd'), - 'settings': get_script().resource_path.get_base_dir().plus_file('SettingsEditor/Editor.tscn'), + 'subsystem': get_script().resource_path.get_base_dir().path_join('Subsystem_Glossary.gd'), + 'settings': get_script().resource_path.get_base_dir().path_join('SettingsEditor/Editor.tscn'), }, ] diff --git a/addons/dialogic/Events/Music/Display_MusicPlayer.gd b/addons/dialogic/Events/Music/Display_MusicPlayer.gd index a1c5a9985..5e8b5d6c1 100644 --- a/addons/dialogic/Events/Music/Display_MusicPlayer.gd +++ b/addons/dialogic/Events/Music/Display_MusicPlayer.gd @@ -1,6 +1,7 @@ extends AudioStreamPlayer -class_name DialogicNode_MusicPlayer, 'icon.png' +class_name DialogicDisplay_MusicPlayer + func _ready(): add_to_group('dialogic_music_player') diff --git a/addons/dialogic/Events/Music/Subsystem_Audio.gd b/addons/dialogic/Events/Music/Subsystem_Audio.gd index e9d4934b6..ab7fa5257 100644 --- a/addons/dialogic/Events/Music/Subsystem_Audio.gd +++ b/addons/dialogic/Events/Music/Subsystem_Audio.gd @@ -43,7 +43,7 @@ func update_music(path:String = '', volume:float = 0.0, audio_bus:String = "Mast add_child(prev_node) prev_node.play(node.get_playback_position()) prev_node.remove_from_group('dialogic_music_player') - fader.tween_method(interpolate_volume_linearly.bind(prev_node), db2linear(prev_node.volume_db),0.0,fade_time) + fader.tween_method(interpolate_volume_linearly.bind(prev_node), db_to_linear(prev_node.volume_db),0.0,fade_time) if path: node.stream = load(path) node.volume_db = volume @@ -57,7 +57,7 @@ func update_music(path:String = '', volume:float = 0.0, audio_bus:String = "Mast node.stream.loop_mode = AudioStreamWAV.LOOP_DISABLED node.play() - fader.parallel().tween_method(interpolate_volume_linearly.bind(node), 0.0,db2linear(volume),fade_time) + fader.parallel().tween_method(interpolate_volume_linearly.bind(node), 0.0,db_to_linear(volume),fade_time) else: node.stop() if prev_node: @@ -89,4 +89,4 @@ func stop_all_sounds() -> void: sound_player.queue_free() func interpolate_volume_linearly(value, node): - node.volume_db = linear2db(value) + node.volume_db = linear_to_db(value) diff --git a/addons/dialogic/Events/Music/event.gd b/addons/dialogic/Events/Music/event.gd index cf3c94dea..a749c7919 100644 --- a/addons/dialogic/Events/Music/event.gd +++ b/addons/dialogic/Events/Music/event.gd @@ -17,7 +17,7 @@ func _execute() -> void: func get_required_subsystems() -> Array: return [ {'name':'Audio', - 'subsystem': get_script().resource_path.get_base_dir().plus_file('Subsystem_Audio.gd'), + 'subsystem': get_script().resource_path.get_base_dir().path_join('Subsystem_Audio.gd'), }, ] diff --git a/addons/dialogic/Events/Position/event.gd b/addons/dialogic/Events/Position/event.gd index 86cbb001c..abf9d542a 100644 --- a/addons/dialogic/Events/Position/event.gd +++ b/addons/dialogic/Events/Position/event.gd @@ -33,7 +33,7 @@ func _execute() -> void: func get_required_subsystems() -> Array: return [ {'name':'Portraits', - 'subsystem': get_script().resource_path.get_base_dir().plus_file('Subsystem_Portraits.gd'), + 'subsystem': get_script().resource_path.get_base_dir().path_join('Subsystem_Portraits.gd'), }, ] diff --git a/addons/dialogic/Events/Save/Subsystem_Save.gd b/addons/dialogic/Events/Save/Subsystem_Save.gd index 2c51e9c20..dd9ffd8b3 100644 --- a/addons/dialogic/Events/Save/Subsystem_Save.gd +++ b/addons/dialogic/Events/Save/Subsystem_Save.gd @@ -47,7 +47,7 @@ func save_file(slot_name:String, file_name:String, data) -> int: add_empty_slot(slot_name) var file = File.new() - var err = file.open(SAVE_SLOTS_DIR.plus_file(slot_name).plus_file(file_name), File.WRITE) + var err = file.open(SAVE_SLOTS_DIR.path_join(slot_name).path_join(file_name), File.WRITE) if err == OK: file.store_var(data, true) file.close() @@ -58,7 +58,7 @@ func load_file(slot_name:String, file_name:String, default): if slot_name.is_empty(): return var file := File.new() - if file.open(get_slot_path(slot_name).plus_file(file_name), File.READ) != OK: + if file.open(get_slot_path(slot_name).path_join(file_name), File.READ) != OK: file.close() return default @@ -91,7 +91,7 @@ func has_slot(slot_name:String) -> bool: func remove_slot(slot_name:String) -> void: var directory := Directory.new() - if directory.open(SAVE_SLOTS_DIR.plus_file(slot_name)) != OK: + if directory.open(SAVE_SLOTS_DIR.path_join(slot_name)) != OK: print("[D] Error: Failed to access save folder '"+slot_name+"'.") return @@ -102,7 +102,7 @@ func remove_slot(slot_name:String) -> void: directory.remove(file_name) file_name = directory.get_next() # then delete folder - directory.remove(SAVE_SLOTS_DIR.plus_file(slot_name)) + directory.remove(SAVE_SLOTS_DIR.path_join(slot_name)) # this adds a new save folder with the given name func add_empty_slot(slot_name: String) -> void: @@ -122,7 +122,7 @@ func reset_slot(slot_name: String = '') -> void: save_file(slot_name, 'state.txt', file) func get_slot_path(slot_name:String) -> String: - return SAVE_SLOTS_DIR.plus_file(slot_name) + return SAVE_SLOTS_DIR.path_join(slot_name) func get_latest_slot() -> String: @@ -164,13 +164,13 @@ func take_slot_image() -> void: func store_slot_image(slot_name:String) -> void: if saved_image: - saved_image.save_png(get_slot_path(slot_name).plus_file('thumbnail.png')) + saved_image.save_png(get_slot_path(slot_name).path_join('thumbnail.png')) func get_slot_image(slot_name:String) -> ImageTexture: slot_name = this_or_current_slot(slot_name) if slot_name.is_empty(): return null var file = File.new() - if file.open(get_slot_path(slot_name).plus_file('thumbnail.png'), File.READ) == OK: + if file.open(get_slot_path(slot_name).path_join('thumbnail.png'), File.READ) == OK: var buffer = file.get_buffer(file.get_len()) file.close() diff --git a/addons/dialogic/Events/Save/event.gd b/addons/dialogic/Events/Save/event.gd index 8fddfea7a..08e76a5fe 100644 --- a/addons/dialogic/Events/Save/event.gd +++ b/addons/dialogic/Events/Save/event.gd @@ -13,8 +13,8 @@ func _execute() -> void: func get_required_subsystems() -> Array: return [ {'name':'Save', - 'subsystem': get_script().resource_path.get_base_dir().plus_file('Subsystem_Save.gd'), - 'settings': get_script().resource_path.get_base_dir().plus_file('Settings_Saving.tscn')}, + 'subsystem': get_script().resource_path.get_base_dir().path_join('Subsystem_Save.gd'), + 'settings': get_script().resource_path.get_base_dir().path_join('Settings_Saving.tscn')}, ] ################################################################################ diff --git a/addons/dialogic/Events/Sound/Display_SoundPlayer.gd b/addons/dialogic/Events/Sound/Display_SoundPlayer.gd index 4b21cf958..1fdccd3ba 100644 --- a/addons/dialogic/Events/Sound/Display_SoundPlayer.gd +++ b/addons/dialogic/Events/Sound/Display_SoundPlayer.gd @@ -1,6 +1,7 @@ extends AudioStreamPlayer -class_name DialogicNode_SoundPlayer, 'icon.png' +class_name DialogicDisplay_SoundPlayer + func _ready(): add_to_group('dialogic_sound_player') diff --git a/addons/dialogic/Events/Text/CharacterEdit_TypingSounds.gd b/addons/dialogic/Events/Text/CharacterEdit_TypingSounds.gd index 6ef2a5e1a..be9d1f354 100644 --- a/addons/dialogic/Events/Text/CharacterEdit_TypingSounds.gd +++ b/addons/dialogic/Events/Text/CharacterEdit_TypingSounds.gd @@ -51,7 +51,7 @@ func _on_AddMood_pressed(): emit_signal("changed") func create_mood_item(data): - var new_mood = load(get_script().resource_path.get_base_dir().plus_file('CharacterEdit_TypingSounds_MoodItem.tscn')).instantiate() + var new_mood = load(get_script().resource_path.get_base_dir().path_join('CharacterEdit_TypingSounds_MoodItem.tscn')).instantiate() %Moods.add_child(new_mood) new_mood.load_data(data) new_mood.duplicate.connect(duplicate_mood_item.bind(new_mood)) diff --git a/addons/dialogic/Events/Text/CharacterEdit_TypingSounds_MoodItem.gd b/addons/dialogic/Events/Text/CharacterEdit_TypingSounds_MoodItem.gd index 4c5d63a78..788187db5 100644 --- a/addons/dialogic/Events/Text/CharacterEdit_TypingSounds_MoodItem.gd +++ b/addons/dialogic/Events/Text/CharacterEdit_TypingSounds_MoodItem.gd @@ -6,18 +6,18 @@ signal changed func _ready(): add_theme_stylebox_override('panel', get_theme_stylebox("sub_inspector_bg12", "Editor")) - %Name.hint_tooltip = "Mood name" + %Name.tooltip_text = "Mood name" %Duplicate.icon = get_theme_icon("Duplicate", "EditorIcons") - %Duplicate.hint_tooltip = "Duplicate" + %Duplicate.tooltip_text = "Duplicate" %Duplicate.button_up.connect(emit_signal.bind("duplicate")) %Delete.icon = get_theme_icon("Remove", "EditorIcons") - %Delete.hint_tooltip = "Delete" + %Delete.tooltip_text = "Delete" %ChangeSoundFolderButton.icon = get_theme_icon("Folder", "EditorIcons") - %ChangeSoundFolderButton.hint_tooltip = "Change sounds folder" + %ChangeSoundFolderButton.tooltip_text = "Change sounds folder" %Fold.icon = get_theme_icon("GuiVisibilityVisible", "EditorIcons") - %Fold.hint_tooltip = "Fold/Unfold" + %Fold.tooltip_text = "Fold/Unfold" %Play.icon = get_theme_icon("Play", "EditorIcons") - %Play.hint_tooltip = "Preview" + %Play.tooltip_text = "Preview" _on_Fold_toggled(true) %Name.text_changed.connect(something_changed) @@ -29,7 +29,7 @@ func _ready(): func load_data(dict:Dictionary): %Name.text = dict.get('name', '') %SoundFolder.text = dict.get('sound_folder', '').get_file() - %SoundFolder.hint_tooltip = dict.get('sound_folder', '') + %SoundFolder.tooltip_text = dict.get('sound_folder', '') %PitchBase.value = dict.get('pitch_base', 1) %PitchVariance.value = dict.get('pitch_variance', 0) %VolumeBase.value = dict.get('volume_base', 0) @@ -39,7 +39,7 @@ func get_data(): var dict = {} dict['name'] = %Name.text - dict['sound_folder'] = %SoundFolder.hint_tooltip + dict['sound_folder'] = %SoundFolder.tooltip_text dict['pitch_base'] = %PitchBase.value dict['pitch_variance'] = %PitchVariance.value dict['volume_base'] = %VolumeBase.value @@ -64,7 +64,7 @@ func open_file_folder_dialog(): find_parent('EditorView').godot_file_dialog(file_folder_selected, '', EditorFileDialog.FILE_MODE_OPEN_DIR, 'Select folder with sounds') func file_folder_selected(path): - %SoundFolder.hint_tooltip = path + %SoundFolder.tooltip_text = path %SoundFolder.text = path.get_file() emit_signal("changed") diff --git a/addons/dialogic/Events/Text/Display_DialogText.gd b/addons/dialogic/Events/Text/Display_DialogText.gd index da9644f51..fcdaa4707 100644 --- a/addons/dialogic/Events/Text/Display_DialogText.gd +++ b/addons/dialogic/Events/Text/Display_DialogText.gd @@ -1,6 +1,7 @@ extends RichTextLabel -class_name DialogicNode_DialogText, "icon.png" +class_name DialogicDisplay_DialogText + enum ALIGNMENT {LEFT, CENTER, RIGHT} @@ -69,7 +70,7 @@ func continue_reveal() -> void: # shows all the text imidiatly # called by this thing itself or the DialogicGameHandler func finish_text() -> void: - percent_visible = 1 + visible_ratio = 1 execute_effects(true) timer.stop() Dialogic.current_state = Dialogic.states.IDLE diff --git a/addons/dialogic/Events/Text/event.gd b/addons/dialogic/Events/Text/event.gd index 40b2e4c71..729d0c322 100644 --- a/addons/dialogic/Events/Text/event.gd +++ b/addons/dialogic/Events/Text/event.gd @@ -86,9 +86,9 @@ func _execute() -> void: func get_required_subsystems() -> Array: return [ {'name':'Text', - 'subsystem': get_script().resource_path.get_base_dir().plus_file('Subsystem_Text.gd'), - 'settings': get_script().resource_path.get_base_dir().plus_file('Settings_DialogText.tscn'), - 'character_main':get_script().resource_path.get_base_dir().plus_file('CharacterEdit_TypingSounds.tscn') + 'subsystem': get_script().resource_path.get_base_dir().path_join('Subsystem_Text.gd'), + 'settings': get_script().resource_path.get_base_dir().path_join('Settings_DialogText.tscn'), + 'character_main':get_script().resource_path.get_base_dir().path_join('CharacterEdit_TypingSounds.tscn') }, ] diff --git a/addons/dialogic/Events/TextInput/event.gd b/addons/dialogic/Events/TextInput/event.gd index 47f0bbf6c..7dd3b9a6b 100644 --- a/addons/dialogic/Events/TextInput/event.gd +++ b/addons/dialogic/Events/TextInput/event.gd @@ -23,7 +23,7 @@ func _on_DialogicTextInput_input_confirmed(input:String) -> void: func get_required_subsystems() -> Array: return [ {'name':'TextInput', - 'subsystem': get_script().resource_path.get_base_dir().plus_file('Subsystem_TextInput.gd'), + 'subsystem': get_script().resource_path.get_base_dir().path_join('Subsystem_TextInput.gd'), }, ] diff --git a/addons/dialogic/Events/Theme/Display_Theme.gd b/addons/dialogic/Events/Theme/Display_Theme.gd index 1e33bad99..3a943c438 100644 --- a/addons/dialogic/Events/Theme/Display_Theme.gd +++ b/addons/dialogic/Events/Theme/Display_Theme.gd @@ -1,6 +1,7 @@ extends Control -class_name DialogicNode_Theme, 'icon.png' +class_name DialogicDisplay_Theme + @export var theme_name:String = 'Default' diff --git a/addons/dialogic/Events/Theme/event.gd b/addons/dialogic/Events/Theme/event.gd index 287b0ea25..3e81d1d76 100644 --- a/addons/dialogic/Events/Theme/event.gd +++ b/addons/dialogic/Events/Theme/event.gd @@ -16,8 +16,8 @@ func _execute() -> void: func get_required_subsystems() -> Array: return [ {'name':'Themes', - 'subsystem': get_script().resource_path.get_base_dir().plus_file('Subsystem_Themes.gd'), - 'character_main':get_script().resource_path.get_base_dir().plus_file('Theme_CharacterEdit.tscn') + 'subsystem': get_script().resource_path.get_base_dir().path_join('Subsystem_Themes.gd'), + 'character_main':get_script().resource_path.get_base_dir().path_join('Theme_CharacterEdit.tscn') }, ] diff --git a/addons/dialogic/Events/Variable/SettingsEditor/VariableField.gd b/addons/dialogic/Events/Variable/SettingsEditor/VariableField.gd index 58240296e..10951a9a7 100644 --- a/addons/dialogic/Events/Variable/SettingsEditor/VariableField.gd +++ b/addons/dialogic/Events/Variable/SettingsEditor/VariableField.gd @@ -2,7 +2,7 @@ extends PanelContainer var parent_Group = null -var preview_scene = get_script().resource_path.get_base_dir().plus_file("Preview.tscn") +var preview_scene = get_script().resource_path.get_base_dir().path_join("Preview.tscn") ################################################################################ ## FUNCTIONALITY diff --git a/addons/dialogic/Events/Variable/SettingsEditor/VariableGroup.gd b/addons/dialogic/Events/Variable/SettingsEditor/VariableGroup.gd index 767cbb146..15d80ebe8 100644 --- a/addons/dialogic/Events/Variable/SettingsEditor/VariableGroup.gd +++ b/addons/dialogic/Events/Variable/SettingsEditor/VariableGroup.gd @@ -2,9 +2,9 @@ extends PanelContainer @export var MainGroup: bool = false -var Group_scene = get_script().resource_path.get_base_dir().plus_file("VariableGroup.tscn") -var field_scene = get_script().resource_path.get_base_dir().plus_file("VariableField.tscn") -var preview_scene = get_script().resource_path.get_base_dir().plus_file("Preview.tscn") +var Group_scene = get_script().resource_path.get_base_dir().path_join("VariableGroup.tscn") +var field_scene = get_script().resource_path.get_base_dir().path_join("VariableField.tscn") +var preview_scene = get_script().resource_path.get_base_dir().path_join("Preview.tscn") var drag_preview = null @@ -150,15 +150,15 @@ func update(): %Dragger.texture = get_theme_icon("TripleBar", "EditorIcons") %NameEdit.add_theme_color_override("font_color_uneditable", get_theme_color('font_color', 'Label')) %DeleteButton.icon = get_theme_icon("Remove", "EditorIcons") - %DeleteButton.hint_tooltip = "Delete Group" + %DeleteButton.tooltip_text = "Delete Group" %DuplicateButton.icon = get_theme_icon("Duplicate", "EditorIcons") - %DuplicateButton.hint_tooltip = "Duplicate Group" + %DuplicateButton.tooltip_text = "Duplicate Group" %NewGroup.icon = get_theme_icon("Folder", "EditorIcons") - %NewGroup.hint_tooltip = "Add new Group" + %NewGroup.tooltip_text = "Add new Group" %NewVariable.icon = get_theme_icon("Add", "EditorIcons") - %NewVariable.hint_tooltip = "Add new variable" + %NewVariable.tooltip_text = "Add new variable" %FoldButton.icon = get_theme_icon("GuiVisibilityVisible", "EditorIcons") - %FoldButton.hint_tooltip = "Hide/Show content" + %FoldButton.tooltip_text = "Hide/Show content" func clear(): diff --git a/addons/dialogic/Events/Variable/event.gd b/addons/dialogic/Events/Variable/event.gd index 7ec0cf069..9b932690b 100644 --- a/addons/dialogic/Events/Variable/event.gd +++ b/addons/dialogic/Events/Variable/event.gd @@ -40,8 +40,8 @@ func _execute() -> void: func get_required_subsystems() -> Array: return [ {'name':'VAR', - 'subsystem': get_script().resource_path.get_base_dir().plus_file('Subsystem_Variables.gd'), - 'settings': get_script().resource_path.get_base_dir().plus_file('SettingsEditor/Editor.tscn'), + 'subsystem': get_script().resource_path.get_base_dir().path_join('Subsystem_Variables.gd'), + 'settings': get_script().resource_path.get_base_dir().path_join('SettingsEditor/Editor.tscn'), }, ] diff --git a/addons/dialogic/Events/Voice/event.gd b/addons/dialogic/Events/Voice/event.gd index 6fda8398d..167eb2c8a 100644 --- a/addons/dialogic/Events/Voice/event.gd +++ b/addons/dialogic/Events/Voice/event.gd @@ -71,6 +71,6 @@ func build_event_editor(): func get_required_subsystems() -> Array: return [ {'name':'Voice', - 'subsystem': get_script().resource_path.get_base_dir().plus_file('Subsystem_Voice.gd'), + 'subsystem': get_script().resource_path.get_base_dir().path_join('Subsystem_Voice.gd'), }, ] diff --git a/addons/dialogic/Example Assets/Keyboard Noises/typing1.wav.import b/addons/dialogic/Example Assets/Keyboard Noises/typing1.wav.import deleted file mode 100644 index 69eac1d14..000000000 --- a/addons/dialogic/Example Assets/Keyboard Noises/typing1.wav.import +++ /dev/null @@ -1,24 +0,0 @@ -[remap] - -importer="wav" -type="AudioStreamSample" -uid="uid://bhb6s6kike4pj" -path="res://.godot/imported/typing1.wav-2b5f7ff4b92a3095cea78f9fe320b576.sample" - -[deps] - -source_file="res://addons/dialogic/Example Assets/Keyboard Noises/typing1.wav" -dest_files=["res://.godot/imported/typing1.wav-2b5f7ff4b92a3095cea78f9fe320b576.sample"] - -[params] - -force/8_bit=false -force/mono=false -force/max_rate=false -force/max_rate_hz=44100 -edit/trim=false -edit/normalize=false -edit/loop_mode=0 -edit/loop_begin=0 -edit/loop_end=-1 -compress/mode=0 diff --git a/addons/dialogic/Example Assets/Keyboard Noises/typing2.wav.import b/addons/dialogic/Example Assets/Keyboard Noises/typing2.wav.import deleted file mode 100644 index 95aaa567a..000000000 --- a/addons/dialogic/Example Assets/Keyboard Noises/typing2.wav.import +++ /dev/null @@ -1,24 +0,0 @@ -[remap] - -importer="wav" -type="AudioStreamSample" -uid="uid://dhwhlv7tdr0cb" -path="res://.godot/imported/typing2.wav-9aa72a7616459678aceda5b0b03e480a.sample" - -[deps] - -source_file="res://addons/dialogic/Example Assets/Keyboard Noises/typing2.wav" -dest_files=["res://.godot/imported/typing2.wav-9aa72a7616459678aceda5b0b03e480a.sample"] - -[params] - -force/8_bit=false -force/mono=false -force/max_rate=false -force/max_rate_hz=44100 -edit/trim=false -edit/normalize=false -edit/loop_mode=0 -edit/loop_begin=0 -edit/loop_end=-1 -compress/mode=0 diff --git a/addons/dialogic/Example Assets/Keyboard Noises/typing3.wav.import b/addons/dialogic/Example Assets/Keyboard Noises/typing3.wav.import deleted file mode 100644 index 304d5d160..000000000 --- a/addons/dialogic/Example Assets/Keyboard Noises/typing3.wav.import +++ /dev/null @@ -1,24 +0,0 @@ -[remap] - -importer="wav" -type="AudioStreamSample" -uid="uid://blpfmsgi8yb18" -path="res://.godot/imported/typing3.wav-e77301ce145d318c0319e494a9be29c1.sample" - -[deps] - -source_file="res://addons/dialogic/Example Assets/Keyboard Noises/typing3.wav" -dest_files=["res://.godot/imported/typing3.wav-e77301ce145d318c0319e494a9be29c1.sample"] - -[params] - -force/8_bit=false -force/mono=false -force/max_rate=false -force/max_rate_hz=44100 -edit/trim=false -edit/normalize=false -edit/loop_mode=0 -edit/loop_begin=0 -edit/loop_end=-1 -compress/mode=0 diff --git a/addons/dialogic/Example Assets/Keyboard Noises/typing4.wav.import b/addons/dialogic/Example Assets/Keyboard Noises/typing4.wav.import deleted file mode 100644 index fd0b81c06..000000000 --- a/addons/dialogic/Example Assets/Keyboard Noises/typing4.wav.import +++ /dev/null @@ -1,24 +0,0 @@ -[remap] - -importer="wav" -type="AudioStreamSample" -uid="uid://cuwu87j4gqji1" -path="res://.godot/imported/typing4.wav-90e7f34cc4b5d1dbbdb0be6c0818723a.sample" - -[deps] - -source_file="res://addons/dialogic/Example Assets/Keyboard Noises/typing4.wav" -dest_files=["res://.godot/imported/typing4.wav-90e7f34cc4b5d1dbbdb0be6c0818723a.sample"] - -[params] - -force/8_bit=false -force/mono=false -force/max_rate=false -force/max_rate_hz=44100 -edit/trim=false -edit/normalize=false -edit/loop_mode=0 -edit/loop_begin=0 -edit/loop_end=-1 -compress/mode=0 diff --git a/addons/dialogic/Example Assets/Keyboard Noises/typing5.wav.import b/addons/dialogic/Example Assets/Keyboard Noises/typing5.wav.import deleted file mode 100644 index 3dcef859f..000000000 --- a/addons/dialogic/Example Assets/Keyboard Noises/typing5.wav.import +++ /dev/null @@ -1,24 +0,0 @@ -[remap] - -importer="wav" -type="AudioStreamSample" -uid="uid://dnn281405a8ub" -path="res://.godot/imported/typing5.wav-b4ebf7c64414e678ddf7b6e4ea882e4d.sample" - -[deps] - -source_file="res://addons/dialogic/Example Assets/Keyboard Noises/typing5.wav" -dest_files=["res://.godot/imported/typing5.wav-b4ebf7c64414e678ddf7b6e4ea882e4d.sample"] - -[params] - -force/8_bit=false -force/mono=false -force/max_rate=false -force/max_rate_hz=44100 -edit/trim=false -edit/normalize=false -edit/loop_mode=0 -edit/loop_begin=0 -edit/loop_end=-1 -compress/mode=0 diff --git a/addons/dialogic/Other/DialogicGameHandler.gd b/addons/dialogic/Other/DialogicGameHandler.gd index fd62c6834..188d891f9 100644 --- a/addons/dialogic/Other/DialogicGameHandler.gd +++ b/addons/dialogic/Other/DialogicGameHandler.gd @@ -114,7 +114,7 @@ func handle_event(event_index:int) -> void: if current_timeline_events[event_index].continue_at_end: #print(" -> WILL AUTO CONTINUE!") if not current_timeline_events[event_index].event_finished.is_connected(handle_next_event): - current_timeline_events[event_index].event_finished.connect(handle_next_event, CONNECT_ONESHOT) + current_timeline_events[event_index].event_finished.connect(handle_next_event, CONNECT_ONE_SHOT) current_timeline_events[event_index].execute(self) emit_signal('event_handled', current_timeline_events[event_index]) diff --git a/addons/dialogic/Other/DialogicUtil.gd b/addons/dialogic/Other/DialogicUtil.gd index 56322914a..32e60737c 100644 --- a/addons/dialogic/Other/DialogicUtil.gd +++ b/addons/dialogic/Other/DialogicUtil.gd @@ -19,12 +19,12 @@ static func listdir(path: String, files_only: bool = true, throw_error:bool = tr if files_only: if not dir.current_is_dir() and not file_name.ends_with('.import'): if full_file_path: - files.append(path.plus_file(file_name)) + files.append(path.path_join(file_name)) else: files.append(file_name) else: if full_file_path: - files.append(path.plus_file(file_name)) + files.append(path.path_join(file_name)) else: files.append(file_name) file_name = dir.get_next() diff --git a/addons/dialogic/Resources/CharacterResourceLoader.gd b/addons/dialogic/Resources/CharacterResourceLoader.gd index a1d5c6a74..64f86d9d5 100644 --- a/addons/dialogic/Resources/CharacterResourceLoader.gd +++ b/addons/dialogic/Resources/CharacterResourceLoader.gd @@ -36,7 +36,7 @@ func _load(path: String, original_path: String, use_sub_threads: bool, cache_mod push_error("For some reason, loading custom resource failed with error code: %s"%err) return err - var res = dict2inst(str2var(file.get_as_text())) + var res = dict_to_inst(str_to_var(file.get_as_text())) # Everything went well, and you parsed your file data into your resource. Life is good, return it return res diff --git a/addons/dialogic/Resources/CharacterResourceSaver.gd b/addons/dialogic/Resources/CharacterResourceSaver.gd index 1c9adc73a..38cabba04 100644 --- a/addons/dialogic/Resources/CharacterResourceSaver.gd +++ b/addons/dialogic/Resources/CharacterResourceSaver.gd @@ -27,7 +27,7 @@ func _save(resource: Resource, path: String = '', flags: int = 0) -> int: printerr('Can\'t write file: "%s"! code: %d.' % [path, err]) return err - var result = var2str(inst2dict(resource)) + var result = var_to_str(inst_to_dict(resource)) file.store_string(result) file.close() diff --git a/addons/dialogic/Resources/event.gd b/addons/dialogic/Resources/event.gd index 38fda038a..4d301b711 100644 --- a/addons/dialogic/Resources/event.gd +++ b/addons/dialogic/Resources/event.gd @@ -246,7 +246,7 @@ func to_text() -> String: elif typeof(get(params[parameter])) == TYPE_STRING: result_string += " "+parameter+'="'+get(params[parameter]).replace('=', "\\=")+'"' else: - result_string += " "+parameter+'="'+var2str(get(params[parameter])).replace('=', "\\=")+'"' + result_string += " "+parameter+'="'+var_to_str(get(params[parameter])).replace('=', "\\=")+'"' result_string += "]" return result_string @@ -264,7 +264,7 @@ func from_text(string:String) -> void: if typeof(data[parameter]) == TYPE_STRING and (data[parameter].ends_with(".dch")): set(params[parameter], load(data[parameter])) else: - var value = str2var(data[parameter].replace('\\=', '=')) if str2var(data[parameter].replace('\\=', '=')) != null else data[parameter].replace('\\=', '=') + var value = str_to_var(data[parameter].replace('\\=', '=')) if str_to_var(data[parameter].replace('\\=', '=')) != null else data[parameter].replace('\\=', '=') set(params[parameter], value) diff --git a/addons/dialogic/plugin.gd b/addons/dialogic/plugin.gd index ee9e9e68b..cf052aeb3 100644 --- a/addons/dialogic/plugin.gd +++ b/addons/dialogic/plugin.gd @@ -20,7 +20,7 @@ func _enter_tree(): _editor_view.plugin_reference = self _editor_view.hide() editor_interface = get_editor_interface() - get_editor_interface().get_editor_main_control().add_child(_editor_view) + get_editor_interface().get_editor_main_screen().add_child(_editor_view) _make_visible(false)