Skip to content

Commit

Permalink
~53 applying styles to buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
sh-cho committed Jun 8, 2024
1 parent 44e967e commit d299d27
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 3 deletions.
36 changes: 35 additions & 1 deletion resources/themes/theme.tres
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_resource type="Theme" load_steps=7 format=3 uid="uid://c3hhobt5yor42"]
[gd_resource type="Theme" load_steps=11 format=3 uid="uid://c3hhobt5yor42"]

[ext_resource type="FontFile" uid="uid://ba3f2bejkjtdg" path="res://resources/themes/Rockboxcond12.ttf" id="1_fxvgl"]
[ext_resource type="Texture2D" uid="uid://m1p3h77wdeke" path="res://assets/ui/ui.png" id="1_vusi2"]
Expand All @@ -15,6 +15,32 @@ texture_margin_right = 1.0
texture_margin_bottom = 1.0
region_rect = Rect2(18, 2, 12, 12)

[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ju7t5"]

[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_ipsqo"]
texture = ExtResource("1_vusi2")
texture_margin_left = 3.0
texture_margin_top = 3.0
texture_margin_right = 3.0
texture_margin_bottom = 3.0
region_rect = Rect2(20, 20, 8, 8)

[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_ohc1h"]
texture = ExtResource("1_vusi2")
texture_margin_left = 3.0
texture_margin_top = 3.0
texture_margin_right = 3.0
texture_margin_bottom = 3.0
region_rect = Rect2(4, 20, 8, 8)

[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_2e4ds"]
texture = ExtResource("1_vusi2")
texture_margin_left = 3.0
texture_margin_top = 3.0
texture_margin_right = 3.0
texture_margin_bottom = 3.0
region_rect = Rect2(4, 20, 8, 8)

[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_hjilj"]
texture = ExtResource("1_vusi2")
texture_margin_left = 4.0
Expand All @@ -39,6 +65,14 @@ default_font = ExtResource("1_fxvgl")
default_font_size = 16
AlternatePanelContainer/base_type = &"PanelContainer"
AlternatePanelContainer/styles/panel = SubResource("StyleBoxTexture_bvm1a")
Button/colors/font_color = Color(0.247059, 0.14902, 0.192157, 1)
Button/colors/font_focus_color = Color(0.247059, 0.14902, 0.192157, 1)
Button/colors/font_hover_color = Color(0.741176, 0.423529, 0.290196, 1)
Button/colors/font_pressed_color = Color(0.247059, 0.14902, 0.192157, 1)
Button/styles/focus = SubResource("StyleBoxEmpty_ju7t5")
Button/styles/hover = SubResource("StyleBoxTexture_ipsqo")
Button/styles/normal = SubResource("StyleBoxTexture_ohc1h")
Button/styles/pressed = SubResource("StyleBoxTexture_2e4ds")
Label/constants/line_spacing = 0
PanelContainer/styles/panel = SubResource("StyleBoxTexture_hjilj")
ProgressBar/styles/background = SubResource("StyleBoxFlat_exix6")
Expand Down
16 changes: 14 additions & 2 deletions scenes/ui/end_screen.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,16 @@ theme_override_constants/margin_bottom = 8

[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/PanelContainer/MarginContainer"]
layout_mode = 2
theme_override_constants/separation = 16

[node name="TitleLabel" type="Label" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
theme_override_colors/font_shadow_color = Color(0.14902, 0.168627, 0.266667, 1)
theme_override_colors/font_outline_color = Color(0.14902, 0.168627, 0.266667, 1)
theme_override_constants/shadow_offset_x = 0
theme_override_constants/shadow_offset_y = 0
theme_override_constants/outline_size = 8
theme_override_font_sizes/font_size = 32
text = "Victory"
horizontal_alignment = 1
Expand All @@ -111,14 +117,20 @@ vertical_alignment = 1
[node name="DescriptionLabel" type="Label" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
theme_override_colors/font_shadow_color = Color(0, 0, 0, 1)
theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 8
text = "You won!"

[node name="RestartButton" type="Button" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"]
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"]
layout_mode = 2

[node name="RestartButton" type="Button" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
text = "Restart"

[node name="QuitButton" type="Button" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"]
[node name="QuitButton" type="Button" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
text = "Quit"

0 comments on commit d299d27

Please sign in to comment.