summaryrefslogtreecommitdiff
path: root/UI/HUD/LevelMap.gd
diff options
context:
space:
mode:
authorDaniel Weipert <code@drogueronin.de>2023-06-18 16:43:22 +0200
committerDaniel Weipert <code@drogueronin.de>2023-06-18 16:43:22 +0200
commit395c25b1fbe51f42decf402f97e51eabcc8c0a77 (patch)
tree72a17c71a39b53d328a76e111ae205d9538d64d0 /UI/HUD/LevelMap.gd
parent2686ec6d4af6b5437a5f5a5cac008f3d38295f78 (diff)
Godot v3 -> v4
Diffstat (limited to 'UI/HUD/LevelMap.gd')
-rw-r--r--UI/HUD/LevelMap.gd8
1 files changed, 4 insertions, 4 deletions
diff --git a/UI/HUD/LevelMap.gd b/UI/HUD/LevelMap.gd
index 1b4b860..8c67520 100644
--- a/UI/HUD/LevelMap.gd
+++ b/UI/HUD/LevelMap.gd
@@ -2,7 +2,7 @@ extends Panel
func _ready():
- Global.connect("level_map_updated", self, "draw")
+ Global.connect("level_map_updated", Callable(self, "draw"))
self.draw()
@@ -11,13 +11,13 @@ func draw():
#var Level = get_parent().get_parent() # HUD > Level
for idx in range(Global.Level_Map.size()): # size = 9
- var cell = Cell.instance()
+ var cell = Cell.instantiate()
cell.level_idx = idx
cell.set_rect_size(150/3, 150/3)
var column = idx % 3
var row = idx / 3
- cell.rect_position.x = cell.rect_size.x*column
- cell.rect_position.y = cell.rect_size.y*row
+ cell.position.x = cell.size.x*column
+ cell.position.y = cell.size.y*row
#if idx == Level.idx:
#cell.set_border_width_all(3)