add game menu

This commit was merged in pull request #19.
This commit is contained in:
2026-05-15 20:33:21 +00:00
parent 22877bffbe
commit 0e56a84a95
173 changed files with 3529 additions and 317 deletions

View File

@@ -0,0 +1,23 @@
extends Control
@onready var tabs: Array[GameMenuTab] = [$%Tab1, $%Tab2, $%Tab3]
@onready var pages: Array[Control] = [$%Page1, $%Page2, $%Page3]
func _ready() -> void:
for tab: GameMenuTab in tabs:
tab.on_tab_selected.connect(_on_tab_pressed)
tabs[0].select_without_animation()
pages[0].show()
func _on_tab_pressed(index: int):
for page in pages:
page.hide()
for tab in tabs:
if tab.index == index:
tab.select()
else:
tab.deselect()
pages[index].show()