diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2020-07-15 11:24:56 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2020-07-15 11:24:56 +0200 |
commit | fa92fda3e7ea53d479402dcdbd153177ef030c21 (patch) | |
tree | 491e732222841eea279384a06d7c83a49bb8a39c /Main.gd | |
parent | 594a82b45e5d9dcd90faad8fa4f8eb42b2c981b6 (diff) | |
download | godot-hexgrid-fa92fda3e7ea53d479402dcdbd153177ef030c21.zip godot-hexgrid-fa92fda3e7ea53d479402dcdbd153177ef030c21.tar.gz |
timeout before resized on ready (fix android), OSInfo
Diffstat (limited to 'Main.gd')
-rw-r--r-- | Main.gd | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -17,7 +17,9 @@ func _ready(): Map.connect("hex_touched", self, "on_hex_touched") $CanvasLayer/HBOX/ViewportContainer.connect("resized", self, "on_viewport_resized") on_toggle() + yield(get_tree().create_timer(.2), 'timeout') on_viewport_resized() + UI.get_node("OSInfo").text = "screen\n%s\ndpi %d" % [OS.get_screen_size(), OS.get_screen_dpi()] func on_viewport_resized() -> void: Camera.configure($CanvasLayer/HBOX/ViewportContainer/Viewport.size, Map.center(), Map.texture_size()) |