aboutsummaryrefslogtreecommitdiff
path: root/game/src/Game/Autoload/GuiScale.gd
diff options
context:
space:
mode:
author Spartan322 <Megacake1234@gmail.com>2023-12-23 05:01:51 +0100
committer George L. Albany <Megacake1234@gmail.com>2023-12-24 04:52:36 +0100
commitb6413251a866c76538869b84ed1c9b9852f7c507 (patch)
tree1b99c935438692bb2ebadeac412b990c82089b65 /game/src/Game/Autoload/GuiScale.gd
parent50b0b935b0bf0724f40b5140aca85d1830a8b1b3 (diff)
Apply type hints to menu scripts
Diffstat (limited to 'game/src/Game/Autoload/GuiScale.gd')
-rw-r--r--game/src/Game/Autoload/GuiScale.gd6
1 files changed, 3 insertions, 3 deletions
diff --git a/game/src/Game/Autoload/GuiScale.gd b/game/src/Game/Autoload/GuiScale.gd
index d364ff5..b8af59c 100644
--- a/game/src/Game/Autoload/GuiScale.gd
+++ b/game/src/Game/Autoload/GuiScale.gd
@@ -18,9 +18,9 @@ var _guiscales: Dictionary
#Similar to Resolution.gd, but we don't bother checking for strings from files
#and we have floats instead of vector2 integers
-func _ready():
+func _ready() -> void:
assert(minimum_guiscale > 0, "Minimum gui scale must be positive")
- for guiscale_value in _starting_guiscales:
+ for guiscale_value : float in _starting_guiscales:
add_guiscale(guiscale_value, _starting_guiscales[guiscale_value])
assert(not _guiscales.is_empty(), "No valid starting gui scales!")
@@ -43,7 +43,7 @@ func add_guiscale(guiscale_value: float, guiscale_name: StringName=&"") -> bool:
#returns floats
func get_guiscale_value_list() -> Array:
var list := _guiscales.keys()
- list.sort_custom(func(a, b): return a > b)
+ list.sort_custom(func(a : float, b : float) -> bool: return a > b)
return list
func get_guiscale_display_name(guiscale_value : float) -> StringName: