prog
This commit is contained in:
22
addons/madtalk/components/SideBar.gd
Normal file
22
addons/madtalk/components/SideBar.gd
Normal file
@@ -0,0 +1,22 @@
|
||||
@tool
|
||||
extends Panel
|
||||
|
||||
|
||||
@export var SizeClosed: int = 24
|
||||
|
||||
@onready var content = get_node_or_null("Content")
|
||||
|
||||
func _on_BtnTogglePanel_pressed():
|
||||
if (size.y == SizeClosed):
|
||||
# Open:
|
||||
anchor_bottom = 1
|
||||
offset_bottom = -16
|
||||
if content:
|
||||
content.show()
|
||||
else:
|
||||
# Close:
|
||||
anchor_bottom = 0
|
||||
size.y = SizeClosed
|
||||
if content:
|
||||
content.hide()
|
||||
|
Reference in New Issue
Block a user