mirror of
https://github.com/Steffo99/swear-jar.git
synced 2024-11-25 00:54:19 +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)
|
||||
var scaling_factor
|
||||
if window_size.x < window_size.y:
|
||||
scaling_factor = window_size.x / 270
|
||||
scaling_factor = window_size.x / 270.0
|
||||
else:
|
||||
scaling_factor = window_size.y / 480
|
||||
scaling_factor = window_size.y / 480.0
|
||||
print("[View] Scaling factor is: ", scaling_factor)
|
||||
get_window().set_content_scale_factor(scaling_factor)
|
||||
game_safe_ui.set_safe_margins(scaling_factor)
|
||||
|
|
Loading…
Reference in a new issue