From 3b254ea1f7bc89d3f624a581713a5ddb37527035 Mon Sep 17 00:00:00 2001 From: gdz Date: Tue, 26 Aug 2025 18:20:11 +0200 Subject: [PATCH] infoPanel integration. --- scenes/HUD/menu_bar.gd | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/scenes/HUD/menu_bar.gd b/scenes/HUD/menu_bar.gd index 3b5f574..7c85042 100644 --- a/scenes/HUD/menu_bar.gd +++ b/scenes/HUD/menu_bar.gd @@ -2,7 +2,7 @@ extends MenuBar func options_index_pressed(index): var curr_position = get_global_mouse_position() - + if index == 0: options_camera_pressed(curr_position) elif index == 1: @@ -13,9 +13,23 @@ func options_camera_pressed(target_position): var camera_menu = $Options/Camera camera_menu.position = target_position camera_menu.show() - -func options_world_pressed(target_position): + + +func options_world_pressed(target_position): var world_menu = $Options/World world_menu.position = target_position world_menu.show() + + +func info_index_pressed(index): + var infoPanel: Node = get_parent().get_node("InformationPanel") + if index == 0: #Camera + pass + elif index == 1: #World + infoPanel.call("worldInfoPanel") + infoPanel.call("ShowInfoPanel") + + elif index == 2: #Close + infoPanel.call("HideInfoPanel") + \ No newline at end of file