Newbie here, I want to edit via code the outline color of label in Godot but it seems I can't find the exact property or method. I tried $Label.font_outline_color = Color.GREEN but it says "Invalid set index 'font_outline_color', although in the Godot doc it says that this property exists as a Theme Property. Is there something as a theme object?
$PanelContainer/MarginContainer/Rows/GameOverLabel.text = "YOU WIN" $PanelContainer/MarginContainer/Rows/GameOverLabel.add_theme_color_override("font_outline_color",Color.GREEN) $PanelContainer/MarginContainer/Rows/GameOverLabel.add_theme_constant_override("outline_size", 5)
I still get Red
because I hadn’t assigned a settings value for it in the editor. It doesn’t come with a settings resource automatically, so you need to either initialise it in code like this, or make a resource here:
the settings for a label is a resource that gets saved to disk, so that you can reuse the same settings in any label you want, but the label itself is a node that gets saved to the scene, so it hadnt actually been initialised yet