35 lines
784 B
GDScript
35 lines
784 B
GDScript
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:
|
|
options_world_pressed(curr_position)
|
|
|
|
|
|
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):
|
|
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")
|
|
|
|
|