init
This commit is contained in:
commit
5c9d4c52f9
25 files changed
+428
No files matched your search
@@ -0,0 +1,18 @@
|
||||
extends TabBar
|
||||
|
||||
var last_tab = "3D Model"
|
||||
@onready var items = $"../VSplitContainer/TopBar"
|
||||
|
||||
func _ready() -> void:
|
||||
self.tab_changed.connect(_switch_tab)
|
||||
|
||||
func _switch_tab(idx: int) -> void:
|
||||
if items.has_node(last_tab):
|
||||
items.get_node(last_tab).visible=false
|
||||
|
||||
if idx!=-1:
|
||||
last_tab = self.get_tab_title(idx)
|
||||
if items.has_node(last_tab):
|
||||
items.get_node(last_tab).visible=true
|
||||
else:
|
||||
last_tab="null"
|
||||
Reference in new issue
Block a user