summaryrefslogtreecommitdiffstats
path: root/Main.gd
diff options
context:
space:
mode:
Diffstat (limited to 'Main.gd')
-rw-r--r--Main.gd6
1 files changed, 3 insertions, 3 deletions
diff --git a/Main.gd b/Main.gd
index 7de0300..36affaa 100644
--- a/Main.gd
+++ b/Main.gd
@@ -10,12 +10,12 @@ onready var Camera : Camera2D = $ViewportContainer/Viewport/Camera
func _ready():
UI.get_node("rotate").connect("pressed", Map, "on_rotate")
Map.connect("configure", Camera, "on_configure")
- Map.connect("touched", self, "on_touched")
+ Map.connect("hex_touched", self, "on_hex_touched")
Camera.window = $ViewportContainer/Viewport.size
Map.on_rotate()
-func on_touched(s : String) -> void:
- UI.get_node("Label").set_text(s)
+func on_hex_touched(pos : Vector2, hex : Hex, key : int) -> void:
+ UI.get_node("Info").set_text("\n(%d;%d)\n -> %s\n -> %d" % [int(pos.x), int(pos.y), hex.inspect(), key])
func _unhandled_input(event : InputEvent) -> void:
if event is InputEventMouseMotion: