aboutsummaryrefslogtreecommitdiff
path: root/game/src/Game/Menu/OptionMenu/ResolutionSelector.gd
diff options
context:
space:
mode:
author Hop311 <hop3114@gmail.com>2023-07-21 01:26:31 +0200
committer Hop311 <hop3114@gmail.com>2023-07-21 01:26:31 +0200
commit62d001b0fa209f259440e160503dc5ffe5bcaa8f (patch)
treea0b28dffaba50d351cab1619f54516be23d2aa6f /game/src/Game/Menu/OptionMenu/ResolutionSelector.gd
parentf3f240853b15a9f9b7cb561dc6626e7f342c5c74 (diff)
Tidying: missing req comments, submodules, hotkeys
Diffstat (limited to 'game/src/Game/Menu/OptionMenu/ResolutionSelector.gd')
-rw-r--r--game/src/Game/Menu/OptionMenu/ResolutionSelector.gd11
1 files changed, 5 insertions, 6 deletions
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):