This repository has been archived on 2020-09-30. You can view files and clone it, but cannot push or open issues or pull requests.
odyssey-old/Scenes/UI.gd

19 lines
439 B
GDScript3
Raw Permalink Normal View History

2020-07-06 22:00:39 +00:00
extends Control
signal command(command)
2020-07-10 11:31:16 +00:00
enum ServerMenuItem {
SERVER_INFO
}
func _ready() -> void:
# Add options to menu buttons
var serverMenu = $Menu/Margins/Grid/Server.get_popup()
serverMenu.connect("id_pressed", self, "_server_option_chosen")
2020-07-10 13:37:13 +00:00
serverMenu.add_item("Server info", ServerMenuItem.SERVER_INFO)
2020-07-10 11:31:16 +00:00
func _server_option_chosen(id) -> void:
match id:
2020-07-10 13:37:13 +00:00
ServerMenuItem.SERVER_INFO:
2020-07-10 11:31:16 +00:00
$ServerInfoPopup.popup_centered()