Add controller ui
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user