diff --git a/addons/dialogic/Modules/Core/subsystem_input.gd b/addons/dialogic/Modules/Core/subsystem_input.gd index 27124345e..e7b0bb08f 100644 --- a/addons/dialogic/Modules/Core/subsystem_input.gd +++ b/addons/dialogic/Modules/Core/subsystem_input.gd @@ -88,7 +88,7 @@ func handle_input() -> void: ## Unhandled Input is used for all NON-Mouse based inputs. func _unhandled_input(event:InputEvent) -> void: - if Input.is_action_pressed(ProjectSettings.get_setting('dialogic/text/input_action', 'dialogic_default_action')): + if Input.is_action_just_pressed(ProjectSettings.get_setting('dialogic/text/input_action', 'dialogic_default_action')): if event is InputEventMouse: return handle_input() @@ -97,7 +97,7 @@ func _unhandled_input(event:InputEvent) -> void: ## Input is used for all mouse based inputs. ## If any DialogicInputNode is present this won't do anything (because that node handles MouseInput then). func _input(event:InputEvent) -> void: - if Input.is_action_pressed(ProjectSettings.get_setting('dialogic/text/input_action', 'dialogic_default_action')): + if Input.is_action_just_pressed(ProjectSettings.get_setting('dialogic/text/input_action', 'dialogic_default_action')): if not event is InputEventMouse or get_tree().get_nodes_in_group('dialogic_input').any(func(node):return node.is_visible_in_tree()): return diff --git a/addons/dialogic/Modules/Text/event_text.gd b/addons/dialogic/Modules/Text/event_text.gd index 459f525de..4bf71f7c9 100644 --- a/addons/dialogic/Modules/Text/event_text.gd +++ b/addons/dialogic/Modules/Text/event_text.gd @@ -103,6 +103,7 @@ func _execute() -> void: reveal_next_segment = false for section_idx in range(min(dialogic.current_state_info['text_sub_idx'], len(split_text)-1), len(split_text)): + dialogic.Inputs.block_input(ProjectSettings.get_setting('dialogic/text/text_reveal_skip_delay', 0.1)) if reveal_next_segment: dialogic.Text.hide_next_indicators() @@ -218,12 +219,10 @@ func _on_dialogic_input_action() -> void: if dialogic.Text.is_text_reveal_skippable(): dialogic.Text.skip_text_reveal() dialogic.Inputs.stop_timers() - dialogic.Inputs.block_input(ProjectSettings.get_setting('dialogic/text/text_reveal_skip_delay', 0.1)) _: if dialogic.Inputs.manual_advance.is_enabled(): advance.emit() dialogic.Inputs.stop_timers() - dialogic.Inputs.block_input(ProjectSettings.get_setting('dialogic/text/text_reveal_skip_delay', 0.1)) func _on_dialogic_input_autoadvance() -> void: diff --git a/addons/dialogic/Modules/Text/node_dialog_text.gd b/addons/dialogic/Modules/Text/node_dialog_text.gd index 30cf27372..5d83d32ce 100644 --- a/addons/dialogic/Modules/Text/node_dialog_text.gd +++ b/addons/dialogic/Modules/Text/node_dialog_text.gd @@ -118,8 +118,7 @@ func continue_reveal() -> void: finish_text() # if the text finished organically, add a small input block # this prevents accidental skipping when you expected the text to be longer - # TODO! Make this configurable in the settings! - DialogicUtil.autoload().Inputs.block_input(0.3) + DialogicUtil.autoload().Inputs.block_input(ProjectSettings.get_setting('dialogic/text/advance_delay', 0.1)) ## Reveals the entire text instantly. diff --git a/addons/dialogic/Modules/Text/settings_text.gd b/addons/dialogic/Modules/Text/settings_text.gd index f18576902..4a2cd779d 100644 --- a/addons/dialogic/Modules/Text/settings_text.gd +++ b/addons/dialogic/Modules/Text/settings_text.gd @@ -3,6 +3,31 @@ extends DialogicSettingsPage var autopause_sets := {} +const _SETTING_LETTER_SPEED := 'dialogic/text/letter_speed' + +const _SETTING_INPUT_ACTION := 'dialogic/text/input_action' + +const _SETTING_TEXT_REVEAL_SKIPPABLE := 'dialogic/text/initial_text_reveal_skippable' +const _SETTING_TEXT_REVEAL_SKIPPABLE_DELAY := 'dialogic/text/text_reveal_skip_delay' +const _SETTING_TEXT_ADVANCE_DELAY := 'dialogic/text/advance_delay' + +const _SETTING_AUTOCOLOR_NAMES := 'dialogic/text/autocolor_names' +const _SETTING_SPLIT_AT_NEW_LINES := 'dialogic/text/split_at_new_lines' +const _SETTING_SPLIT_AT_NEW_LINES_AS := 'dialogic/text/split_at_new_lines_as' + +const _SETTING_AUTOSKIP_TIME_PER_EVENT := 'dialogic/text/autoskip_time_per_event' + +const _SETTING_AUTOADVANCE_ENABLED := 'dialogic/text/autoadvance_enabled' +const _SETTING_AUTOADVANCE_FIXED_DELAY := 'dialogic/text/autoadvance_fixed_delay' +const _SETTING_AUTOADVANCE_WORD_DELAY := 'dialogic/text/autoadvance_per_word_delay' +const _SETTING_AUTOADVANCE_CHARACTER_DELAY := 'dialogic/text/autoadvance_per_character_delay' +const _SETTING_AUTOADVANCE_IGNORED_CHARACTERS_ENABLED := 'dialogic/text/autoadvance_ignored_characters_enabled' +const _SETTING_AUTOADVANCE_IGNORED_CHARACTERS := 'dialogic/text/autoadvance_ignored_characters' + +const _SETTING_ABSOLUTE_AUTOPAUSES := 'dialogic/text/absolute_autopauses' +const _SETTING_AUTOPAUSES := 'dialogic/text/autopauses' + + func _get_priority() -> int: return 98 @@ -11,16 +36,49 @@ func _get_title() -> String: return "Text" +func _ready() -> void: + %DefaultSpeed.value_changed.connect(_on_float_set.bind(_SETTING_LETTER_SPEED)) + + %Skippable.toggled.connect(_on_bool_set.bind(_SETTING_TEXT_REVEAL_SKIPPABLE)) + %SkippableDelay.value_changed.connect(_on_float_set.bind(_SETTING_TEXT_REVEAL_SKIPPABLE_DELAY)) + %AdvanceDelay.value_changed.connect(_on_float_set.bind(_SETTING_TEXT_ADVANCE_DELAY)) + + %AutocolorNames.toggled.connect(_on_bool_set.bind(_SETTING_AUTOCOLOR_NAMES)) + + %NewEvents.toggled.connect(_on_bool_set.bind(_SETTING_SPLIT_AT_NEW_LINES)) + + %AutoAdvance.toggled.connect(_on_bool_set.bind(_SETTING_AUTOADVANCE_ENABLED)) + %FixedDelay.value_changed.connect(_on_float_set.bind(_SETTING_AUTOADVANCE_FIXED_DELAY)) + %IgnoredCharactersEnabled.toggled.connect(_on_bool_set.bind(_SETTING_AUTOADVANCE_IGNORED_CHARACTERS_ENABLED)) + + %AutoskipTimePerEvent.value_changed.connect(_on_float_set.bind(_SETTING_AUTOSKIP_TIME_PER_EVENT)) + + %AutoPausesAbsolute.toggled.connect(_on_bool_set.bind(_SETTING_ABSOLUTE_AUTOPAUSES)) + + func _refresh() -> void: - %DefaultSpeed.value = ProjectSettings.get_setting('dialogic/text/letter_speed', 0.01) - %Skippable.button_pressed = ProjectSettings.get_setting('dialogic/text/initial_text_reveal_skippable', true) - %SkippableDelay.value = ProjectSettings.get_setting('dialogic/text/text_reveal_skip_delay', 0.1) + ## BEHAVIOUR + %DefaultSpeed.value = ProjectSettings.get_setting(_SETTING_LETTER_SPEED, 0.01) + + %InputAction.resource_icon = get_theme_icon(&"Mouse", &"EditorIcons") + %InputAction.set_value(ProjectSettings.get_setting(_SETTING_INPUT_ACTION, &'dialogic_default_action')) + %InputAction.get_suggestions_func = suggest_actions + + %Skippable.button_pressed = ProjectSettings.get_setting(_SETTING_TEXT_REVEAL_SKIPPABLE, true) + %SkippableDelay.value = ProjectSettings.get_setting(_SETTING_TEXT_REVEAL_SKIPPABLE_DELAY, 0.1) + %AdvanceDelay.value = ProjectSettings.get_setting(_SETTING_TEXT_ADVANCE_DELAY, 0.1) - %AutoAdvance.button_pressed = ProjectSettings.get_setting('dialogic/text/autoadvance_enabled', false) - %FixedDelay.value = ProjectSettings.get_setting('dialogic/text/autoadvance_fixed_delay', 1) + %AutocolorNames.button_pressed = ProjectSettings.get_setting(_SETTING_AUTOCOLOR_NAMES, false) - var per_character_delay: float = ProjectSettings.get_setting('dialogic/text/autoadvance_per_character_delay', 0.1) - var per_word_delay: float = ProjectSettings.get_setting('dialogic/text/autoadvance_per_word_delay', 0) + %NewEvents.button_pressed = ProjectSettings.get_setting(_SETTING_SPLIT_AT_NEW_LINES, false) + %NewEventOption.select(ProjectSettings.get_setting(_SETTING_SPLIT_AT_NEW_LINES_AS, 0)) + + ## AUTO-ADVANCE + %AutoAdvance.button_pressed = ProjectSettings.get_setting(_SETTING_AUTOADVANCE_ENABLED, false) + %FixedDelay.value = ProjectSettings.get_setting(_SETTING_AUTOADVANCE_FIXED_DELAY, 1) + + var per_character_delay: float = ProjectSettings.get_setting(_SETTING_AUTOADVANCE_CHARACTER_DELAY, 0.1) + var per_word_delay: float = ProjectSettings.get_setting(_SETTING_AUTOADVANCE_WORD_DELAY, 0) if per_character_delay == 0 and per_word_delay == 0: _on_additional_delay_mode_item_selected(0) elif per_word_delay == 0: @@ -28,42 +86,58 @@ func _refresh() -> void: else: _on_additional_delay_mode_item_selected(1, per_word_delay) - %IgnoredCharactersEnabled.button_pressed = ProjectSettings.get_setting('dialogic/text/autoadvance_ignored_characters_enabled', true) - + %IgnoredCharactersEnabled.button_pressed = ProjectSettings.get_setting(_SETTING_AUTOADVANCE_IGNORED_CHARACTERS_ENABLED, true) var ignored_characters: String = '' - var ignored_characters_dict: Dictionary = ProjectSettings.get_setting('dialogic/text/autoadvance_ignored_characters', {}) - + var ignored_characters_dict: Dictionary = ProjectSettings.get_setting(_SETTING_AUTOADVANCE_IGNORED_CHARACTERS, {}) for ignored_character in ignored_characters_dict.keys(): ignored_characters += ignored_character - %IgnoredCharacters.text = ignored_characters - %AutoskipTimePerEvent.value = ProjectSettings.get_setting('dialogic/text/autoskip_time_per_event', 0.1) + ## AUTO-SKIP + %AutoskipTimePerEvent.value = ProjectSettings.get_setting(_SETTING_AUTOSKIP_TIME_PER_EVENT, 0.1) - %AutocolorNames.button_pressed = ProjectSettings.get_setting('dialogic/text/autocolor_names', false) - %InputAction.resource_icon = get_theme_icon("Mouse", "EditorIcons") - %InputAction.set_value(ProjectSettings.get_setting('dialogic/text/input_action', 'dialogic_default_action')) - %InputAction.get_suggestions_func = suggest_actions - - %AutoPausesAbsolute.button_pressed = ProjectSettings.get_setting('dialogic/text/absolute_autopauses', false) - %NewEvents.button_pressed = ProjectSettings.get_setting('dialogic/text/split_at_new_lines', false) - %NewEventOption.select(ProjectSettings.get_setting('dialogic/text/split_at_new_lines_as', 0)) - load_autopauses(ProjectSettings.get_setting('dialogic/text/autopauses', {})) + ## AUTO-PAUSES + %AutoPausesAbsolute.button_pressed = ProjectSettings.get_setting(_SETTING_ABSOLUTE_AUTOPAUSES, false) + load_autopauses(ProjectSettings.get_setting(_SETTING_AUTOPAUSES, {})) -func _about_to_close(): +func _about_to_close() -> void: save_autopauses() -func _on_Autoadvance_toggled(button_pressed): - ProjectSettings.set_setting('dialogic/text/autoadvance_enabled', button_pressed) +func _on_bool_set(button_pressed:bool, setting:String) -> void: + ProjectSettings.set_setting(setting, button_pressed) + ProjectSettings.save() + + +func _on_float_set(value:float, setting:String) -> void: + ProjectSettings.set_setting(setting, value) ProjectSettings.save() -func _on_FixedDelay_value_changed(value): - ProjectSettings.set_setting('dialogic/text/autoadvance_fixed_delay', value) +#region BEHAVIOUR +################################################################################ + +func _on_InputAction_value_changed(property_name:String, value:String) -> void: + ProjectSettings.set_setting(_SETTING_INPUT_ACTION, value) + ProjectSettings.save() + +func suggest_actions(search:String) -> Dictionary: + var suggs := {} + for prop in ProjectSettings.get_property_list(): + if prop.name.begins_with('input/') and not prop.name.begins_with('input/ui_') : + suggs[prop.name.trim_prefix('input/')] = {'value':prop.name.trim_prefix('input/')} + return suggs + + +func _on_new_event_option_item_selected(index:int) -> void: + ProjectSettings.set_setting(_SETTING_SPLIT_AT_NEW_LINES_AS, index) ProjectSettings.save() +#endregion + +#region AUTO-ADVANCE +################################################################################ func _on_additional_delay_mode_item_selected(index:int, delay:float=-1) -> void: %AdditionalDelayMode.selected = index @@ -71,84 +145,48 @@ func _on_additional_delay_mode_item_selected(index:int, delay:float=-1) -> void: 0: # NONE %AdditionalDelay.hide() %AutoadvanceIgnoreCharacters.hide() - ProjectSettings.set_setting('dialogic/text/autoadvance_per_word_delay', 0) - ProjectSettings.set_setting('dialogic/text/autoadvance_per_character_delay', 0) + ProjectSettings.set_setting(_SETTING_AUTOADVANCE_WORD_DELAY, 0) + ProjectSettings.set_setting(_SETTING_AUTOADVANCE_CHARACTER_DELAY, 0) 1: # PER WORD %AdditionalDelay.show() %AutoadvanceIgnoreCharacters.hide() if delay != -1: %AdditionalDelay.value = delay else: - ProjectSettings.set_setting('dialogic/text/autoadvance_per_word_delay', %AdditionalDelay.value) - ProjectSettings.set_setting('dialogic/text/autoadvance_per_character_delay', 0) + ProjectSettings.set_setting(_SETTING_AUTOADVANCE_WORD_DELAY, %AdditionalDelay.value) + ProjectSettings.set_setting(_SETTING_AUTOADVANCE_CHARACTER_DELAY, 0) 2: # PER CHARACTER %AdditionalDelay.show() %AutoadvanceIgnoreCharacters.show() if delay != -1: %AdditionalDelay.value = delay else: - ProjectSettings.set_setting('dialogic/text/autoadvance_per_character_delay', %AdditionalDelay.value) - ProjectSettings.set_setting('dialogic/text/autoadvance_per_word_delay', 0) + ProjectSettings.set_setting(_SETTING_AUTOADVANCE_CHARACTER_DELAY, %AdditionalDelay.value) + ProjectSettings.set_setting(_SETTING_AUTOADVANCE_WORD_DELAY, 0) ProjectSettings.save() func _on_additional_delay_value_changed(value:float) -> void: match %AdditionalDelayMode.selected: 0: # NONE - ProjectSettings.set_setting('dialogic/text/autoadvance_per_character_delay', 0) - ProjectSettings.set_setting('dialogic/text/autoadvance_per_word_delay', 0) + ProjectSettings.set_setting(_SETTING_AUTOADVANCE_CHARACTER_DELAY, 0) + ProjectSettings.set_setting(_SETTING_AUTOADVANCE_WORD_DELAY, 0) 1: # PER WORD - ProjectSettings.set_setting('dialogic/text/autoadvance_per_word_delay', value) + ProjectSettings.set_setting(_SETTING_AUTOADVANCE_WORD_DELAY, value) 2: # PER CHARACTER - ProjectSettings.set_setting('dialogic/text/autoadvance_per_character_delay', value) - ProjectSettings.save() - - -func _on_IgnoredCharactersEnabled_toggled(button_pressed): - ProjectSettings.set_setting('dialogic/text/autoadvance_ignored_characters_enabled', button_pressed) + ProjectSettings.set_setting(_SETTING_AUTOADVANCE_CHARACTER_DELAY, value) ProjectSettings.save() func _on_IgnoredCharacters_text_changed(text_input): - ProjectSettings.set_setting('dialogic/text/autoadvance_ignored_characters', DialogicUtil.str_to_hash_set(text_input)) - ProjectSettings.save() - - -func _on_Skippable_toggled(button_pressed): - ProjectSettings.set_setting('dialogic/text/initial_text_reveal_skippable', button_pressed) - ProjectSettings.save() - - -func _on_skippable_delay_value_changed(value: float) -> void: - ProjectSettings.set_setting('dialogic/text/text_reveal_skip_delay', value) - ProjectSettings.save() - - -func _on_DefaultSpeed_value_changed(value): - ProjectSettings.set_setting('dialogic/text/letter_speed', value) - ProjectSettings.save() - -func _on_AutoskipTimePerEvent_value_changed(value: float) -> void: - ProjectSettings.set_setting('dialogic/text/autoskip_time_per_event', value) - ProjectSettings.save() - -func _on_InputAction_value_changed(property_name, value): - ProjectSettings.set_setting('dialogic/text/input_action', value) + ProjectSettings.set_setting(_SETTING_AUTOADVANCE_IGNORED_CHARACTERS, DialogicUtil.str_to_hash_set(text_input)) ProjectSettings.save() +#endregion -func suggest_actions(search:String) -> Dictionary: - var suggs := {} - for prop in ProjectSettings.get_property_list(): - if prop.name.begins_with('input/'): - suggs[prop.name.trim_prefix('input/')] = {'value':prop.name.trim_prefix('input/')} - return suggs - - -func _on_AutocolorNames_toggled(button_pressed:bool) -> void: - ProjectSettings.set_setting('dialogic/text/autocolor_names', button_pressed) - ProjectSettings.save() +## AUTO-PAUSES +################################################################################ func load_autopauses(dictionary:Dictionary) -> void: for i in %AutoPauseSets.get_children(): @@ -159,21 +197,20 @@ func load_autopauses(dictionary:Dictionary) -> void: add_autopause_set(i, dictionary[i]) - func save_autopauses() -> void: var dictionary := {} for i in autopause_sets: if is_instance_valid(autopause_sets[i].time): dictionary[autopause_sets[i].text.text] = autopause_sets[i].time.value - ProjectSettings.set_setting('dialogic/text/autopauses', dictionary) + ProjectSettings.set_setting(_SETTING_AUTOPAUSES, dictionary) ProjectSettings.save() -func _on_add_autopauses_set_pressed(): +func _on_add_autopauses_set_pressed() -> void: add_autopause_set('', 0.1) -func add_autopause_set(text:String, time:float) -> void: +func add_autopause_set(text: String, time: float) -> void: var info := {} var line_edit := LineEdit.new() line_edit.size_flags_horizontal = Control.SIZE_EXPAND_FILL @@ -189,30 +226,15 @@ func add_autopause_set(text:String, time:float) -> void: %AutoPauseSets.add_child(spin_box) var remove_btn := Button.new() - remove_btn.icon = get_theme_icon('Remove', 'EditorIcons') + remove_btn.icon = get_theme_icon(&'Remove', &'EditorIcons') remove_btn.pressed.connect(_on_remove_autopauses_set_pressed.bind(len(autopause_sets))) info['delete'] = remove_btn %AutoPauseSets.add_child(remove_btn) autopause_sets[len(autopause_sets)] = info -func _on_remove_autopauses_set_pressed(index:int) -> void: +func _on_remove_autopauses_set_pressed(index: int) -> void: for key in autopause_sets[index]: autopause_sets[index][key].queue_free() autopause_sets.erase(index) - -func _on_auto_pauses_absolute_toggled(button_pressed:bool) -> void: - ProjectSettings.set_setting('dialogic/text/absolute_autopauses', button_pressed) - ProjectSettings.save() - - -func _on_new_events_toggled(button_pressed:bool) -> void: - ProjectSettings.set_setting('dialogic/text/split_at_new_lines', button_pressed) - ProjectSettings.save() - - -func _on_new_event_option_item_selected(index:int) -> void: - ProjectSettings.set_setting('dialogic/text/split_at_new_lines_as', index) - ProjectSettings.save() - diff --git a/addons/dialogic/Modules/Text/settings_text.tscn b/addons/dialogic/Modules/Text/settings_text.tscn index a54748a6f..509c6ae07 100644 --- a/addons/dialogic/Modules/Text/settings_text.tscn +++ b/addons/dialogic/Modules/Text/settings_text.tscn @@ -4,7 +4,7 @@ [ext_resource type="PackedScene" uid="uid://dpwhshre1n4t6" path="res://addons/dialogic/Editor/Events/Fields/field_options_dynamic.tscn" id="3"] [ext_resource type="PackedScene" uid="uid://dbpkta2tjsqim" path="res://addons/dialogic/Editor/Common/hint_tooltip_icon.tscn" id="3_s7xhj"] -[sub_resource type="Image" id="Image_oatpr"] +[sub_resource type="Image" id="Image_0sqes"] data = { "data": PackedByteArray(255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 94, 94, 127, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 93, 93, 255, 255, 94, 94, 127, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 94, 94, 127, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 94, 94, 127, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 231, 255, 94, 94, 54, 255, 94, 94, 57, 255, 93, 93, 233, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 231, 255, 94, 94, 54, 255, 94, 94, 57, 255, 93, 93, 233, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 97, 97, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 97, 97, 42, 255, 93, 93, 233, 255, 93, 93, 232, 255, 93, 93, 41, 255, 255, 255, 0, 255, 255, 255, 0, 255, 97, 97, 42, 255, 93, 93, 233, 255, 93, 93, 232, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 96, 96, 45, 255, 93, 93, 44, 255, 255, 255, 0, 255, 97, 97, 42, 255, 97, 97, 42, 255, 255, 255, 0, 255, 96, 96, 45, 255, 93, 93, 44, 255, 255, 255, 0, 255, 97, 97, 42, 255, 97, 97, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 96, 96, 45, 255, 93, 93, 235, 255, 94, 94, 234, 255, 95, 95, 43, 255, 255, 255, 0, 255, 255, 255, 0, 255, 96, 96, 45, 255, 93, 93, 235, 255, 94, 94, 234, 255, 95, 95, 43, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 235, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 233, 255, 95, 95, 59, 255, 96, 96, 61, 255, 93, 93, 235, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 233, 255, 95, 95, 59, 255, 96, 96, 61, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0), "format": "RGBA8", @@ -13,8 +13,8 @@ data = { "width": 16 } -[sub_resource type="ImageTexture" id="ImageTexture_dbvsu"] -image = SubResource("Image_oatpr") +[sub_resource type="ImageTexture" id="ImageTexture_3xcp4"] +image = SubResource("Image_0sqes") [node name="DialogText" type="VBoxContainer"] anchors_preset = 15 @@ -48,7 +48,7 @@ text = "Default letter speed" [node name="HintTooltip2" parent="VBoxContainer/VBox/DefaultSpeedLabel" instance=ExtResource("3_s7xhj")] layout_mode = 2 tooltip_text = "The speed in seconds per character. A speed of 0 will reveal the full text instantly (still taking pauses into consideration)." -texture = SubResource("ImageTexture_dbvsu") +texture = SubResource("ImageTexture_3xcp4") hint_text = "The speed in seconds per character. A speed of 0 will reveal the full text instantly (still taking pauses into consideration)." [node name="DefaultSpeed" type="SpinBox" parent="VBoxContainer/VBox"] @@ -67,7 +67,7 @@ text = "Input action" layout_mode = 2 tooltip_text = "The action that skips text and generally advances to the next event. You can modify actions in the Project Settings > Input Map." -texture = SubResource("ImageTexture_dbvsu") +texture = SubResource("ImageTexture_3xcp4") hint_text = "The action that skips text and generally advances to the next event. You can modify actions in the Project Settings > Input Map." @@ -86,12 +86,10 @@ text = "Text Reveal Skippable" [node name="HintTooltip4" parent="VBoxContainer/VBox/HBoxContainer" instance=ExtResource("3_s7xhj")] layout_mode = 2 tooltip_text = "If enabled the revealing of text can be skipped with the input action. -If disabled you can only advance to the next event when revealing has finnished. -To avoid rapid skipping, you can shortly block skipping with a delay." -texture = SubResource("ImageTexture_dbvsu") +If disabled you can only advance to the next event when revealing has finnished." +texture = SubResource("ImageTexture_3xcp4") hint_text = "If enabled the revealing of text can be skipped with the input action. -If disabled you can only advance to the next event when revealing has finnished. -To avoid rapid skipping, you can shortly block skipping with a delay." +If disabled you can only advance to the next event when revealing has finnished." [node name="Skippable" type="HBoxContainer" parent="VBoxContainer/VBox"] layout_mode = 2 @@ -100,11 +98,51 @@ layout_mode = 2 unique_name_in_owner = true layout_mode = 2 -[node name="SkippableDelay" type="SpinBox" parent="VBoxContainer/VBox/Skippable"] +[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer/VBox/Skippable"] +layout_mode = 2 + +[node name="Label3" type="Label" parent="VBoxContainer/VBox/Skippable/HBoxContainer2"] +layout_mode = 2 +text = "Skip Delay:" + +[node name="HintTooltip4" parent="VBoxContainer/VBox/Skippable/HBoxContainer2" instance=ExtResource("3_s7xhj")] +layout_mode = 2 +tooltip_text = "Delay before you can skip. + +Use this to prevent users from skipping through your timeline to quickly." +texture = SubResource("ImageTexture_3xcp4") +hint_text = "Delay before you can skip. + +Use this to prevent users from skipping through your timeline too quickly." + +[node name="SkippableDelay" type="SpinBox" parent="VBoxContainer/VBox/Skippable/HBoxContainer2"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +step = 0.01 +suffix = "s" + +[node name="HBoxContainer3" type="HBoxContainer" parent="VBoxContainer/VBox/Skippable"] +layout_mode = 2 + +[node name="Label3" type="Label" parent="VBoxContainer/VBox/Skippable/HBoxContainer3"] +layout_mode = 2 +text = "Advance Delay:" + +[node name="HintTooltip4" parent="VBoxContainer/VBox/Skippable/HBoxContainer3" instance=ExtResource("3_s7xhj")] +layout_mode = 2 +tooltip_text = "Delay before you can advance (if the text finishes revealing on it's own). + +This is used to prevent players from advancing when they actually wanted to skip the revealing, but did so very shortly after the text was already fully revealed." +texture = SubResource("ImageTexture_3xcp4") +hint_text = "Delay before you can advance (only if the text finishes revealing on it's own). + +This is used to prevent players from advancing when they actually wanted to skip the revealing, but did so very shortly after the text was already fully revealed." + +[node name="AdvanceDelay" type="SpinBox" parent="VBoxContainer/VBox/Skippable/HBoxContainer3"] unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 3 -tooltip_text = "Delay before you can skip again" step = 0.01 suffix = "s" @@ -118,7 +156,7 @@ text = "Autocolor names" [node name="HintTooltip5" parent="VBoxContainer/VBox/ColorNames" instance=ExtResource("3_s7xhj")] layout_mode = 2 tooltip_text = "If enabled character names will be colored in the characters color in text events." -texture = SubResource("ImageTexture_dbvsu") +texture = SubResource("ImageTexture_3xcp4") hint_text = "If enabled character names will be colored in the characters color in text events." [node name="AutocolorNames" type="CheckBox" parent="VBoxContainer/VBox"] @@ -136,7 +174,7 @@ text = "New lines as new events" layout_mode = 2 tooltip_text = "If enabled dialogic, new lines will be treated as [n] effects, seemingly waiting for input before starting a new text." -texture = SubResource("ImageTexture_dbvsu") +texture = SubResource("ImageTexture_3xcp4") hint_text = "If enabled dialogic, new lines will be treated as [n] effects, seemingly waiting for input before starting a new text." @@ -181,7 +219,7 @@ These add up, so if any of them is true, Auto-Advance will happen. Unless manual advancement is disabled, the Auto-Advance time can always be skipped by the player. The Auto-Advance will wait for Voice audio to finish playing. This behaviour can be disabled via code. " -texture = SubResource("ImageTexture_dbvsu") +texture = SubResource("ImageTexture_3xcp4") hint_text = "Autoadvance is the concept of automatically progressing to the next event upon completing text display, usually after a certain delay. You can enabled Auto-Advance from code using either: @@ -207,7 +245,7 @@ text = "Base Delay" [node name="HintTooltip" parent="VBoxContainer/AutoadvanceSettings/HBox_BaseDelay2" instance=ExtResource("3_s7xhj")] layout_mode = 2 tooltip_text = "This is the base delay for autoadvancment." -texture = SubResource("ImageTexture_dbvsu") +texture = SubResource("ImageTexture_3xcp4") hint_text = "This is the base delay for autoadvancment." [node name="FixedDelay" type="SpinBox" parent="VBoxContainer/AutoadvanceSettings"] @@ -230,7 +268,7 @@ layout_mode = 2 tooltip_text = "An additional delay per character or word can be added. Note: When changing values via code, you can actually use both modes simultaniously." -texture = SubResource("ImageTexture_dbvsu") +texture = SubResource("ImageTexture_3xcp4") hint_text = "An additional delay per character or word can be added. Note: When changing values via code, you can actually use both modes simultaniously." @@ -270,7 +308,7 @@ tooltip_text = "An ignored character will add no delay, this is useful to exclud If disabled, the general line of text length will be used, stripping the BBCode tags first. If enabled, the text will be scanned and the matching characters will be skipped." -texture = SubResource("ImageTexture_dbvsu") +texture = SubResource("ImageTexture_3xcp4") hint_text = "An ignored character will add no delay, this is useful to exclude interpunction and whitespaces. If disabled, the general line of text length will be used, stripping the BBCode tags first. @@ -298,7 +336,7 @@ layout_mode = 2 tooltip_text = "While you would usually enable Auto-Advance via code, if this is true it will be initially enabled. This kind of Auto-Advance (system) only stops when disabled via code. " -texture = SubResource("ImageTexture_dbvsu") +texture = SubResource("ImageTexture_3xcp4") hint_text = "While you would usually enable Auto-Advance via code, if this is true it will be initially enabled. This kind of Auto-Advance (system) only stops when disabled via code. " @@ -328,7 +366,7 @@ Dialogic.Inputsauto_skip.enabled = true By default, Auto-Skip will cancel on user input. You can disable this by calling: Dialogic.Inputsauto_skip.disable_on_user_input = false" -texture = SubResource("ImageTexture_dbvsu") +texture = SubResource("ImageTexture_3xcp4") hint_text = "Auto-Skip is the concept of automatically skipping Timeline Events to the next unread Text Event or Event demanding user inputs (e.g. Choice, Wait Input, and Text Input). You can enable Auto-Skip from code via: @@ -355,7 +393,7 @@ tooltip_text = "The time until Auto-Skip will execute the next event. If this is set to 0.1s, each event should finish within that time. Custom events must respect this time, built-in events already handle Auto-Skip." -texture = SubResource("ImageTexture_dbvsu") +texture = SubResource("ImageTexture_3xcp4") hint_text = "The time until Auto-Skip will execute the next event. If this is set to 0.1s, each event should finish within that time. @@ -386,7 +424,7 @@ tooltip_text = "Adds pauses after certain letters. Each set can contain multiple letters that will (individually) have a pause of the given length added after them." -texture = SubResource("ImageTexture_dbvsu") +texture = SubResource("ImageTexture_3xcp4") hint_text = "Adds pauses after certain letters. Each set can contain multiple letters that will (individually) @@ -414,26 +452,17 @@ text = "Absolute auto-pause times" [node name="HintTooltip7" parent="VBoxContainer/HBoxContainer3" instance=ExtResource("3_s7xhj")] layout_mode = 2 tooltip_text = "If not enabled autopauses will be multiplied by the speed and user speed. When enabled those will be ignored." -texture = SubResource("ImageTexture_dbvsu") +texture = SubResource("ImageTexture_3xcp4") hint_text = "If not enabled autopauses will be multiplied by the speed and user speed. When enabled those will be ignored." [node name="AutoPausesAbsolute" type="CheckBox" parent="VBoxContainer/HBoxContainer3"] unique_name_in_owner = true layout_mode = 2 -[connection signal="value_changed" from="VBoxContainer/VBox/DefaultSpeed" to="." method="_on_DefaultSpeed_value_changed"] [connection signal="value_changed" from="VBoxContainer/VBox/InputAction" to="." method="_on_InputAction_value_changed"] -[connection signal="toggled" from="VBoxContainer/VBox/Skippable/Skippable" to="." method="_on_Skippable_toggled"] -[connection signal="value_changed" from="VBoxContainer/VBox/Skippable/SkippableDelay" to="." method="_on_skippable_delay_value_changed"] -[connection signal="toggled" from="VBoxContainer/VBox/AutocolorNames" to="." method="_on_AutocolorNames_toggled"] -[connection signal="toggled" from="VBoxContainer/VBox/HBoxContainer4/NewEvents" to="." method="_on_new_events_toggled"] +[connection signal="value_changed" from="VBoxContainer/VBox/Skippable/HBoxContainer3/AdvanceDelay" to="." method="_on_skippable_delay_value_changed"] [connection signal="item_selected" from="VBoxContainer/VBox/HBoxContainer4/NewEventOption" to="." method="_on_new_event_option_item_selected"] -[connection signal="value_changed" from="VBoxContainer/AutoadvanceSettings/FixedDelay" to="." method="_on_FixedDelay_value_changed"] [connection signal="item_selected" from="VBoxContainer/AutoadvanceSettings/HBoxContainer2/AdditionalDelayMode" to="." method="_on_additional_delay_mode_item_selected"] [connection signal="value_changed" from="VBoxContainer/AutoadvanceSettings/HBoxContainer2/AdditionalDelay" to="." method="_on_additional_delay_value_changed"] -[connection signal="toggled" from="VBoxContainer/AutoadvanceSettings/HBoxContainer2/AutoadvanceIgnoreCharacters/IgnoredCharactersEnabled" to="." method="_on_IgnoredCharactersEnabled_toggled"] [connection signal="text_changed" from="VBoxContainer/AutoadvanceSettings/HBoxContainer2/AutoadvanceIgnoreCharacters/IgnoredCharacters" to="." method="_on_IgnoredCharacters_text_changed"] -[connection signal="toggled" from="VBoxContainer/AutoadvanceSettings/AutoAdvance" to="." method="_on_Autoadvance_toggled"] -[connection signal="value_changed" from="VBoxContainer/AutoskipSettings/AutoskipTimePerEvent" to="." method="_on_AutoskipTimePerEvent_value_changed"] [connection signal="pressed" from="VBoxContainer/HBoxContainer/Add" to="." method="_on_add_autopauses_set_pressed"] -[connection signal="toggled" from="VBoxContainer/HBoxContainer3/AutoPausesAbsolute" to="." method="_on_auto_pauses_absolute_toggled"]