diff options
author | Hop311 <Hop3114@gmail.com> | 2023-06-24 00:55:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-24 00:55:45 +0200 |
commit | 432000a3ab73980fc6421b3587de4b97af30d3ad (patch) | |
tree | 4b80d98261252f25011e34b22a8d49767525559f /game/src/Game/Menu | |
parent | 40cf0fa95e325f3bf875e42c11254da23192f506 (diff) | |
parent | 206cafc8bba310e4d4f35f4898ef3ac289abe81a (diff) |
Merge pull request #131 from OpenVicProject/ui-cleanup
Localisation and UI focus cleanup
Diffstat (limited to 'game/src/Game/Menu')
-rw-r--r-- | game/src/Game/Menu/CreditsMenu/CreditsMenu.gd | 5 | ||||
-rw-r--r-- | game/src/Game/Menu/MainMenu/ReleaseInfoBox.tscn | 3 | ||||
-rw-r--r-- | game/src/Game/Menu/OptionMenu/MonitorDisplaySelector.gd | 27 | ||||
-rw-r--r-- | game/src/Game/Menu/OptionMenu/OptionsMenu.gd | 12 | ||||
-rw-r--r-- | game/src/Game/Menu/OptionMenu/OptionsMenu.tscn | 3 | ||||
-rw-r--r-- | game/src/Game/Menu/OptionMenu/ResolutionSelector.gd | 47 | ||||
-rw-r--r-- | game/src/Game/Menu/OptionMenu/ScreenModeSelector.gd | 15 | ||||
-rw-r--r-- | game/src/Game/Menu/OptionMenu/SettingNodes/SettingCheckBox.gd | 53 | ||||
-rw-r--r-- | game/src/Game/Menu/OptionMenu/SettingNodes/SettingRevertButton.gd | 2 | ||||
-rw-r--r-- | game/src/Game/Menu/OptionMenu/SettingRevertDialog.gd (renamed from game/src/Game/Menu/OptionMenu/ResolutionRevertDialog.gd) | 6 | ||||
-rw-r--r-- | game/src/Game/Menu/OptionMenu/SoundTab.gd | 6 | ||||
-rw-r--r-- | game/src/Game/Menu/OptionMenu/SoundTab.tscn | 15 | ||||
-rw-r--r-- | game/src/Game/Menu/OptionMenu/VideoTab.tscn | 38 |
13 files changed, 164 insertions, 68 deletions
diff --git a/game/src/Game/Menu/CreditsMenu/CreditsMenu.gd b/game/src/Game/Menu/CreditsMenu/CreditsMenu.gd index 0db4d7d..61140c0 100644 --- a/game/src/Game/Menu/CreditsMenu/CreditsMenu.gd +++ b/game/src/Game/Menu/CreditsMenu/CreditsMenu.gd @@ -193,6 +193,11 @@ func _ready(): _add_godot_credits() _add_licenses() +func _input(event): + if self.is_visible_in_tree(): + if event.is_action_pressed("ui_cancel"): + _on_back_button_pressed() + # REQUIREMENTS: # * UI-38 # * UIFUN-37 diff --git a/game/src/Game/Menu/MainMenu/ReleaseInfoBox.tscn b/game/src/Game/Menu/MainMenu/ReleaseInfoBox.tscn index a10232e..4dc6f4e 100644 --- a/game/src/Game/Menu/MainMenu/ReleaseInfoBox.tscn +++ b/game/src/Game/Menu/MainMenu/ReleaseInfoBox.tscn @@ -12,6 +12,7 @@ _checksum_label = NodePath("ChecksumLabel") [node name="VersionLabel" type="Button" parent="."] layout_mode = 2 tooltip_text = "VERSION_MISSING" +focus_mode = 0 theme_type_variation = &"VersionLabel" text = "VERSION_MISSING" flat = true @@ -19,6 +20,7 @@ alignment = 0 [node name="CommitLabel" type="Button" parent="."] layout_mode = 2 +focus_mode = 0 theme_type_variation = &"CommitLabel" text = "????????" flat = true @@ -28,6 +30,7 @@ alignment = 0 editor_description = "UI-111" layout_mode = 2 tooltip_text = "CHECKSUM_MISSING" +focus_mode = 0 theme_type_variation = &"ChecksumLabel" text = "(????)" flat = true diff --git a/game/src/Game/Menu/OptionMenu/MonitorDisplaySelector.gd b/game/src/Game/Menu/OptionMenu/MonitorDisplaySelector.gd index 7de033a..028b3df 100644 --- a/game/src/Game/Menu/OptionMenu/MonitorDisplaySelector.gd +++ b/game/src/Game/Menu/OptionMenu/MonitorDisplaySelector.gd @@ -1,18 +1,29 @@ -extends SettingOptionButton +extends SettingRevertButton func _setup_button() -> void: clear() for screen_index in DisplayServer.get_screen_count(): - add_item("Monitor %d" % (screen_index + 1)) - default_selected = get_viewport().get_window().current_screen + # Placeholder option text awaiting _update_monitor_options_text() + add_item(str(screen_index + 1)) + _update_monitor_options_text() + default_selected = Resolution.get_current_monitor() + +func _notification(what : int): + match what: + NOTIFICATION_TRANSLATION_CHANGED: + _update_monitor_options_text() + +func _update_monitor_options_text() -> void: + for index in get_item_count(): + set_item_text(index, tr("OPTIONS_VIDEO_MONITOR").format({ "index": Events.Localisation.tr_number(index + 1) })) func _on_option_selected(index : int, by_user : bool) -> void: if _valid_index(index): - var window := get_viewport().get_window() - var mode := window.mode - window.mode = Window.MODE_WINDOWED - get_viewport().get_window().set_current_screen(index) - window.mode = mode + if by_user: + print("Start Revert Countdown!") + revert_dialog.show_dialog.call_deferred(self) + previous_index = Resolution.get_current_monitor() + Resolution.set_monitor(index) else: push_error("Invalid MonitorDisplaySelector index: %d" % index) reset_setting(not by_user) diff --git a/game/src/Game/Menu/OptionMenu/OptionsMenu.gd b/game/src/Game/Menu/OptionMenu/OptionsMenu.gd index 5f6a088..c74c458 100644 --- a/game/src/Game/Menu/OptionMenu/OptionsMenu.gd +++ b/game/src/Game/Menu/OptionMenu/OptionsMenu.gd @@ -5,9 +5,17 @@ extends Control signal back_button_pressed +@export var _tab_container : TabContainer + func _ready(): + _tab_container.set_tab_title(0, "OPTIONS_GENERAL") + _tab_container.set_tab_title(1, "OPTIONS_VIDEO") + _tab_container.set_tab_title(2, "OPTIONS_SOUND") + _tab_container.set_tab_title(3, "OPTIONS_CONTROLS") + _tab_container.set_tab_title(4, "OPTIONS_OTHER") + # Prepare options menu before loading user settings - var tab_bar : TabBar = $Margin/Tab.get_child(0, true) + var tab_bar : TabBar = _tab_container.get_child(0, true) # This ends up easier to manage then trying to manually recreate the TabContainer's behavior # These buttons can be accessed regardless of the tab @@ -60,7 +68,7 @@ func _save_overrides() -> void: var file := ConfigFile.new() var err_ret := file.load(override_path) if err_ret != OK: push_error("Failed to load overrides from %s" % override_path) - file.set_value("display", "window/size/mode", get_viewport().get_window().mode) + file.set_value("display", "window/size/mode", Resolution.get_current_window_mode()) var resolution : Vector2i = Resolution.get_current_resolution() file.set_value("display", "window/size/viewport_width", resolution.x) file.set_value("display", "window/size/viewport_height", resolution.y) diff --git a/game/src/Game/Menu/OptionMenu/OptionsMenu.tscn b/game/src/Game/Menu/OptionMenu/OptionsMenu.tscn index 017629a..3185f63 100644 --- a/game/src/Game/Menu/OptionMenu/OptionsMenu.tscn +++ b/game/src/Game/Menu/OptionMenu/OptionsMenu.tscn @@ -8,7 +8,7 @@ [ext_resource type="PackedScene" uid="uid://bq7ibhm0txl5p" path="res://addons/keychain/ShortcutEdit.tscn" id="4_vdhjp"] [ext_resource type="PackedScene" uid="uid://dp2grvybtecqu" path="res://src/Game/Menu/OptionMenu/OtherTab.tscn" id="5_ahefp"] -[node name="OptionsMenu" type="PanelContainer"] +[node name="OptionsMenu" type="PanelContainer" node_paths=PackedStringArray("_tab_container")] editor_description = "UI-25" anchors_preset = 15 anchor_right = 1.0 @@ -18,6 +18,7 @@ grow_vertical = 2 theme = ExtResource("1_0up1d") theme_type_variation = &"BackgroundPanel" script = ExtResource("1_tlein") +_tab_container = NodePath("Margin/Tab") [node name="Margin" type="MarginContainer" parent="."] layout_mode = 2 diff --git a/game/src/Game/Menu/OptionMenu/ResolutionSelector.gd b/game/src/Game/Menu/OptionMenu/ResolutionSelector.gd index ebdf718..2791ecb 100644 --- a/game/src/Game/Menu/OptionMenu/ResolutionSelector.gd +++ b/game/src/Game/Menu/OptionMenu/ResolutionSelector.gd @@ -14,31 +14,20 @@ func _find_resolution_index_by_value(value : Vector2i) -> int: return item_index return -1 -func _sync_resolutions( - value : Vector2i = Resolution.error_resolution, - _resolution_name = null, - _resolution_display_name = null -) -> void: +func _sync_resolutions(value : Vector2i = Resolution.error_resolution) -> void: clear() default_selected = -1 selected = -1 - var resolution_list := Resolution.get_resolution_value_list() - if value != Resolution.error_resolution: - resolution_list.append(value) - for resolution_value in resolution_list: - var display_name := "%sx%s" % [resolution_value.x, resolution_value.y] - var resolution_name := Resolution.get_resolution_name(resolution_value) - if resolution_name == &"Default": - display_name = "Default (%s)" % resolution_name - if not resolution_name.is_empty(): - display_name = "%s (%s)" % [display_name, resolution_name + (", Default" if resolution_value == default_value else "")] - add_item(display_name) + var current_resolution := Resolution.get_current_resolution() + for resolution_value in Resolution.get_resolution_value_list(): + # Placeholder option text awaiting _update_resolution_options_text() + add_item(str(resolution_value)) set_item_metadata(item_count - 1, resolution_value) if resolution_value == default_value: default_selected = item_count - 1 - if resolution_value == Resolution.get_current_resolution(): + if resolution_value == current_resolution: selected = item_count - 1 if default_selected == -1: @@ -46,6 +35,28 @@ func _sync_resolutions( if selected == -1: selected = default_selected + _update_resolution_options_text() + +func _notification(what : int): + match what: + NOTIFICATION_TRANSLATION_CHANGED: + _update_resolution_options_text() + +func _update_resolution_options_text() -> void: + for index in get_item_count(): + var resolution_value : Vector2i = get_item_metadata(index) + var format_dict := { "width": resolution_value.x, "height": resolution_value.y } + format_dict["name"] = tr("OPTIONS_VIDEO_RESOLUTION_{width}x{height}".format(format_dict)) + if format_dict["name"].begins_with("OPTIONS"): format_dict["name"] = "" + var display_name := "OPTIONS_VIDEO_RESOLUTION_DIMS" + if format_dict["name"]: + display_name += "_NAMED" + if resolution_value == default_value: + display_name += "_DEFAULT" + format_dict["width"] = Events.Localisation.tr_number(resolution_value.x) + format_dict["height"] = Events.Localisation.tr_number(resolution_value.y) + display_name = tr(display_name).format(format_dict) + set_item_text(index, display_name) func _setup_button() -> void: Resolution.resolution_added.connect(_sync_resolutions) @@ -54,7 +65,7 @@ func _setup_button() -> void: if default_value.y <= 0: default_value.y = ProjectSettings.get_setting("display/window/size/viewport_height") if not Resolution.has_resolution(default_value): - Resolution.add_resolution(default_value, &"Default") + Resolution.add_resolution(default_value) else: _sync_resolutions() diff --git a/game/src/Game/Menu/OptionMenu/ScreenModeSelector.gd b/game/src/Game/Menu/OptionMenu/ScreenModeSelector.gd index af95901..a1a26a0 100644 --- a/game/src/Game/Menu/OptionMenu/ScreenModeSelector.gd +++ b/game/src/Game/Menu/OptionMenu/ScreenModeSelector.gd @@ -5,7 +5,7 @@ extends SettingRevertButton enum ScreenMode { Unknown = -1, Fullscreen, Borderless, Windowed } -func get_screen_mode_from_window_mode(window_mode : int) -> ScreenMode: +func get_screen_mode_from_window_mode(window_mode : Window.Mode) -> ScreenMode: match window_mode: Window.MODE_EXCLUSIVE_FULLSCREEN: return ScreenMode.Fullscreen @@ -16,7 +16,7 @@ func get_screen_mode_from_window_mode(window_mode : int) -> ScreenMode: _: return ScreenMode.Unknown -func get_window_mode_from_screen_mode(screen_mode : int) -> Window.Mode: +func get_window_mode_from_screen_mode(screen_mode : ScreenMode) -> Window.Mode: match screen_mode: ScreenMode.Fullscreen: return Window.MODE_EXCLUSIVE_FULLSCREEN @@ -28,7 +28,7 @@ func get_window_mode_from_screen_mode(screen_mode : int) -> Window.Mode: return Window.MODE_EXCLUSIVE_FULLSCREEN func _setup_button(): - default_selected = get_screen_mode_from_window_mode(get_viewport().get_window().mode) + default_selected = get_screen_mode_from_window_mode(Resolution.get_current_window_mode()) selected = default_selected func _on_option_selected(index : int, by_user : bool) -> void: @@ -36,13 +36,8 @@ func _on_option_selected(index : int, by_user : bool) -> void: if by_user: print("Start Revert Countdown!") revert_dialog.show_dialog.call_deferred(self) - previous_index = get_screen_mode_from_window_mode(get_viewport().get_window().mode) - - var current_resolution := Resolution.get_current_resolution() - var window_mode := get_window_mode_from_screen_mode(index) - Resolution.window_mode_changed.emit(window_mode) - get_viewport().get_window().mode = window_mode - Resolution.set_resolution(current_resolution) + previous_index = get_screen_mode_from_window_mode(Resolution.get_current_window_mode()) + Resolution.set_window_mode(get_window_mode_from_screen_mode(index)) else: push_error("Invalid ScreenModeSelector index: %d" % index) reset_setting(not by_user) diff --git a/game/src/Game/Menu/OptionMenu/SettingNodes/SettingCheckBox.gd b/game/src/Game/Menu/OptionMenu/SettingNodes/SettingCheckBox.gd new file mode 100644 index 0000000..fcc411e --- /dev/null +++ b/game/src/Game/Menu/OptionMenu/SettingNodes/SettingCheckBox.gd @@ -0,0 +1,53 @@ +extends CheckBox +class_name SettingCheckBox + +signal option_selected(pressed : bool, by_user : bool) + +@export +var section_name : String = "setting" + +@export +var setting_name : String = "setting_checkbox" + +@export +var default_pressed : bool = true + +func _setup_button() -> void: + pass + +func _ready(): + Events.Options.load_settings.connect(load_setting) + Events.Options.save_settings.connect(save_setting) + Events.Options.reset_settings.connect(reset_setting) + toggled.connect(func(pressed : bool): option_selected.emit(pressed, true)) + _setup_button() + +func _set_value_from_file(load_value) -> void: + match typeof(load_value): + TYPE_BOOL, TYPE_INT: + set_pressed_no_signal(load_value as bool) + return + TYPE_STRING, TYPE_STRING_NAME: + var load_str := (load_value as String).to_lower() + if load_str.is_empty() or load_str.begins_with("f") or load_str.begins_with("n"): + set_pressed_no_signal(false) + return + if load_str.begins_with("t") or load_str.begins_with("y"): + set_pressed_no_signal(true) + return + push_error("Setting value '%s' invalid for setting [%s] \"%s\"" % [load_value, section_name, setting_name]) + set_pressed_no_signal(default_pressed) + +func load_setting(file : ConfigFile) -> void: + if file == null: return + _set_value_from_file(file.get_value(section_name, setting_name, default_pressed)) + option_selected.emit(button_pressed, false) + +func save_setting(file : ConfigFile) -> void: + if file == null: return + file.set_value(section_name, setting_name, button_pressed) + +func reset_setting(no_emit : bool = false) -> void: + set_pressed_no_signal(default_pressed) + if not no_emit: + option_selected.emit(button_pressed, false) diff --git a/game/src/Game/Menu/OptionMenu/SettingNodes/SettingRevertButton.gd b/game/src/Game/Menu/OptionMenu/SettingNodes/SettingRevertButton.gd index 945d35b..431e3e5 100644 --- a/game/src/Game/Menu/OptionMenu/SettingNodes/SettingRevertButton.gd +++ b/game/src/Game/Menu/OptionMenu/SettingNodes/SettingRevertButton.gd @@ -2,7 +2,7 @@ extends SettingOptionButton class_name SettingRevertButton @export_group("Nodes") -@export var revert_dialog : ResolutionRevertDialog +@export var revert_dialog : SettingRevertDialog var previous_index : int = -1 diff --git a/game/src/Game/Menu/OptionMenu/ResolutionRevertDialog.gd b/game/src/Game/Menu/OptionMenu/SettingRevertDialog.gd index 4d2b8f2..8cde621 100644 --- a/game/src/Game/Menu/OptionMenu/ResolutionRevertDialog.gd +++ b/game/src/Game/Menu/OptionMenu/SettingRevertDialog.gd @@ -1,9 +1,11 @@ extends ConfirmationDialog -class_name ResolutionRevertDialog +class_name SettingRevertDialog signal dialog_accepted(button : SettingRevertButton) signal dialog_reverted(button : SettingRevertButton) +@export var dialog_text_key : String = "< reverting in {time} seconds >" + @export_group("Nodes") @export var timer : Timer @@ -20,7 +22,7 @@ func _notification(what): if not visible: _revert_node = null func _process(_delta) -> void: - dialog_text = tr("OPTIONS_VIDEO_RESOLUTION_DIALOG_TEXT").format({ "time": int(timer.time_left) }) + dialog_text = tr(dialog_text_key).format({ "time": Events.Localisation.tr_number(int(timer.time_left)) }) func _on_canceled_or_close_requested() -> void: timer.stop() diff --git a/game/src/Game/Menu/OptionMenu/SoundTab.gd b/game/src/Game/Menu/OptionMenu/SoundTab.gd index c707605..e0d9bcf 100644 --- a/game/src/Game/Menu/OptionMenu/SoundTab.gd +++ b/game/src/Game/Menu/OptionMenu/SoundTab.gd @@ -1,4 +1,6 @@ extends HBoxContainer -func _on_ear_exploder_toggled(button_pressed): - print("KABOOM!!!" if button_pressed else "DEFUSED!!!") +@export var _startup_music_button : Button + +func _ready(): + _startup_music_button.option_selected.connect(func (pressed : bool, by_user : bool): MusicConductor.set_startup_music(pressed)) diff --git a/game/src/Game/Menu/OptionMenu/SoundTab.tscn b/game/src/Game/Menu/OptionMenu/SoundTab.tscn index 4bb6948..8bc3679 100644 --- a/game/src/Game/Menu/OptionMenu/SoundTab.tscn +++ b/game/src/Game/Menu/OptionMenu/SoundTab.tscn @@ -1,11 +1,13 @@ -[gd_scene load_steps=3 format=3 uid="uid://cbtgwpx2wxi33"] +[gd_scene load_steps=4 format=3 uid="uid://cbtgwpx2wxi33"] [ext_resource type="Script" path="res://src/Game/Menu/OptionMenu/SoundTab.gd" id="1_a7k0s"] [ext_resource type="PackedScene" uid="uid://dy4si8comamnv" path="res://src/Game/Menu/OptionMenu/VolumeGrid.tscn" id="1_okpft"] +[ext_resource type="Script" path="res://src/Game/Menu/OptionMenu/SettingNodes/SettingCheckBox.gd" id="2_f3aj4"] -[node name="Sound" type="HBoxContainer"] +[node name="Sound" type="HBoxContainer" node_paths=PackedStringArray("_startup_music_button")] alignment = 1 script = ExtResource("1_a7k0s") +_startup_music_button = NodePath("VBoxContainer/ButtonGrid/EarExploder") [node name="VBoxContainer" type="VBoxContainer" parent="."] layout_mode = 2 @@ -27,8 +29,9 @@ columns = 2 layout_mode = 2 size_flags_horizontal = 3 -[node name="EarExploder" type="CheckButton" parent="VBoxContainer/ButtonGrid"] +[node name="EarExploder" type="CheckBox" parent="VBoxContainer/ButtonGrid"] layout_mode = 2 -text = "Explode Eardrums on Startup?" - -[connection signal="toggled" from="VBoxContainer/ButtonGrid/EarExploder" to="." method="_on_ear_exploder_toggled"] +text = "OPTIONS_SOUND_EXPLODE_EARS" +script = ExtResource("2_f3aj4") +section_name = "audio" +setting_name = "startup_music" diff --git a/game/src/Game/Menu/OptionMenu/VideoTab.tscn b/game/src/Game/Menu/OptionMenu/VideoTab.tscn index 4f5151c..5c58304 100644 --- a/game/src/Game/Menu/OptionMenu/VideoTab.tscn +++ b/game/src/Game/Menu/OptionMenu/VideoTab.tscn @@ -7,7 +7,7 @@ [ext_resource type="Script" path="res://src/Game/Menu/OptionMenu/MonitorDisplaySelector.gd" id="3_y6lyb"] [ext_resource type="Script" path="res://src/Game/Menu/OptionMenu/RefreshRateSelector.gd" id="4_381mg"] [ext_resource type="Script" path="res://src/Game/Menu/OptionMenu/QualityPresetSelector.gd" id="5_srg4v"] -[ext_resource type="Script" path="res://src/Game/Menu/OptionMenu/ResolutionRevertDialog.gd" id="8_802cr"] +[ext_resource type="Script" path="res://src/Game/Menu/OptionMenu/SettingRevertDialog.gd" id="8_ug5mo"] [node name="Video" type="HBoxContainer" node_paths=PackedStringArray("initial_focus")] editor_description = "UI-46" @@ -41,7 +41,7 @@ selected = 0 popup/item_0/text = "MISSING" popup/item_0/id = 0 script = ExtResource("1_i8nro") -revert_dialog = NodePath("../../../ResolutionRevertDialog") +revert_dialog = NodePath("../../../VideoRevertDialog") section_name = "video" setting_name = "resolution" @@ -79,7 +79,7 @@ popup/item_1/id = 1 popup/item_2/text = "OPTIONS_VIDEO_WINDOWED" popup/item_2/id = 2 script = ExtResource("2_wa7vw") -revert_dialog = NodePath("../../../ResolutionRevertDialog") +revert_dialog = NodePath("../../../VideoRevertDialog") section_name = "video" setting_name = "mode_selected" @@ -87,7 +87,7 @@ setting_name = "mode_selected" layout_mode = 2 text = "OPTIONS_VIDEO_MONITOR_SELECTION" -[node name="MonitorDisplaySelector" type="OptionButton" parent="VideoSettingList/VideoSettingGrid"] +[node name="MonitorDisplaySelector" type="OptionButton" parent="VideoSettingList/VideoSettingGrid" node_paths=PackedStringArray("revert_dialog")] layout_mode = 2 focus_neighbor_top = NodePath("../ScreenModeSelector") focus_neighbor_bottom = NodePath("../RefreshRateSelector") @@ -96,6 +96,7 @@ selected = 0 popup/item_0/text = "MISSING" popup/item_0/id = 0 script = ExtResource("3_y6lyb") +revert_dialog = NodePath("../../../VideoRevertDialog") section_name = "video" setting_name = "current_screen" @@ -142,32 +143,33 @@ layout_mode = 2 focus_neighbor_top = NodePath("../RefreshRateSelector") item_count = 5 selected = 1 -popup/item_0/text = "Low" +popup/item_0/text = "OPTIONS_VIDEO_QUALITY_LOW" popup/item_0/id = 0 -popup/item_1/text = "Medium" +popup/item_1/text = "OPTIONS_VIDEO_QUALITY_MEDIUM" popup/item_1/id = 1 -popup/item_2/text = "High" +popup/item_2/text = "OPTIONS_VIDEO_QUALITY_HIGH" popup/item_2/id = 2 -popup/item_3/text = "Ultra" +popup/item_3/text = "OPTIONS_VIDEO_QUALITY_ULTRA" popup/item_3/id = 3 -popup/item_4/text = "Custom" +popup/item_4/text = "OPTIONS_VIDEO_QUALITY_CUSTOM" popup/item_4/id = 4 script = ExtResource("5_srg4v") section_name = "video" setting_name = "quality_preset" default_selected = 1 -[node name="ResolutionRevertDialog" type="ConfirmationDialog" parent="." node_paths=PackedStringArray("timer")] +[node name="VideoRevertDialog" type="ConfirmationDialog" parent="." node_paths=PackedStringArray("timer")] editor_description = "UI-873" disable_3d = true -title = "OPTIONS_VIDEO_RESOLUTION_DIALOG_TITLE" +title = "OPTIONS_VIDEO_REVERT_DIALOG_TITLE" size = Vector2i(730, 100) ok_button_text = "DIALOG_OK" cancel_button_text = "DIALOG_CANCEL" -script = ExtResource("8_802cr") -timer = NodePath("ResolutionRevertTimer") +script = ExtResource("8_ug5mo") +dialog_text_key = "OPTIONS_VIDEO_REVERT_DIALOG_TEXT" +timer = NodePath("VideoRevertTimer") -[node name="ResolutionRevertTimer" type="Timer" parent="ResolutionRevertDialog"] +[node name="VideoRevertTimer" type="Timer" parent="VideoRevertDialog"] wait_time = 5.0 one_shot = true @@ -175,7 +177,7 @@ one_shot = true [connection signal="option_selected" from="VideoSettingList/VideoSettingGrid/GuiScaleSelector" to="VideoSettingList/VideoSettingGrid/GuiScaleSelector" method="_on_option_selected"] [connection signal="option_selected" from="VideoSettingList/VideoSettingGrid/ScreenModeSelector" to="VideoSettingList/VideoSettingGrid/ScreenModeSelector" method="_on_option_selected"] [connection signal="option_selected" from="VideoSettingList/VideoSettingGrid/MonitorDisplaySelector" to="VideoSettingList/VideoSettingGrid/MonitorDisplaySelector" method="_on_option_selected"] -[connection signal="canceled" from="ResolutionRevertDialog" to="ResolutionRevertDialog" method="_on_canceled_or_close_requested"] -[connection signal="close_requested" from="ResolutionRevertDialog" to="ResolutionRevertDialog" method="_on_canceled_or_close_requested"] -[connection signal="confirmed" from="ResolutionRevertDialog" to="ResolutionRevertDialog" method="_on_confirmed"] -[connection signal="timeout" from="ResolutionRevertDialog/ResolutionRevertTimer" to="ResolutionRevertDialog" method="_on_resolution_revert_timer_timeout"] +[connection signal="canceled" from="VideoRevertDialog" to="VideoRevertDialog" method="_on_canceled_or_close_requested"] +[connection signal="close_requested" from="VideoRevertDialog" to="VideoRevertDialog" method="_on_canceled_or_close_requested"] +[connection signal="confirmed" from="VideoRevertDialog" to="VideoRevertDialog" method="_on_confirmed"] +[connection signal="timeout" from="VideoRevertDialog/VideoRevertTimer" to="VideoRevertDialog" method="_on_resolution_revert_timer_timeout"] |