From 0bbf94289a7f1fa7c66d042fe26da9cdae78d75b Mon Sep 17 00:00:00 2001 From: Phillip Tarrant Date: Mon, 13 Jul 2026 14:48:17 -0500 Subject: [PATCH] feat(theme): the creation screen's five variations SelectCard (a Button whose `pressed` IS the chosen ring), SkillChip (a toggle with unpicked/picked/granted-so-inert), the CHOSEN and PRIMARY tags, and the gold PrimaryCard ring. Plus INK_LABEL_MUTED for the sheet's section headers. Built by build_game_theme.gd and regenerated; the .tres is never hand-edited. --- client/assets/theme/game_theme.tres | 388 ++++++++++++++++++----- client/scripts/theme/build_game_theme.gd | 69 ++++ client/scripts/theme/palette.gd | 1 + client/scripts/theme/theme_keys.gd | 11 + client/tests/unit/test_theme_resource.gd | 26 ++ 5 files changed, 409 insertions(+), 86 deletions(-) diff --git a/client/assets/theme/game_theme.tres b/client/assets/theme/game_theme.tres index c6c3265..2f94a07 100644 --- a/client/assets/theme/game_theme.tres +++ b/client/assets/theme/game_theme.tres @@ -60,6 +60,22 @@ content_margin_left = 12.0 content_margin_top = 6.0 content_margin_right = 12.0 content_margin_bottom = 6.0 +bg_color = Color(0.56078434, 0.22745098, 0.20392157, 1) +border_width_left = 1 +border_width_top = 1 +border_width_right = 1 +border_width_bottom = 1 +border_color = Color(0.56078434, 0.22745098, 0.20392157, 1) +corner_radius_top_left = 5 +corner_radius_top_right = 5 +corner_radius_bottom_right = 5 +corner_radius_bottom_left = 5 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ube3r"] +content_margin_left = 12.0 +content_margin_top = 6.0 +content_margin_right = 12.0 +content_margin_bottom = 6.0 bg_color = Color(0.07058824, 0.05882353, 0.043137256, 0.7) border_width_left = 1 border_width_top = 1 @@ -71,9 +87,9 @@ corner_radius_top_right = 4 corner_radius_bottom_right = 4 corner_radius_bottom_left = 4 -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ube3r"] +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_2tooq"] -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_2tooq"] +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_4kten"] content_margin_left = 12.0 content_margin_top = 6.0 content_margin_right = 12.0 @@ -89,7 +105,7 @@ corner_radius_top_right = 8 corner_radius_bottom_right = 8 corner_radius_bottom_left = 8 -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_4kten"] +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_p6wtm"] content_margin_left = 12.0 content_margin_top = 6.0 content_margin_right = 12.0 @@ -105,7 +121,7 @@ corner_radius_top_right = 8 corner_radius_bottom_right = 8 corner_radius_bottom_left = 8 -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_p6wtm"] +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0fjdt"] content_margin_left = 12.0 content_margin_top = 6.0 content_margin_right = 12.0 @@ -121,7 +137,7 @@ corner_radius_top_right = 8 corner_radius_bottom_right = 8 corner_radius_bottom_left = 8 -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0fjdt"] +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ns3kg"] content_margin_left = 12.0 content_margin_top = 6.0 content_margin_right = 12.0 @@ -137,7 +153,7 @@ corner_radius_top_right = 6 corner_radius_bottom_right = 6 corner_radius_bottom_left = 6 -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ns3kg"] +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_jly1r"] content_margin_left = 12.0 content_margin_top = 6.0 content_margin_right = 12.0 @@ -154,7 +170,7 @@ corner_radius_top_right = 6 corner_radius_bottom_right = 6 corner_radius_bottom_left = 6 -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_jly1r"] +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_lw8lk"] content_margin_left = 12.0 content_margin_top = 6.0 content_margin_right = 12.0 @@ -170,9 +186,9 @@ corner_radius_top_right = 8 corner_radius_bottom_right = 8 corner_radius_bottom_left = 8 -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_lw8lk"] +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_nh0e7"] -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_nh0e7"] +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_dtr07"] content_margin_left = 12.0 content_margin_top = 6.0 content_margin_right = 12.0 @@ -188,7 +204,7 @@ corner_radius_top_right = 8 corner_radius_bottom_right = 8 corner_radius_bottom_left = 8 -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_dtr07"] +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_nmowx"] content_margin_left = 12.0 content_margin_top = 6.0 content_margin_right = 12.0 @@ -204,7 +220,7 @@ corner_radius_top_right = 8 corner_radius_bottom_right = 8 corner_radius_bottom_left = 8 -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_nmowx"] +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_oi067"] content_margin_left = 12.0 content_margin_top = 6.0 content_margin_right = 12.0 @@ -220,7 +236,7 @@ corner_radius_top_right = 8 corner_radius_bottom_right = 8 corner_radius_bottom_left = 8 -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_oi067"] +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ukblj"] content_margin_left = 12.0 content_margin_top = 6.0 content_margin_right = 12.0 @@ -236,7 +252,7 @@ corner_radius_top_right = 6 corner_radius_bottom_right = 6 corner_radius_bottom_left = 6 -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ukblj"] +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_utt73"] content_margin_left = 12.0 content_margin_top = 6.0 content_margin_right = 12.0 @@ -252,7 +268,7 @@ corner_radius_top_right = 4 corner_radius_bottom_right = 4 corner_radius_bottom_left = 4 -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_utt73"] +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_5u8fh"] content_margin_left = 12.0 content_margin_top = 6.0 content_margin_right = 12.0 @@ -268,28 +284,12 @@ corner_radius_top_right = 4 corner_radius_bottom_right = 4 corner_radius_bottom_left = 4 -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_5u8fh"] -content_margin_left = 12.0 -content_margin_top = 6.0 -content_margin_right = 12.0 -content_margin_bottom = 6.0 -bg_color = Color(0.72156864, 0.32156864, 0.2901961, 1) -border_width_left = 1 -border_width_top = 1 -border_width_right = 1 -border_width_bottom = 1 -border_color = Color(0.56078434, 0.22745098, 0.20392157, 1) -corner_radius_top_left = 4 -corner_radius_top_right = 4 -corner_radius_bottom_right = 4 -corner_radius_bottom_left = 4 - [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_p0qbh"] content_margin_left = 12.0 content_margin_top = 6.0 content_margin_right = 12.0 content_margin_bottom = 6.0 -bg_color = Color(0.56078434, 0.22745098, 0.20392157, 1) +bg_color = Color(0.72156864, 0.32156864, 0.2901961, 1) border_width_left = 1 border_width_top = 1 border_width_right = 1 @@ -305,6 +305,22 @@ content_margin_left = 12.0 content_margin_top = 6.0 content_margin_right = 12.0 content_margin_bottom = 6.0 +bg_color = Color(0.56078434, 0.22745098, 0.20392157, 1) +border_width_left = 1 +border_width_top = 1 +border_width_right = 1 +border_width_bottom = 1 +border_color = Color(0.56078434, 0.22745098, 0.20392157, 1) +corner_radius_top_left = 4 +corner_radius_top_right = 4 +corner_radius_bottom_right = 4 +corner_radius_bottom_left = 4 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_txxuc"] +content_margin_left = 12.0 +content_margin_top = 6.0 +content_margin_right = 12.0 +content_margin_bottom = 6.0 bg_color = Color(0.47843137, 0.18431373, 0.16078432, 1) border_width_left = 1 border_width_top = 1 @@ -316,75 +332,155 @@ corner_radius_top_right = 4 corner_radius_bottom_right = 4 corner_radius_bottom_left = 4 -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_txxuc"] - [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_7d6ug"] content_margin_left = 12.0 content_margin_top = 6.0 content_margin_right = 12.0 content_margin_bottom = 6.0 bg_color = Color(0.94509804, 0.9098039, 0.8235294, 1) -border_width_left = 1 -border_width_top = 1 -border_width_right = 1 -border_width_bottom = 1 -border_color = Color(0.79607844, 0.7137255, 0.5176471, 1) -corner_radius_top_left = 14 -corner_radius_top_right = 14 -corner_radius_bottom_right = 14 -corner_radius_bottom_left = 14 +border_width_left = 2 +border_width_top = 2 +border_width_right = 2 +border_width_bottom = 2 +border_color = Color(0.56078434, 0.41568628, 0.16470589, 1) +corner_radius_top_left = 12 +corner_radius_top_right = 12 +corner_radius_bottom_right = 12 +corner_radius_bottom_left = 12 [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_najyk"] content_margin_left = 12.0 content_margin_top = 6.0 content_margin_right = 12.0 content_margin_bottom = 6.0 -bg_color = Color(0.9372549, 0.9019608, 0.8117647, 1) +bg_color = Color(0.56078434, 0.41568628, 0.16470589, 1) border_width_left = 1 border_width_top = 1 border_width_right = 1 border_width_bottom = 1 -border_color = Color(0.79607844, 0.7137255, 0.5176471, 1) -corner_radius_top_left = 14 -corner_radius_top_right = 14 -corner_radius_bottom_right = 14 -corner_radius_bottom_left = 14 +border_color = Color(0.56078434, 0.41568628, 0.16470589, 1) +corner_radius_top_left = 5 +corner_radius_top_right = 5 +corner_radius_bottom_right = 5 +corner_radius_bottom_left = 5 [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_jtb1k"] content_margin_left = 12.0 content_margin_top = 6.0 content_margin_right = 12.0 content_margin_bottom = 6.0 +bg_color = Color(0.8509804, 0.7882353, 0.63529414, 1) +border_width_left = 1 +border_width_top = 1 +border_width_right = 1 +border_width_bottom = 1 +border_color = Color(0.6627451, 0.5803922, 0.39215687, 1) +corner_radius_top_left = 12 +corner_radius_top_right = 12 +corner_radius_bottom_right = 12 +corner_radius_bottom_left = 12 + +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_wmbj4"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_xdylb"] +content_margin_left = 12.0 +content_margin_top = 6.0 +content_margin_right = 12.0 +content_margin_bottom = 6.0 bg_color = Color(0.9019608, 0.8509804, 0.72156864, 1) border_width_left = 1 border_width_top = 1 border_width_right = 1 border_width_bottom = 1 -border_color = Color(0.7490196, 0.65882355, 0.47058824, 1) -corner_radius_top_left = 14 -corner_radius_top_right = 14 -corner_radius_bottom_right = 14 -corner_radius_bottom_left = 14 +border_color = Color(0.6627451, 0.5803922, 0.39215687, 1) +corner_radius_top_left = 12 +corner_radius_top_right = 12 +corner_radius_bottom_right = 12 +corner_radius_bottom_left = 12 -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_wmbj4"] - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_xdylb"] +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_pjnll"] content_margin_left = 12.0 content_margin_top = 6.0 content_margin_right = 12.0 content_margin_bottom = 6.0 -bg_color = Color(0.72156864, 0.32156864, 0.2901961, 1) +bg_color = Color(0.94509804, 0.9098039, 0.8235294, 1) border_width_left = 1 border_width_top = 1 border_width_right = 1 border_width_bottom = 1 -border_color = Color(0.72156864, 0.32156864, 0.2901961, 1) +border_color = Color(0.7490196, 0.65882355, 0.47058824, 1) +corner_radius_top_left = 12 +corner_radius_top_right = 12 +corner_radius_bottom_right = 12 +corner_radius_bottom_left = 12 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_klelq"] +content_margin_left = 12.0 +content_margin_top = 6.0 +content_margin_right = 12.0 +content_margin_bottom = 6.0 +bg_color = Color(0.94509804, 0.9098039, 0.8235294, 1) +border_width_left = 3 +border_width_top = 3 +border_width_right = 3 +border_width_bottom = 3 +border_color = Color(0.56078434, 0.22745098, 0.20392157, 1) +corner_radius_top_left = 12 +corner_radius_top_right = 12 +corner_radius_bottom_right = 12 +corner_radius_bottom_left = 12 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_i2sl5"] +content_margin_left = 12.0 +content_margin_top = 6.0 +content_margin_right = 12.0 +content_margin_bottom = 6.0 +bg_color = Color(0.8509804, 0.7882353, 0.63529414, 1) +border_width_left = 1 +border_width_top = 1 +border_width_right = 1 +border_width_bottom = 1 +border_color = Color(0.6627451, 0.5803922, 0.39215687, 1) corner_radius_top_left = 14 corner_radius_top_right = 14 corner_radius_bottom_right = 14 corner_radius_bottom_left = 14 -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_pjnll"] +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_onsig"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_gw0t7"] +content_margin_left = 12.0 +content_margin_top = 6.0 +content_margin_right = 12.0 +content_margin_bottom = 6.0 +bg_color = Color(0.9019608, 0.8509804, 0.72156864, 1) +border_width_left = 1 +border_width_top = 1 +border_width_right = 1 +border_width_bottom = 1 +border_color = Color(0.3529412, 0.2627451, 0.14901961, 1) +corner_radius_top_left = 14 +corner_radius_top_right = 14 +corner_radius_bottom_right = 14 +corner_radius_bottom_left = 14 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_88l5g"] +content_margin_left = 12.0 +content_margin_top = 6.0 +content_margin_right = 12.0 +content_margin_bottom = 6.0 +bg_color = Color(0.94509804, 0.9098039, 0.8235294, 1) +border_width_left = 1 +border_width_top = 1 +border_width_right = 1 +border_width_bottom = 1 +border_color = Color(0.6627451, 0.5803922, 0.39215687, 1) +corner_radius_top_left = 14 +corner_radius_top_right = 14 +corner_radius_bottom_right = 14 +corner_radius_bottom_left = 14 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_f8qac"] content_margin_left = 12.0 content_margin_top = 6.0 content_margin_right = 12.0 @@ -400,7 +496,91 @@ corner_radius_top_right = 14 corner_radius_bottom_right = 14 corner_radius_bottom_left = 14 -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_klelq"] +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_u6gcs"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_nufy3"] +content_margin_left = 12.0 +content_margin_top = 6.0 +content_margin_right = 12.0 +content_margin_bottom = 6.0 +bg_color = Color(0.94509804, 0.9098039, 0.8235294, 1) +border_width_left = 1 +border_width_top = 1 +border_width_right = 1 +border_width_bottom = 1 +border_color = Color(0.79607844, 0.7137255, 0.5176471, 1) +corner_radius_top_left = 14 +corner_radius_top_right = 14 +corner_radius_bottom_right = 14 +corner_radius_bottom_left = 14 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0d7vs"] +content_margin_left = 12.0 +content_margin_top = 6.0 +content_margin_right = 12.0 +content_margin_bottom = 6.0 +bg_color = Color(0.9372549, 0.9019608, 0.8117647, 1) +border_width_left = 1 +border_width_top = 1 +border_width_right = 1 +border_width_bottom = 1 +border_color = Color(0.79607844, 0.7137255, 0.5176471, 1) +corner_radius_top_left = 14 +corner_radius_top_right = 14 +corner_radius_bottom_right = 14 +corner_radius_bottom_left = 14 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_3fnfk"] +content_margin_left = 12.0 +content_margin_top = 6.0 +content_margin_right = 12.0 +content_margin_bottom = 6.0 +bg_color = Color(0.9019608, 0.8509804, 0.72156864, 1) +border_width_left = 1 +border_width_top = 1 +border_width_right = 1 +border_width_bottom = 1 +border_color = Color(0.7490196, 0.65882355, 0.47058824, 1) +corner_radius_top_left = 14 +corner_radius_top_right = 14 +corner_radius_bottom_right = 14 +corner_radius_bottom_left = 14 + +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_2txdw"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_w7qkp"] +content_margin_left = 12.0 +content_margin_top = 6.0 +content_margin_right = 12.0 +content_margin_bottom = 6.0 +bg_color = Color(0.72156864, 0.32156864, 0.2901961, 1) +border_width_left = 1 +border_width_top = 1 +border_width_right = 1 +border_width_bottom = 1 +border_color = Color(0.72156864, 0.32156864, 0.2901961, 1) +corner_radius_top_left = 14 +corner_radius_top_right = 14 +corner_radius_bottom_right = 14 +corner_radius_bottom_left = 14 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_rthnr"] +content_margin_left = 12.0 +content_margin_top = 6.0 +content_margin_right = 12.0 +content_margin_bottom = 6.0 +bg_color = Color(0.56078434, 0.22745098, 0.20392157, 1) +border_width_left = 1 +border_width_top = 1 +border_width_right = 1 +border_width_bottom = 1 +border_color = Color(0.56078434, 0.22745098, 0.20392157, 1) +corner_radius_top_left = 14 +corner_radius_top_right = 14 +corner_radius_bottom_right = 14 +corner_radius_bottom_left = 14 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ta3oh"] content_margin_left = 12.0 content_margin_top = 6.0 content_margin_right = 12.0 @@ -431,22 +611,27 @@ Chip/styles/focus = SubResource("StyleBoxEmpty_cqbvn") Chip/styles/hover = SubResource("StyleBoxFlat_q5gpk") Chip/styles/normal = SubResource("StyleBoxFlat_bbpmc") Chip/styles/pressed = SubResource("StyleBoxFlat_73lme") +ChosenTag/base_type = &"Label" +ChosenTag/colors/font_color = Color(0.9411765, 0.9019608, 0.8156863, 1) +ChosenTag/font_sizes/font_size = 10 +ChosenTag/fonts/font = ExtResource("2_4lwr2") +ChosenTag/styles/normal = SubResource("StyleBoxFlat_js3tr") DarkPanel/base_type = &"PanelContainer" -DarkPanel/styles/panel = SubResource("StyleBoxFlat_js3tr") +DarkPanel/styles/panel = SubResource("StyleBoxFlat_ube3r") DockButton/base_type = &"Button" DockButton/colors/font_color = Color(0.7882353, 0.7411765, 0.6392157, 1) -DockButton/styles/focus = SubResource("StyleBoxEmpty_ube3r") -DockButton/styles/hover = SubResource("StyleBoxFlat_2tooq") -DockButton/styles/normal = SubResource("StyleBoxFlat_4kten") -DockButton/styles/pressed = SubResource("StyleBoxFlat_p6wtm") +DockButton/styles/focus = SubResource("StyleBoxEmpty_2tooq") +DockButton/styles/hover = SubResource("StyleBoxFlat_4kten") +DockButton/styles/normal = SubResource("StyleBoxFlat_p6wtm") +DockButton/styles/pressed = SubResource("StyleBoxFlat_0fjdt") Heading/base_type = &"Label" Heading/colors/font_color = Color(0.22745098, 0.18431373, 0.10980392, 1) Heading/font_sizes/font_size = 34 Heading/fonts/font = ExtResource("3_eckwq") ItemTile/base_type = &"PanelContainer" -ItemTile/styles/panel = SubResource("StyleBoxFlat_0fjdt") +ItemTile/styles/panel = SubResource("StyleBoxFlat_ns3kg") ItemTileEmpty/base_type = &"PanelContainer" -ItemTileEmpty/styles/panel = SubResource("StyleBoxFlat_ns3kg") +ItemTileEmpty/styles/panel = SubResource("StyleBoxFlat_jly1r") Mono/base_type = &"Label" Mono/colors/font_color = Color(0.6039216, 0.56078434, 0.47058824, 1) Mono/font_sizes/font_size = 13 @@ -454,38 +639,69 @@ Mono/fonts/font = ExtResource("2_4lwr2") ParchmentButton/base_type = &"Button" ParchmentButton/colors/font_color = Color(0.2901961, 0.24705882, 0.17254902, 1) ParchmentButton/colors/font_disabled_color = Color(0.41568628, 0.3529412, 0.22745098, 1) -ParchmentButton/styles/disabled = SubResource("StyleBoxFlat_jly1r") -ParchmentButton/styles/focus = SubResource("StyleBoxEmpty_lw8lk") -ParchmentButton/styles/hover = SubResource("StyleBoxFlat_nh0e7") -ParchmentButton/styles/normal = SubResource("StyleBoxFlat_dtr07") -ParchmentButton/styles/pressed = SubResource("StyleBoxFlat_nmowx") +ParchmentButton/styles/disabled = SubResource("StyleBoxFlat_lw8lk") +ParchmentButton/styles/focus = SubResource("StyleBoxEmpty_nh0e7") +ParchmentButton/styles/hover = SubResource("StyleBoxFlat_dtr07") +ParchmentButton/styles/normal = SubResource("StyleBoxFlat_nmowx") +ParchmentButton/styles/pressed = SubResource("StyleBoxFlat_oi067") ParchmentCard/base_type = &"PanelContainer" -ParchmentCard/styles/panel = SubResource("StyleBoxFlat_oi067") +ParchmentCard/styles/panel = SubResource("StyleBoxFlat_ukblj") ParchmentInset/base_type = &"PanelContainer" -ParchmentInset/styles/panel = SubResource("StyleBoxFlat_ukblj") +ParchmentInset/styles/panel = SubResource("StyleBoxFlat_utt73") PrimaryCTA/base_type = &"Button" PrimaryCTA/colors/font_color = Color(0.9411765, 0.9019608, 0.8156863, 1) PrimaryCTA/colors/font_disabled_color = Color(0.6039216, 0.56078434, 0.47058824, 1) -PrimaryCTA/styles/disabled = SubResource("StyleBoxFlat_utt73") -PrimaryCTA/styles/hover = SubResource("StyleBoxFlat_5u8fh") -PrimaryCTA/styles/normal = SubResource("StyleBoxFlat_p0qbh") -PrimaryCTA/styles/pressed = SubResource("StyleBoxFlat_6y6ak") +PrimaryCTA/styles/disabled = SubResource("StyleBoxFlat_5u8fh") +PrimaryCTA/styles/hover = SubResource("StyleBoxFlat_p0qbh") +PrimaryCTA/styles/normal = SubResource("StyleBoxFlat_6y6ak") +PrimaryCTA/styles/pressed = SubResource("StyleBoxFlat_txxuc") +PrimaryCard/base_type = &"PanelContainer" +PrimaryCard/styles/panel = SubResource("StyleBoxFlat_7d6ug") +PrimaryTag/base_type = &"Label" +PrimaryTag/colors/font_color = Color(0.9411765, 0.9019608, 0.8156863, 1) +PrimaryTag/font_sizes/font_size = 9 +PrimaryTag/fonts/font = ExtResource("2_4lwr2") +PrimaryTag/styles/normal = SubResource("StyleBoxFlat_najyk") RichTextLabel/colors/default_color = Color(0.2901961, 0.24705882, 0.17254902, 1) RichTextLabel/font_sizes/normal_font_size = 20 RichTextLabel/fonts/italics_font = ExtResource("4_i0b23") RichTextLabel/fonts/normal_font = ExtResource("3_eckwq") +SectionLabel/base_type = &"Label" +SectionLabel/colors/font_color = Color(0.5411765, 0.46666667, 0.28235295, 1) +SectionLabel/font_sizes/font_size = 13 +SectionLabel/fonts/font = ExtResource("2_4lwr2") +SelectCard/base_type = &"Button" +SelectCard/colors/font_color = Color(0.22745098, 0.18431373, 0.10980392, 1) +SelectCard/colors/font_disabled_color = Color(0.41568628, 0.3529412, 0.22745098, 1) +SelectCard/styles/disabled = SubResource("StyleBoxFlat_jtb1k") +SelectCard/styles/focus = SubResource("StyleBoxEmpty_wmbj4") +SelectCard/styles/hover = SubResource("StyleBoxFlat_xdylb") +SelectCard/styles/normal = SubResource("StyleBoxFlat_pjnll") +SelectCard/styles/pressed = SubResource("StyleBoxFlat_klelq") +SkillChip/base_type = &"Button" +SkillChip/colors/font_color = Color(0.3529412, 0.2627451, 0.14901961, 1) +SkillChip/colors/font_disabled_color = Color(0.6627451, 0.5803922, 0.39215687, 1) +SkillChip/colors/font_hover_color = Color(0.3529412, 0.2627451, 0.14901961, 1) +SkillChip/colors/font_pressed_color = Color(0.9411765, 0.9019608, 0.8156863, 1) +SkillChip/font_sizes/font_size = 12 +SkillChip/fonts/font = ExtResource("2_4lwr2") +SkillChip/styles/disabled = SubResource("StyleBoxFlat_i2sl5") +SkillChip/styles/focus = SubResource("StyleBoxEmpty_onsig") +SkillChip/styles/hover = SubResource("StyleBoxFlat_gw0t7") +SkillChip/styles/normal = SubResource("StyleBoxFlat_88l5g") +SkillChip/styles/pressed = SubResource("StyleBoxFlat_f8qac") Tab/base_type = &"Button" Tab/colors/font_color = Color(0.41568628, 0.3529412, 0.22745098, 1) -Tab/styles/focus = SubResource("StyleBoxEmpty_txxuc") -Tab/styles/hover = SubResource("StyleBoxFlat_7d6ug") -Tab/styles/normal = SubResource("StyleBoxFlat_najyk") -Tab/styles/pressed = SubResource("StyleBoxFlat_jtb1k") +Tab/styles/focus = SubResource("StyleBoxEmpty_u6gcs") +Tab/styles/hover = SubResource("StyleBoxFlat_nufy3") +Tab/styles/normal = SubResource("StyleBoxFlat_0d7vs") +Tab/styles/pressed = SubResource("StyleBoxFlat_3fnfk") TabActive/base_type = &"Button" TabActive/colors/font_color = Color(0.9411765, 0.9019608, 0.8156863, 1) -TabActive/styles/focus = SubResource("StyleBoxEmpty_wmbj4") -TabActive/styles/hover = SubResource("StyleBoxFlat_xdylb") -TabActive/styles/normal = SubResource("StyleBoxFlat_pjnll") -TabActive/styles/pressed = SubResource("StyleBoxFlat_klelq") +TabActive/styles/focus = SubResource("StyleBoxEmpty_2txdw") +TabActive/styles/hover = SubResource("StyleBoxFlat_w7qkp") +TabActive/styles/normal = SubResource("StyleBoxFlat_rthnr") +TabActive/styles/pressed = SubResource("StyleBoxFlat_ta3oh") TitleKicker/base_type = &"Label" TitleKicker/colors/font_color = Color(0.6627451, 0.5176471, 0.24705882, 1) TitleKicker/font_sizes/font_size = 13 diff --git a/client/scripts/theme/build_game_theme.gd b/client/scripts/theme/build_game_theme.gd index 3154db1..60e027e 100644 --- a/client/scripts/theme/build_game_theme.gd +++ b/client/scripts/theme/build_game_theme.gd @@ -41,6 +41,10 @@ static func build_theme() -> Theme: _dock_button(theme) _parchment_button(theme) _chip(theme) + _section_label(theme) + _select_card(theme) + _skill_chip(theme) + _tags_and_primary(theme) _tiles(theme) _cards_and_panels(theme) return theme @@ -179,6 +183,71 @@ static func _chip(theme: Theme) -> void: theme.set_color(&"font_color", k, Palette.MUTED_MONO) +static func _section_label(theme: Theme) -> void: + # The mono section headers on the parchment sheet (RACE / CALLING / NAME …). + # Mono's own colour is for dark surfaces; on parchment it needs the muted ink. + theme.set_type_variation(ThemeKeys.SECTION_LABEL, "Label") + theme.set_font(&"font", ThemeKeys.SECTION_LABEL, load(MONO)) + theme.set_font_size(&"font_size", ThemeKeys.SECTION_LABEL, 13) + theme.set_color(&"font_color", ThemeKeys.SECTION_LABEL, Palette.INK_LABEL_MUTED) + + +static func _select_card(theme: Theme) -> void: + # Race + calling cards. Button-base (a PanelContainer variation's lone `panel` + # stylebox does not skin a Button — ADR 0001). `pressed` IS the CHOSEN state: + # the card is a toggle in a ButtonGroup, so `pressed` persists after the click. + var k := ThemeKeys.SELECT_CARD + theme.set_type_variation(k, "Button") + theme.set_stylebox(&"normal", k, _flat(Palette.PARCHMENT_CARD, Palette.PARCHMENT_BORDER, 1, 12)) + theme.set_stylebox(&"hover", k, _flat(Palette.PARCHMENT_INSET, Palette.PARCHMENT_BORDER_3, 1, 12)) + theme.set_stylebox(&"pressed", k, _flat(Palette.PARCHMENT_CARD, Palette.BLOOD, 3, 12)) + theme.set_stylebox(&"disabled", k, _flat(Palette.PARCHMENT_INSET_2, Palette.PARCHMENT_BORDER_3, 1, 12)) + theme.set_stylebox(&"focus", k, StyleBoxEmpty.new()) + theme.set_color(&"font_color", k, Palette.INK_HEADING) + theme.set_color(&"font_disabled_color", k, Palette.INK_MUTED) + + +static func _skill_chip(theme: Theme) -> void: + # A proficiency chip is a TOGGLE with three states the player must be able to + # read at a glance: unpicked (parchment), picked (crimson), and granted-by-race + # (dim + inert — the elf already has perception, so the chip cannot be pressed). + var k := ThemeKeys.SKILL_CHIP + theme.set_type_variation(k, "Button") + theme.set_stylebox(&"normal", k, _flat(Palette.PARCHMENT_CARD, Palette.PARCHMENT_BORDER_3, 1, 14)) + theme.set_stylebox(&"hover", k, _flat(Palette.PARCHMENT_INSET, Palette.INK_LABEL, 1, 14)) + theme.set_stylebox(&"pressed", k, _flat(Palette.BLOOD, Palette.BLOOD, 1, 14)) + theme.set_stylebox(&"disabled", k, _flat(Palette.PARCHMENT_INSET_2, Palette.PARCHMENT_BORDER_3, 1, 14)) + theme.set_stylebox(&"focus", k, StyleBoxEmpty.new()) + theme.set_font(&"font", k, load(MONO)) + theme.set_font_size(&"font_size", k, 12) + theme.set_color(&"font_color", k, Palette.INK_LABEL) + theme.set_color(&"font_pressed_color", k, Palette.CREAM_BRIGHT) + theme.set_color(&"font_hover_color", k, Palette.INK_LABEL) + theme.set_color(&"font_disabled_color", k, Palette.PARCHMENT_BORDER_3) + + +static func _tags_and_primary(theme: Theme) -> void: + # The two little flags that ride on a card's top edge, and the gold ring the + # calling's primary attribute wears. Label takes a `normal` stylebox in Godot 4. + var chosen := ThemeKeys.CHOSEN_TAG + theme.set_type_variation(chosen, "Label") + theme.set_stylebox(&"normal", chosen, _flat(Palette.BLOOD, Palette.BLOOD, 1, 5)) + theme.set_font(&"font", chosen, load(MONO)) + theme.set_font_size(&"font_size", chosen, 10) + theme.set_color(&"font_color", chosen, Palette.CREAM_BRIGHT) + + var primary_tag := ThemeKeys.PRIMARY_TAG + theme.set_type_variation(primary_tag, "Label") + theme.set_stylebox(&"normal", primary_tag, _flat(Palette.INK_GOLD, Palette.INK_GOLD, 1, 5)) + theme.set_font(&"font", primary_tag, load(MONO)) + theme.set_font_size(&"font_size", primary_tag, 9) + theme.set_color(&"font_color", primary_tag, Palette.CREAM_BRIGHT) + + theme.set_type_variation(ThemeKeys.PRIMARY_CARD, "PanelContainer") + theme.set_stylebox(&"panel", ThemeKeys.PRIMARY_CARD, + _flat(Palette.PARCHMENT_CARD, Palette.INK_GOLD, 2, 12)) + + static func _tiles(theme: Theme) -> void: var filled := _flat(Palette.PARCHMENT_INSET, Palette.PARCHMENT_BORDER, 2, 6) theme.set_type_variation(ThemeKeys.ITEM_TILE, "PanelContainer") diff --git a/client/scripts/theme/palette.gd b/client/scripts/theme/palette.gd index 9151289..7475397 100644 --- a/client/scripts/theme/palette.gd +++ b/client/scripts/theme/palette.gd @@ -43,6 +43,7 @@ const INK_BODY := Color("4a3f2c") const INK_MUTED := Color("6a5a3a") const INK_LABEL := Color("5a4326") const INK_GOLD := Color("8f6a2a") +const INK_LABEL_MUTED := Color("8a7748") # section labels on parchment (creation sheet) # --- Text on dark --- const CREAM := Color("e8ddc8") diff --git a/client/scripts/theme/theme_keys.gd b/client/scripts/theme/theme_keys.gd index 6f8578f..f7f6800 100644 --- a/client/scripts/theme/theme_keys.gd +++ b/client/scripts/theme/theme_keys.gd @@ -16,6 +16,11 @@ const ITEM_TILE_EMPTY := &"ItemTileEmpty" const PARCHMENT_CARD := &"ParchmentCard" const PARCHMENT_INSET := &"ParchmentInset" const DARK_PANEL := &"DarkPanel" +const SELECT_CARD := &"SelectCard" # race/calling card: a Button whose `pressed` is CHOSEN +const SKILL_CHIP := &"SkillChip" # toggle: unpicked / picked / granted-so-inert +const CHOSEN_TAG := &"ChosenTag" # the little crimson "CHOSEN" flag +const PRIMARY_TAG := &"PrimaryTag" # the little gold "PRIMARY" flag +const PRIMARY_CARD := &"PrimaryCard" # the ability card ringed as the calling's primary ## Font roles (Label type-variations carrying a font, not a stylebox). Kept ## separate from ALL below, which is stylebox variations + their base type only. @@ -24,6 +29,7 @@ const ACCENT := &"Accent" const MONO := &"Mono" const TITLE_LOGO := &"TitleLogo" const TITLE_KICKER := &"TitleKicker" +const SECTION_LABEL := &"SectionLabel" ## Every variation name + the base Control type it decorates. The builder and the ## test both iterate this so they can never drift apart. @@ -39,4 +45,9 @@ const ALL := { PARCHMENT_CARD: "PanelContainer", PARCHMENT_INSET: "PanelContainer", DARK_PANEL: "PanelContainer", + SELECT_CARD: "Button", + SKILL_CHIP: "Button", + CHOSEN_TAG: "Label", + PRIMARY_TAG: "Label", + PRIMARY_CARD: "PanelContainer", } diff --git a/client/tests/unit/test_theme_resource.gd b/client/tests/unit/test_theme_resource.gd index 212c651..9c0e53f 100644 --- a/client/tests/unit/test_theme_resource.gd +++ b/client/tests/unit/test_theme_resource.gd @@ -48,3 +48,29 @@ func test_committed_tres_matches_builder(): var committed_box: StyleBoxFlat = committed.get_stylebox(state, variation) assert_eq(fresh_box.bg_color, committed_box.bg_color, "stale game_theme.tres — %s/%s bg_color drifted from the builder; re-run build_game_theme.gd" % [variation, state]) + + +func test_creation_variations_exist_with_the_states_the_screen_needs(): + var t: Theme = load(THEME_PATH) + + # A race/calling card is a Button that must show a CHOSEN state. + assert_true(t.has_stylebox(&"normal", ThemeKeys.SELECT_CARD)) + assert_true(t.has_stylebox(&"hover", ThemeKeys.SELECT_CARD)) + assert_true(t.has_stylebox(&"pressed", ThemeKeys.SELECT_CARD), "pressed IS the chosen ring") + assert_true(t.has_stylebox(&"disabled", ThemeKeys.SELECT_CARD), "an origin may disallow a calling") + + # A skill chip is a toggle with three states: unpicked, picked, and granted-so-inert. + assert_true(t.has_stylebox(&"normal", ThemeKeys.SKILL_CHIP)) + assert_true(t.has_stylebox(&"pressed", ThemeKeys.SKILL_CHIP)) + assert_true(t.has_stylebox(&"disabled", ThemeKeys.SKILL_CHIP)) + + # The tags and the primary ring. + assert_true(t.has_stylebox(&"normal", ThemeKeys.CHOSEN_TAG)) + assert_true(t.has_stylebox(&"normal", ThemeKeys.PRIMARY_TAG)) + assert_true(t.has_stylebox(&"panel", ThemeKeys.PRIMARY_CARD)) + + +func test_section_label_is_a_font_role_on_parchment(): + var t: Theme = load(THEME_PATH) + assert_true(t.has_font(&"font", ThemeKeys.SECTION_LABEL)) + assert_eq(t.get_color(&"font_color", ThemeKeys.SECTION_LABEL), Palette.INK_LABEL_MUTED)