Add controller ui

This commit is contained in:
2026-06-11 20:19:15 -05:00
parent 619bf09ab9
commit 456ea1e07e
6 changed files with 98 additions and 17 deletions
+4 -1
View File
@@ -7,9 +7,12 @@ func _ready() -> void:
tabs.tab_changed.connect(onTabChanged)
onTabChanged(tabs.current_tab)
func _notification(what:int) -> void:
if what == NOTIFICATION_VISIBILITY_CHANGED and visible:
tabs.grab_focus()
func onTabChanged(tabIndex:int) -> void:
for control in tabControls:
control.visible = false
if tabIndex >= 0 and tabIndex < tabControls.size():
tabControls[tabIndex].visible = true