From f37372a9af003bdd00cbfebf77e8a5703663fdd9 Mon Sep 17 00:00:00 2001 From: cflip Date: Mon, 3 Oct 2022 18:22:23 -0600 Subject: Apply text shadow colour to all labels using a common interface theme --- scenes/interface.tscn | 9 +++++---- theme_data/interface_theme.tres | 4 ++++ 2 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 theme_data/interface_theme.tres diff --git a/scenes/interface.tscn b/scenes/interface.tscn index 5a79aca..e36bd9b 100644 --- a/scenes/interface.tscn +++ b/scenes/interface.tscn @@ -1,5 +1,6 @@ -[gd_scene load_steps=3 format=2] +[gd_scene load_steps=4 format=2] +[ext_resource path="res://theme_data/interface_theme.tres" type="Theme" id=1] [ext_resource path="res://textures/hourglass.png" type="Texture" id=2] [ext_resource path="res://scripts/interface.gd" type="Script" id=3] @@ -17,7 +18,7 @@ margin_top = 104.0 margin_right = 216.0 margin_bottom = 116.0 rect_scale = Vector2( 0.8, 0.8 ) -custom_colors/font_color_shadow = Color( 0.270588, 0.294118, 0.443137, 1 ) +theme = ExtResource( 1 ) text = "000" align = 2 @@ -26,7 +27,7 @@ margin_top = -2.0 margin_right = 48.0 margin_bottom = 14.0 rect_scale = Vector2( 0.8, 0.8 ) -custom_colors/font_color_shadow = Color( 0, 0, 0, 1 ) +theme = ExtResource( 1 ) text = "Score:" [node name="Timer" type="Timer" parent="."] @@ -47,7 +48,7 @@ margin_top = 112.0 margin_right = 88.0 margin_bottom = 128.0 rect_scale = Vector2( 0.5, 0.5 ) -custom_colors/font_color_shadow = Color( 0, 0, 0, 1 ) +theme = ExtResource( 1 ) text = "Next Phase: " [connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"] diff --git a/theme_data/interface_theme.tres b/theme_data/interface_theme.tres new file mode 100644 index 0000000..c536e8b --- /dev/null +++ b/theme_data/interface_theme.tres @@ -0,0 +1,4 @@ +[gd_resource type="Theme" format=2] + +[resource] +Label/colors/font_color_shadow = Color( 0.270588, 0.294118, 0.443137, 1 ) -- cgit v1.2.3