improve ui and bug fix
This commit was merged in pull request #30.
This commit is contained in:
@@ -2,7 +2,7 @@ extends Control
|
||||
|
||||
@onready var tabs: Array[GameMenuTab] = [$%Tab1, $%Tab2, $%Tab3]
|
||||
@onready var pages: Array[GameMenuPage] = [$%Page1, $%Page2, $%Page3]
|
||||
|
||||
var current_index = 0
|
||||
|
||||
func _ready() -> void:
|
||||
for tab: GameMenuTab in tabs:
|
||||
@@ -27,3 +27,7 @@ func on_tab_pressed(index: int, disable_animation: bool = false) -> void:
|
||||
tab.deselect()
|
||||
|
||||
pages[index].show_page()
|
||||
current_index = index
|
||||
|
||||
func open() -> void:
|
||||
pages[current_index].show_page()
|
||||
|
||||
Reference in New Issue
Block a user