2024-01-26 20:00:32 +00:00
|
|
|
# Copyright © 2023 Kasper Arnklit Frandsen - MIT License
|
2023-10-05 18:02:23 +00:00
|
|
|
# See `LICENSE.md` included in the source distribution for details.
|
|
|
|
@tool
|
|
|
|
extends MenuButton
|
|
|
|
|
|
|
|
signal generate_system_maps
|
|
|
|
|
|
|
|
enum RIVER_MENU {
|
|
|
|
GENERATE_SYSTEM_MAPS
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func _enter_tree() -> void:
|
|
|
|
get_popup().clear()
|
|
|
|
get_popup().connect("id_pressed", Callable(self, "_menu_item_selected"))
|
|
|
|
get_popup().add_item("Generate System Maps")
|
|
|
|
|
|
|
|
|
|
|
|
func _exit_tree() -> void:
|
|
|
|
get_popup().disconnect("id_pressed", Callable(self, "_menu_item_selected"))
|
|
|
|
|
|
|
|
|
|
|
|
func _menu_item_selected(index : int) -> void:
|
|
|
|
match index:
|
|
|
|
RIVER_MENU.GENERATE_SYSTEM_MAPS:
|
|
|
|
emit_signal("generate_system_maps")
|