diff options
author | George L. Albany <Megacake1234@gmail.com> | 2023-12-24 19:23:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-24 19:23:18 +0100 |
commit | d26c990d9a5596a3ef3b32ba1cb0f99950cd6d34 (patch) | |
tree | 1b99c935438692bb2ebadeac412b990c82089b65 /game/src/Game/Autoload/Resolution.gd | |
parent | 50b0b935b0bf0724f40b5140aca85d1830a8b1b3 (diff) | |
parent | b6413251a866c76538869b84ed1c9b9852f7c507 (diff) |
Merge pull request #178 from Spartan322/add-menu-type-hints
Diffstat (limited to 'game/src/Game/Autoload/Resolution.gd')
-rw-r--r-- | game/src/Game/Autoload/Resolution.gd | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/game/src/Game/Autoload/Resolution.gd b/game/src/Game/Autoload/Resolution.gd index 73169fb..9dddb29 100644 --- a/game/src/Game/Autoload/Resolution.gd +++ b/game/src/Game/Autoload/Resolution.gd @@ -27,7 +27,7 @@ var _resolutions : Array[Vector2i] const _regex_pattern : String = "(\\d+)\\s*[xX,]\\s*(\\d+)" var _regex : RegEx -func _ready(): +func _ready() -> void: assert(minimum_resolution.x > 0 and minimum_resolution.y > 0, "Minimum resolution must be positive!") for resolution_value in _starting_resolutions: add_resolution(resolution_value) @@ -53,7 +53,7 @@ func get_resolution_value_list() -> Array[Vector2i]: var list : Array[Vector2i] = [] # Return a sorted copy instead of a reference to the private array list.append_array(_resolutions) - list.sort_custom(func(a, b): return a > b) + list.sort_custom(func(a : Vector2i, b : Vector2i) -> bool: return a > b) return list func get_resolution_value_from_string(resolution_string : String) -> Vector2i: |