From 62d001b0fa209f259440e160503dc5ffe5bcaa8f Mon Sep 17 00:00:00 2001 From: Hop311 Date: Fri, 21 Jul 2023 00:26:31 +0100 Subject: Tidying: missing req comments, submodules, hotkeys --- game/src/Game/Menu/OptionMenu/ResolutionSelector.gd | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'game/src/Game/Menu/OptionMenu/ResolutionSelector.gd') 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): -- cgit v1.2.3-56-ga3b1