Implemented spawn points correctly. Added saving & loading (currently only implemented with the spawn_index). You can now set spawn indicies in the DynamicAreaLoader to automatically load when the game is set to that value (on ready). Added configuration warnings to DynamicAreaLoader & PlayerSpawnPoint Added some generic translation (pot) files. Added AudioManager autoload to play, stop, fade audio streams (and set the bus directly). Added SceneFader autoload. Added SaveManager autoload. Added OptionsMenu with currently only volume sliders and a fullscreen toggle button. Added PauseMenu
26 lines
428 B
GDScript
26 lines
428 B
GDScript
class_name MenuBase
|
|
extends Control
|
|
|
|
signal menu_opened
|
|
signal menu_closed
|
|
|
|
var previous_menu: MenuBase
|
|
|
|
|
|
func open_menu(last_menu: MenuBase = previous_menu) -> void:
|
|
show()
|
|
|
|
if is_instance_valid(last_menu):
|
|
previous_menu = last_menu
|
|
last_menu.hide()
|
|
menu_opened.emit()
|
|
|
|
|
|
func close_menu() -> void:
|
|
hide()
|
|
|
|
if is_instance_valid(previous_menu):
|
|
previous_menu.open_menu()
|
|
previous_menu = null
|
|
menu_closed.emit()
|