mirror of
https://github.com/Steffo99/swear-jar.git
synced 2024-11-28 18:34:18 +00:00
Make Godot shut up about integer divisions
This commit is contained in:
parent
4f2a16113e
commit
6f3b0be6cb
1 changed files with 2 additions and 2 deletions
|
@ -20,9 +20,9 @@ func _on_viewport_size_changed():
|
||||||
print("[View] Window size is: ", window_size)
|
print("[View] Window size is: ", window_size)
|
||||||
var scaling_factor
|
var scaling_factor
|
||||||
if window_size.x < window_size.y:
|
if window_size.x < window_size.y:
|
||||||
scaling_factor = window_size.x / 270
|
scaling_factor = window_size.x / 270.0
|
||||||
else:
|
else:
|
||||||
scaling_factor = window_size.y / 480
|
scaling_factor = window_size.y / 480.0
|
||||||
print("[View] Scaling factor is: ", scaling_factor)
|
print("[View] Scaling factor is: ", scaling_factor)
|
||||||
get_window().set_content_scale_factor(scaling_factor)
|
get_window().set_content_scale_factor(scaling_factor)
|
||||||
game_safe_ui.set_safe_margins(scaling_factor)
|
game_safe_ui.set_safe_margins(scaling_factor)
|
||||||
|
|
Loading…
Reference in a new issue