|
|
|
|
Attention |
Topic was automatically imported from the old Question2Answer platform. |
|
Asked By |
grantsellis |
I am trying to scale a label. The scene is set up so that there is a Node2D with 2 child nodes: Label, the label, and Tween, the tween.
func _ready():
var labelRef = get_node("Label")
$Tween.interpolate_property(labelRef, "scale", Vector2(1, 1), Vector2(10, 10), 3, Tween.TRANS_LINEAR, Tween.EASE_IN)
$Tween.start()
The above code runs, but does not change the size of the label text.
|
|
|
|
Reply From: |
grantsellis |
The above scales the label’s text area. To scale the text, scale the font directly, e.g.
var main_label_font = get_node(“MainLabel”).get(“custom_fonts/font”)
var FinalSize = 800
$Tween.interpolate_property(main_label_font, “size”, FinalSize / 10, FinalSize, 3,
Tween.TRANS_LINEAR, Tween.EASE_IN)
#scaling text outline
FinalSize = 150
$Tween.interpolate_property(main_label_font, “outline_size”, FinalSize / 10, FinalSize, 3,
Tween.TRANS_LINEAR, Tween.EASE_IN)
system
3
|
|
|
|
Reply From: |
dydokamil |
replace scale
with rect_scale