Fixed warnings
This commit is contained in:
@@ -43,14 +43,16 @@ func _ready() -> void:
|
|||||||
|
|
||||||
|
|
||||||
func _update_size() -> void:
|
func _update_size() -> void:
|
||||||
|
var new_size := Vector2.ZERO
|
||||||
match size:
|
match size:
|
||||||
Size.Small:
|
Size.Small:
|
||||||
rect.size = SMALL_SIZE
|
new_size = SMALL_SIZE
|
||||||
Size.Big:
|
Size.Big:
|
||||||
rect.size = BIG_SIZE
|
new_size = BIG_SIZE
|
||||||
Size.Custom:
|
Size.Custom:
|
||||||
rect.size = custom_size
|
new_size = custom_size
|
||||||
rect.position = -rect.size/2
|
rect.set_deferred("size", new_size)
|
||||||
|
rect.set_deferred("position", -new_size/2)
|
||||||
|
|
||||||
|
|
||||||
func _update_text() -> void:
|
func _update_text() -> void:
|
||||||
|
|||||||
@@ -6,11 +6,9 @@
|
|||||||
size = 1
|
size = 1
|
||||||
text = "===>"
|
text = "===>"
|
||||||
|
|
||||||
[node name="SmallSprite" parent="." index="0" unique_id=1649957299]
|
[node name="NinePatchRect" parent="." index="0" unique_id=422652892]
|
||||||
visible = false
|
offset_left = -48.0
|
||||||
|
offset_right = 48.0
|
||||||
|
|
||||||
[node name="BigSprite" parent="." index="1" unique_id=835120450]
|
[node name="Label" parent="." index="1" unique_id=1747099762]
|
||||||
visible = true
|
|
||||||
|
|
||||||
[node name="Label" parent="." index="2" unique_id=1747099762]
|
|
||||||
text = "===>"
|
text = "===>"
|
||||||
|
|||||||
Reference in New Issue
Block a user