mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 15:38:14 +00:00
19 lines
381 B
GDScript
19 lines
381 B
GDScript
class_name SwapContainer
|
|
extends BoxContainer
|
|
|
|
@export var test_node: Control = null
|
|
@export var dummy_node: Control = null
|
|
|
|
func _ready() -> void:
|
|
resized.connect(check)
|
|
|
|
func check() -> void:
|
|
print(size.x >= test_node.size.x)
|
|
print([size.x, test_node.size.x])
|
|
if size.x > test_node.size.x:
|
|
test_node.show()
|
|
dummy_node.hide()
|
|
else:
|
|
test_node.hide()
|
|
dummy_node.show()
|