From 0eb22020e380643ec5cd2c12f983403c2dd3b751 Mon Sep 17 00:00:00 2001 From: jacopograndi Date: Tue, 18 Jan 2022 18:04:34 +0100 Subject: load map gui & start doc balance --- scripts/gui_picker.gd | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'scripts/gui_picker.gd') diff --git a/scripts/gui_picker.gd b/scripts/gui_picker.gd index 616b3e8..9a7e373 100644 --- a/scripts/gui_picker.gd +++ b/scripts/gui_picker.gd @@ -33,7 +33,7 @@ func build (options : Array = []): _options = options for opt in _options: var button = _gui_button.instance() - button.option = opt.name + button.option = opt if opt.type == "turret buy": var tinfo = load_turrets.info[opt.name] @@ -60,11 +60,11 @@ func build (options : Array = []): func refresh (): _fetch() -func _on_gui_turret_mouse_entered(option : String): - hovering = option; +func _on_gui_turret_mouse_entered(option : Dictionary): + hovering = option.name; -func _on_gui_turret_mouse_exited(option : String): +func _on_gui_turret_mouse_exited(option : Dictionary): hovering = "" -func _on_gui_turret_pressed(option : String): - gui.control.do(Globals.PlayerActions.PICK, { "selected": option }) +func _on_gui_turret_pressed(option : Dictionary): + gui.control.do(Globals.PlayerActions.PICK, option) -- cgit v1.2.3-54-g00ecf