diff options
Diffstat (limited to 'game/src/Game/Menu')
8 files changed, 20 insertions, 15 deletions
diff --git a/game/src/Game/Menu/MainMenu/MainMenu.tscn b/game/src/Game/Menu/MainMenu/MainMenu.tscn index 71d020a..3e48460 100644 --- a/game/src/Game/Menu/MainMenu/MainMenu.tscn +++ b/game/src/Game/Menu/MainMenu/MainMenu.tscn @@ -136,6 +136,7 @@ theme_type_variation = &"BottomMargin" layout_mode = 2 [node name="LocaleButton" parent="MenuPanel/MenuList/BottomMargin" instance=ExtResource("3_amonp")] +editor_description = "SS-87" layout_mode = 2 size_flags_horizontal = 8 alignment = 0 diff --git a/game/src/Game/Menu/MainMenu/ReleaseInfoBox.gd b/game/src/Game/Menu/MainMenu/ReleaseInfoBox.gd index e363162..f401919 100644 --- a/game/src/Game/Menu/MainMenu/ReleaseInfoBox.gd +++ b/game/src/Game/Menu/MainMenu/ReleaseInfoBox.gd @@ -12,7 +12,8 @@ var _checksum_label : Button var _checksum : String = "????" # REQUIREMENTS: -# * UIFUN-97 +# * SS-104, SS-105, SS-106, SS-107 +# * UIFUN-97, UIFUN-297, UIFUN-299 func _ready(): _version_label.text = _GIT_INFO_.release_name _version_label.tooltip_text = _GIT_INFO_.tag diff --git a/game/src/Game/Menu/MainMenu/ReleaseInfoBox.tscn b/game/src/Game/Menu/MainMenu/ReleaseInfoBox.tscn index 4dc6f4e..d9de5ea 100644 --- a/game/src/Game/Menu/MainMenu/ReleaseInfoBox.tscn +++ b/game/src/Game/Menu/MainMenu/ReleaseInfoBox.tscn @@ -10,6 +10,7 @@ _commit_label = NodePath("CommitLabel") _checksum_label = NodePath("ChecksumLabel") [node name="VersionLabel" type="Button" parent="."] +editor_description = "UI-869, UI-870" layout_mode = 2 tooltip_text = "VERSION_MISSING" focus_mode = 0 @@ -19,6 +20,7 @@ flat = true alignment = 0 [node name="CommitLabel" type="Button" parent="."] +editor_description = "UI-871, UI-872" layout_mode = 2 focus_mode = 0 theme_type_variation = &"CommitLabel" diff --git a/game/src/Game/Menu/OptionMenu/OptionsMenu.gd b/game/src/Game/Menu/OptionMenu/OptionsMenu.gd index c74c458..93ef3e4 100644 --- a/game/src/Game/Menu/OptionMenu/OptionsMenu.gd +++ b/game/src/Game/Menu/OptionMenu/OptionsMenu.gd @@ -66,11 +66,12 @@ func _save_overrides() -> void: if override_path.is_empty(): override_path = ProjectSettings.get_setting(Events.Options.settings_file_path_setting, Events.Options.settings_file_path_default) 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) + if FileAccess.file_exists(override_path): + if file.load(override_path) != OK: + push_error("Failed to load overrides from %s" % override_path) 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) - err_ret = file.save(override_path) - if err_ret != OK: push_error("Failed to save overrides to %s" % override_path) + if file.save(override_path) != OK: + push_error("Failed to save overrides to %s" % override_path) diff --git a/game/src/Game/Menu/OptionMenu/ResolutionSelector.gd b/game/src/Game/Menu/OptionMenu/ResolutionSelector.gd index f843815..cb7a1fb 100644 --- a/game/src/Game/Menu/OptionMenu/ResolutionSelector.gd +++ b/game/src/Game/Menu/OptionMenu/ResolutionSelector.gd @@ -1,10 +1,7 @@ extends SettingRevertButton # REQUIREMENTS -# * UIFUN-21 -# * UIFUN-28 -# * UIFUN-301 -# * UIFUN-302 +# * UIFUN-21, UIFUN-28, UIFUN-301, UIFUN-302 @export var default_value : Vector2i = Resolution.error_resolution @@ -14,7 +11,7 @@ func _find_resolution_index_by_value(value : Vector2i) -> int: return item_index return -1 -func _sync_resolutions(value : Vector2i = Resolution.error_resolution) -> void: +func _sync_resolutions() -> void: clear() default_selected = -1 selected = -1 @@ -59,7 +56,7 @@ func _update_resolution_options_text() -> void: set_item_text(index, display_name) func _setup_button() -> void: - Resolution.resolution_added.connect(_sync_resolutions) + Resolution.resolution_added.connect(func (_value : Vector2i): _sync_resolutions()) if default_value.x <= 0: default_value.x = ProjectSettings.get_setting("display/window/size/viewport_width") if default_value.y <= 0: @@ -75,6 +72,8 @@ func _get_value_for_file(select_value : int) -> Variant: else: return null +# REQUIREMENTS: +# * SS-25 func _set_value_from_file(load_value) -> void: var target_resolution := Resolution.error_resolution match typeof(load_value): diff --git a/game/src/Game/Menu/OptionMenu/ScreenModeSelector.gd b/game/src/Game/Menu/OptionMenu/ScreenModeSelector.gd index a1a26a0..cb7566f 100644 --- a/game/src/Game/Menu/OptionMenu/ScreenModeSelector.gd +++ b/game/src/Game/Menu/OptionMenu/ScreenModeSelector.gd @@ -1,6 +1,7 @@ extends SettingRevertButton # REQUIREMENTS +# * SS-26, SS-127, SS-128 # * UIFUN-42 enum ScreenMode { Unknown = -1, Fullscreen, Borderless, Windowed } diff --git a/game/src/Game/Menu/OptionMenu/SettingNodes/SettingOptionButton.gd b/game/src/Game/Menu/OptionMenu/SettingNodes/SettingOptionButton.gd index c5a805e..079dd4d 100644 --- a/game/src/Game/Menu/OptionMenu/SettingNodes/SettingOptionButton.gd +++ b/game/src/Game/Menu/OptionMenu/SettingNodes/SettingOptionButton.gd @@ -57,9 +57,9 @@ func _ready(): item_selected.connect(func(index : int): option_selected.emit(index, true)) _setup_button() if not _valid_index(default_selected) or selected == -1: - var msg := "Failed to generate %s %s options." % [setting_name, section_name] + var msg := "Failed to generate any valid %s %s options." % [setting_name, section_name] push_error(msg) - OS.alert(msg, "%s Options Error" % section_name) + OS.alert(msg, "Options Error: %s / %s" % [section_name, setting_name]) get_tree().quit() func load_setting(file : ConfigFile) -> void: diff --git a/game/src/Game/Menu/OptionMenu/SoundTab.gd b/game/src/Game/Menu/OptionMenu/SoundTab.gd index e0d9bcf..d1daf3d 100644 --- a/game/src/Game/Menu/OptionMenu/SoundTab.gd +++ b/game/src/Game/Menu/OptionMenu/SoundTab.gd @@ -1,6 +1,6 @@ extends HBoxContainer -@export var _startup_music_button : Button +@export var _startup_music_button : SettingCheckBox func _ready(): - _startup_music_button.option_selected.connect(func (pressed : bool, by_user : bool): MusicConductor.set_startup_music(pressed)) + _startup_music_button.option_selected.connect(func (pressed : bool, _by_user : bool): MusicConductor.set_startup_music(pressed)) |