mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 15:38:14 +00:00
added the game
This commit is contained in:
18
Scripts/UI/SwapContainer.gd
Normal file
18
Scripts/UI/SwapContainer.gd
Normal file
@@ -0,0 +1,18 @@
|
||||
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()
|
Reference in New Issue
Block a user