-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: create menu button and hero themes
Rather than impling components with theme overwrites, we create some themes to be more easily applied to one-off buttons/labels.
- Loading branch information
1 parent
cd4f2f1
commit fb307a6
Showing
6 changed files
with
146 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[gd_resource type="Theme" load_steps=2 format=3 uid="uid://ckbpwodffr03"] | ||
|
||
[ext_resource type="FontFile" uid="uid://b0w8s6hidvrrr" path="res://addons/core/assets/fonts/Born2bSportyV2.ttf" id="1_g5tfq"] | ||
|
||
[resource] | ||
RichTextLabel/colors/default_color = Color(0.0823529, 0.419608, 0.635294, 1) | ||
RichTextLabel/font_sizes/normal_font_size = 128 | ||
RichTextLabel/fonts/normal_font = ExtResource("1_g5tfq") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,62 @@ | ||
[gd_scene load_steps=4 format=3 uid="uid://b3ivyg8cxtuof"] | ||
[gd_scene load_steps=7 format=3 uid="uid://b3ivyg8cxtuof"] | ||
|
||
[ext_resource type="FontFile" uid="uid://b0w8s6hidvrrr" path="res://addons/core/assets/fonts/Born2bSportyV2.ttf" id="1"] | ||
|
||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_a657c"] | ||
bg_color = Color(0.74902, 0.298039, 0.133333, 1) | ||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_3n65y"] | ||
content_margin_left = 8.0 | ||
content_margin_top = 2.0 | ||
content_margin_right = 8.0 | ||
content_margin_bottom = 2.0 | ||
bg_color = Color(0.619608, 0.235294, 0.0941176, 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_74t6f"] | ||
bg_color = Color(0.617747, 0.235822, 0.0945145, 1) | ||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_th2ko"] | ||
content_margin_left = 8.0 | ||
content_margin_top = 2.0 | ||
content_margin_right = 8.0 | ||
content_margin_bottom = 2.0 | ||
bg_color = Color(0.619608, 0.235294, 0.0941176, 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_7qgli"] | ||
content_margin_left = 8.0 | ||
content_margin_top = 2.0 | ||
content_margin_right = 8.0 | ||
content_margin_bottom = 2.0 | ||
bg_color = Color(0.0823529, 0.419608, 0.635294, 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_tjbed"] | ||
content_margin_left = 8.0 | ||
content_margin_top = 2.0 | ||
content_margin_right = 8.0 | ||
content_margin_bottom = 2.0 | ||
bg_color = Color(0.619608, 0.235294, 0.0941176, 1) | ||
corner_radius_top_left = 4 | ||
corner_radius_top_right = 4 | ||
corner_radius_bottom_right = 4 | ||
corner_radius_bottom_left = 4 | ||
|
||
[sub_resource type="Theme" id="Theme_gsvm3"] | ||
Button/font_sizes/font_size = 32 | ||
Button/fonts/font = ExtResource("1") | ||
Button/styles/focus = SubResource("StyleBoxFlat_3n65y") | ||
Button/styles/hover = SubResource("StyleBoxFlat_th2ko") | ||
Button/styles/normal = SubResource("StyleBoxFlat_7qgli") | ||
Button/styles/pressed = SubResource("StyleBoxFlat_tjbed") | ||
|
||
[node name="Button" type="Button"] | ||
custom_minimum_size = Vector2(60, 0) | ||
offset_right = 58.0 | ||
offset_bottom = 20.0 | ||
theme_override_fonts/font = ExtResource("1") | ||
theme_override_font_sizes/font_size = 32 | ||
theme_override_styles/hover = SubResource("StyleBoxFlat_a657c") | ||
theme_override_styles/pressed = SubResource("StyleBoxFlat_a657c") | ||
theme_override_styles/focus = SubResource("StyleBoxFlat_74t6f") | ||
theme = SubResource("Theme_gsvm3") | ||
text = "Level 1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
[gd_resource type="Theme" load_steps=6 format=3 uid="uid://dn5bl1q612dpj"] | ||
|
||
[ext_resource type="FontFile" uid="uid://b0w8s6hidvrrr" path="res://addons/core/assets/fonts/Born2bSportyV2.ttf" id="1_fr6gb"] | ||
|
||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_3n65y"] | ||
content_margin_left = 8.0 | ||
content_margin_top = 2.0 | ||
content_margin_right = 8.0 | ||
content_margin_bottom = 2.0 | ||
bg_color = Color(0.619608, 0.235294, 0.0941176, 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_th2ko"] | ||
content_margin_left = 8.0 | ||
content_margin_top = 2.0 | ||
content_margin_right = 8.0 | ||
content_margin_bottom = 2.0 | ||
bg_color = Color(0.619608, 0.235294, 0.0941176, 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_7qgli"] | ||
content_margin_left = 8.0 | ||
content_margin_top = 2.0 | ||
content_margin_right = 8.0 | ||
content_margin_bottom = 2.0 | ||
bg_color = Color(0.0823529, 0.419608, 0.635294, 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_tjbed"] | ||
content_margin_left = 8.0 | ||
content_margin_top = 2.0 | ||
content_margin_right = 8.0 | ||
content_margin_bottom = 2.0 | ||
bg_color = Color(0.619608, 0.235294, 0.0941176, 1) | ||
corner_radius_top_left = 4 | ||
corner_radius_top_right = 4 | ||
corner_radius_bottom_right = 4 | ||
corner_radius_bottom_left = 4 | ||
|
||
[resource] | ||
Button/font_sizes/font_size = 32 | ||
Button/fonts/font = ExtResource("1_fr6gb") | ||
Button/styles/focus = SubResource("StyleBoxFlat_3n65y") | ||
Button/styles/hover = SubResource("StyleBoxFlat_th2ko") | ||
Button/styles/normal = SubResource("StyleBoxFlat_7qgli") | ||
Button/styles/pressed = SubResource("StyleBoxFlat_tjbed") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters