21 lines
499 B
GDScript
21 lines
499 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()
|
|
|