Skip to content

Commit

Permalink
Merge pull request #293 from Poobslag/ui-themes
Browse files Browse the repository at this point in the history
Changed menu UI to utilize themes.
  • Loading branch information
Poobslag authored Jun 4, 2020
2 parents 81f2518 + e2313d7 commit 9ba3473
Show file tree
Hide file tree
Showing 29 changed files with 74 additions and 117 deletions.
19 changes: 11 additions & 8 deletions src/main/puzzle/Puzzle.tscn
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[gd_scene load_steps=69 format=2]
[gd_scene load_steps=70 format=2]

[ext_resource path="res://src/main/ui/xolonium-24.tres" type="DynamicFont" id=1]
[ext_resource path="res://src/main/ui/menu/theme/h3.theme" type="Theme" id=1]
[ext_resource path="res://src/main/puzzle/tutorial/tutorial-hud.tscn" type="PackedScene" id=2]
[ext_resource path="res://src/main/ui/menu/theme/h3-font.tres" type="DynamicFont" id=3]
[ext_resource path="res://src/main/puzzle/metaball.shader" type="Shader" id=4]
[ext_resource path="res://src/main/puzzle/puzzle-trace.gd" type="Script" id=5]
[ext_resource path="res://src/main/puzzle/ResultsHud.tscn" type="PackedScene" id=6]
Expand All @@ -11,6 +12,8 @@
[ext_resource path="res://src/main/puzzle/piece/CornerMap.tscn" type="PackedScene" id=10]
[ext_resource path="res://assets/main/ui/applause.wav" type="AudioStream" id=11]
[ext_resource path="res://src/main/puzzle/PuzzleTileMap.tscn" type="PackedScene" id=12]
[ext_resource path="res://src/main/ui/menu/theme/h2-font.tres" type="DynamicFont" id=13]
[ext_resource path="res://src/main/ui/menu/theme/h4-font.tres" type="DynamicFont" id=14]
[ext_resource path="res://src/main/puzzle/puzzle-music-manager.gd" type="Script" id=19]
[ext_resource path="res://src/main/ui/SettingsMenu.tscn" type="PackedScene" id=20]
[ext_resource path="res://src/main/puzzle/puzzle.gd" type="Script" id=21]
Expand All @@ -29,13 +32,11 @@
[ext_resource path="res://src/main/puzzle/piece/states/none.gd" type="Script" id=34]
[ext_resource path="res://src/main/puzzle/top-out.gd" type="Script" id=35]
[ext_resource path="res://src/main/ui/font-fit-label.gd" type="Script" id=36]
[ext_resource path="res://src/main/ui/xolonium-16.tres" type="DynamicFont" id=37]
[ext_resource path="res://assets/main/ui/go.wav" type="AudioStream" id=38]
[ext_resource path="res://assets/main/ui/ready.wav" type="AudioStream" id=39]
[ext_resource path="res://assets/main/puzzle/wood-backdrop.png" type="Texture" id=40]
[ext_resource path="res://assets/main/puzzle/playfield-walls.png" type="Texture" id=41]
[ext_resource path="res://assets/main/puzzle/chalkboard.png" type="Texture" id=42]
[ext_resource path="res://src/main/ui/xolonium-36.tres" type="DynamicFont" id=43]
[ext_resource path="res://assets/main/world/chef/gameover-voice4.wav" type="AudioStream" id=44]
[ext_resource path="res://assets/main/world/chef/gameover-voice3.wav" type="AudioStream" id=45]
[ext_resource path="res://assets/main/world/chef/gameover-voice0.wav" type="AudioStream" id=46]
Expand All @@ -61,6 +62,7 @@
[ext_resource path="res://src/main/puzzle/chalkboard.gd" type="Script" id=66]
[ext_resource path="res://src/main/puzzle/start-end-sfx.gd" type="Script" id=67]


[sub_resource type="ShaderMaterial" id=1]
shader = ExtResource( 4 )

Expand Down Expand Up @@ -356,7 +358,7 @@ percent_visible = false
[node name="Desc" type="Label" parent="Chalkboard/MilestoneHud"]
anchor_right = 1.0
margin_bottom = 30.0
custom_fonts/font = ExtResource( 1 )
theme = ExtResource( 1 )
text = "Goal"
align = 2
__meta__ = {
Expand All @@ -369,7 +371,7 @@ margin_top = 30.0
margin_right = 250.0
margin_bottom = 75.0
rect_min_size = Vector2( 100, 45 )
custom_fonts/font = ExtResource( 1 )
custom_fonts/font = ExtResource( 14 )
text = "10"
align = 1
valign = 1
Expand All @@ -379,7 +381,7 @@ script = ExtResource( 36 )
__meta__ = {
"_edit_use_anchors_": false
}
fonts = [ ExtResource( 43 ), ExtResource( 1 ), ExtResource( 37 ) ]
fonts = [ ExtResource( 13 ), ExtResource( 3 ), ExtResource( 14 ) ]

[node name="HudHolder" type="Node2D" parent="."]
position = Vector2( 364, 28 )
Expand Down Expand Up @@ -465,7 +467,7 @@ margin_left = 10.0
margin_top = 10.0
margin_right = 110.0
margin_bottom = 40.0
custom_fonts/font = ExtResource( 1 )
theme = ExtResource( 1 )
text = "abcd"
script = ExtResource( 5 )
__meta__ = {
Expand All @@ -475,6 +477,7 @@ __meta__ = {
[node name="ResultsHud" parent="." instance=ExtResource( 6 )]

[node name="TutorialHud" parent="." instance=ExtResource( 2 )]
visible = false

[node name="CheatCodeDetector" parent="." instance=ExtResource( 8 )]
codes = [ "delays" ]
Expand Down
11 changes: 6 additions & 5 deletions src/main/puzzle/PuzzleHud.tscn
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[gd_scene load_steps=9 format=2]

[ext_resource path="res://src/main/ui/xolonium-48-outline.tres" type="DynamicFont" id=1]
[ext_resource path="res://src/main/ui/menu/theme/h1-font-outline.tres" type="DynamicFont" id=1]
[ext_resource path="res://src/main/puzzle/PuzzleHudStyleBox.tres" type="StyleBox" id=2]
[ext_resource path="res://src/main/ui/xolonium-24.tres" type="DynamicFont" id=3]
[ext_resource path="res://src/main/ui/xolonium-36.tres" type="DynamicFont" id=4]
[ext_resource path="res://src/main/ui/menu/theme/h2.theme" type="Theme" id=3]
[ext_resource path="res://src/main/ui/menu/theme/h3.theme" type="Theme" id=4]
[ext_resource path="res://src/main/puzzle/puzzle-hud.gd" type="Script" id=5]
[ext_resource path="res://src/main/ui/blogger-sans-medium-18.tres" type="DynamicFont" id=6]


[sub_resource type="InputEventAction" id=1]
action = "ui_cancel"

Expand Down Expand Up @@ -71,7 +72,7 @@ margin_left = -70.0
margin_top = -27.0
margin_right = 70.0
margin_bottom = 27.5
custom_fonts/font = ExtResource( 4 )
theme = ExtResource( 3 )
text = "Start"

[node name="BackButton" type="Button" parent="."]
Expand All @@ -85,7 +86,7 @@ margin_right = 50.0
margin_bottom = 79.0
size_flags_horizontal = 0
size_flags_vertical = 0
custom_fonts/font = ExtResource( 3 )
theme = ExtResource( 4 )
shortcut_in_tooltip = false
shortcut = SubResource( 2 )
text = "Back"
Expand Down
4 changes: 0 additions & 4 deletions src/main/puzzle/ResultsHud.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
[ext_resource path="res://src/main/puzzle/money-label-tween.gd" type="Script" id=7]
[ext_resource path="res://assets/main/ui/cheat-enable.wav" type="AudioStream" id=8]





[node name="ResultsHud" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
Expand Down
9 changes: 4 additions & 5 deletions src/main/puzzle/Score.tscn
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
[gd_scene load_steps=5 format=2]

[ext_resource path="res://src/main/puzzle/score-value-label.gd" type="Script" id=1]
[ext_resource path="res://src/main/ui/xolonium-24.tres" type="DynamicFont" id=2]
[ext_resource path="res://src/main/ui/menu/theme/h3.theme" type="Theme" id=2]
[ext_resource path="res://src/main/puzzle/combo-score-value-label.gd" type="Script" id=3]
[ext_resource path="res://src/main/ui/xolonium-36.tres" type="DynamicFont" id=4]

[ext_resource path="res://src/main/ui/menu/theme/h2.theme" type="Theme" id=4]


[node name="Score" type="Control"]
Expand All @@ -17,7 +16,7 @@ __meta__ = {
[node name="ScoreValueLabel" type="Label" parent="."]
margin_right = 250.0
margin_bottom = 44.0
custom_fonts/font = ExtResource( 4 )
theme = ExtResource( 4 )
text = "¥616"
align = 2
script = ExtResource( 1 )
Expand All @@ -30,7 +29,7 @@ modulate = Color( 1, 1, 1, 0.501961 )
margin_top = 36.0
margin_right = 250.0
margin_bottom = 66.0
custom_fonts/font = ExtResource( 2 )
theme = ExtResource( 2 )
text = "+¥55"
align = 2
script = ExtResource( 3 )
Expand Down
2 changes: 1 addition & 1 deletion src/main/puzzle/results-hud.gd
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func _append_creature_scores(rank_result: RankResult, creature_scores: Array, \
if creature_score == 0:
# last entry in creature_score is always 0; ignore it
continue
var left := "Creature #%s " % StringUtils.comma_sep(i + 1)
var left := "Customer #%s " % StringUtils.comma_sep(i + 1)
var right := %s/\n" % StringUtils.comma_sep(creature_score)
var middle := ""
var period_count := 50 - _period_count(left + right)
Expand Down
5 changes: 2 additions & 3 deletions src/main/ui/FpsLabel.tscn
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
[gd_scene load_steps=3 format=2]

[ext_resource path="res://src/main/ui/xolonium-16.tres" type="DynamicFont" id=1]
[ext_resource path="res://src/main/ui/menu/theme/h4.theme" type="Theme" id=1]
[ext_resource path="res://src/main/ui/fps-label.gd" type="Script" id=2]



[node name="FpsLabel" type="Label"]
anchor_left = 1.0
anchor_top = 1.0
Expand All @@ -14,7 +13,7 @@ margin_left = -110.0
margin_top = -50.0
margin_right = -9.99982
margin_bottom = -20.0
custom_fonts/font = ExtResource( 1 )
theme = ExtResource( 1 )
text = "60.00 fps"
align = 2
script = ExtResource( 2 )
Expand Down
17 changes: 2 additions & 15 deletions src/main/ui/HighScoreTable.tscn
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[gd_scene load_steps=3 format=2]

[ext_resource path="res://src/main/ui/xolonium-16.tres" type="DynamicFont" id=1]
[ext_resource path="res://src/main/ui/high-score-table.gd" type="Script" id=2]

[ext_resource path="res://src/main/ui/menu/theme/h4.theme" type="Theme" id=3]


[node name="HighScoreTable" type="VBoxContainer"]
margin_right = 412.0
margin_bottom = 152.0
size_flags_horizontal = 3
theme = ExtResource( 3 )
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
Expand All @@ -18,7 +18,6 @@ __meta__ = {
margin_right = 412.0
margin_bottom = 20.0
size_flags_horizontal = 3
custom_fonts/font = ExtResource( 1 )
text = "Today's Best"
align = 1
__meta__ = {
Expand All @@ -37,39 +36,34 @@ columns = 4
margin_right = 88.0
margin_bottom = 20.0
size_flags_horizontal = 3
custom_fonts/font = ExtResource( 1 )
text = "08:15"

[node name="Lines1" type="Label" parent="GridContainer"]
margin_left = 108.0
margin_right = 196.0
margin_bottom = 20.0
size_flags_horizontal = 3
custom_fonts/font = ExtResource( 1 )
text = "116"

[node name="Overall1" type="Label" parent="GridContainer"]
margin_left = 216.0
margin_right = 304.0
margin_bottom = 20.0
size_flags_horizontal = 3
custom_fonts/font = ExtResource( 1 )
text = "5,231"

[node name="Grade1" type="Label" parent="GridContainer"]
margin_left = 324.0
margin_right = 412.0
margin_bottom = 20.0
size_flags_horizontal = 3
custom_fonts/font = ExtResource( 1 )
text = "(SSS)"

[node name="Time2" type="Label" parent="GridContainer"]
margin_top = 24.0
margin_right = 49.0
margin_bottom = 44.0
size_flags_horizontal = 2
custom_fonts/font = ExtResource( 1 )
text = "08:15"

[node name="Lines2" type="Label" parent="GridContainer"]
Expand All @@ -78,7 +72,6 @@ margin_top = 24.0
margin_right = 196.0
margin_bottom = 44.0
size_flags_horizontal = 3
custom_fonts/font = ExtResource( 1 )
text = "116"

[node name="Overall2" type="Label" parent="GridContainer"]
Expand All @@ -87,7 +80,6 @@ margin_top = 24.0
margin_right = 304.0
margin_bottom = 44.0
size_flags_horizontal = 3
custom_fonts/font = ExtResource( 1 )
text = "5,231"

[node name="Grade2" type="Label" parent="GridContainer"]
Expand All @@ -96,15 +88,13 @@ margin_top = 24.0
margin_right = 412.0
margin_bottom = 44.0
size_flags_horizontal = 3
custom_fonts/font = ExtResource( 1 )
text = "(SSS)"

[node name="Time3" type="Label" parent="GridContainer"]
margin_top = 48.0
margin_right = 88.0
margin_bottom = 68.0
size_flags_horizontal = 3
custom_fonts/font = ExtResource( 1 )
text = "08:15"

[node name="Lines3" type="Label" parent="GridContainer"]
Expand All @@ -113,7 +103,6 @@ margin_top = 48.0
margin_right = 196.0
margin_bottom = 68.0
size_flags_horizontal = 3
custom_fonts/font = ExtResource( 1 )
text = "116"

[node name="Overall3" type="Label" parent="GridContainer"]
Expand All @@ -122,7 +111,6 @@ margin_top = 48.0
margin_right = 304.0
margin_bottom = 68.0
size_flags_horizontal = 3
custom_fonts/font = ExtResource( 1 )
text = "5,231"

[node name="Grade3" type="Label" parent="GridContainer"]
Expand All @@ -131,5 +119,4 @@ margin_top = 48.0
margin_right = 412.0
margin_bottom = 68.0
size_flags_horizontal = 3
custom_fonts/font = ExtResource( 1 )
text = "(SSS)"
8 changes: 4 additions & 4 deletions src/main/ui/OverworldUi.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
[ext_resource path="res://src/main/ui/CheatCodeDetector.tscn" type="PackedScene" id=7]
[ext_resource path="res://src/main/ui/MoneyLabel.tscn" type="PackedScene" id=8]
[ext_resource path="res://src/main/ui/SettingsMenu.tscn" type="PackedScene" id=9]
[ext_resource path="res://src/main/ui/xolonium-16.tres" type="DynamicFont" id=10]

[ext_resource path="res://src/main/ui/menu/theme/h4.theme" type="Theme" id=10]


[node name="OverworldUi" type="Control"]
Expand All @@ -36,6 +35,7 @@ margin_left = -512.0
margin_top = -300.0
margin_right = -10.0
margin_bottom = -10.0
theme = ExtResource( 10 )
alignment = 2
__meta__ = {
"_edit_use_anchors_": false
Expand Down Expand Up @@ -67,6 +67,7 @@ margin_left = 10.0
margin_top = 10.0
margin_right = 512.0
margin_bottom = 300.0
theme = ExtResource( 10 )
__meta__ = {
"_edit_use_anchors_": false
}
Expand All @@ -83,7 +84,6 @@ visible = false
margin_top = 36.0
margin_right = 502.0
margin_bottom = 56.0
custom_fonts/font = ExtResource( 10 )
text = "cb-----"
script = ExtResource( 6 )

Expand All @@ -99,6 +99,6 @@ quit_text = "Save + Quit"
[connection signal="chat_event_played" from="ChatUi" to="." method="_on_ChatUi_chat_event_played"]
[connection signal="pop_out_completed" from="ChatUi" to="." method="_on_ChatUi_pop_out_completed"]
[connection signal="showed_choices" from="ChatUi" to="." method="_on_ChatUi_showed_choices"]
[connection signal="cheat_detected" from="CheatCodeDetector" to="Labels/SoutheastLabels/FpsLabel" method="_on_CheatCodeDetector_cheat_detected"]
[connection signal="cheat_detected" from="CheatCodeDetector" to="Labels/NorthwestLabels/TurboTrace" method="_on_CheatCodeDetector_cheat_detected"]
[connection signal="cheat_detected" from="CheatCodeDetector" to="Labels/SoutheastLabels/FpsLabel" method="_on_CheatCodeDetector_cheat_detected"]
[connection signal="quit_pressed" from="SettingsMenu" to="." method="_on_SettingsMenu_quit_pressed"]
9 changes: 4 additions & 5 deletions src/main/ui/SettingsMenu.tscn
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
[gd_scene load_steps=7 format=2]

[ext_resource path="res://src/main/ui/xolonium-16.tres" type="DynamicFont" id=1]
[ext_resource path="res://src/main/ui/menu/theme/h4.theme" type="Theme" id=1]
[ext_resource path="res://src/main/puzzle/PuzzleHudStyleBox.tres" type="StyleBox" id=2]
[ext_resource path="res://src/main/ui/xolonium-24.tres" type="DynamicFont" id=3]
[ext_resource path="res://src/main/ui/menu/theme/h3.theme" type="Theme" id=3]
[ext_resource path="res://src/main/ui/menu/settings-menu.gd" type="Script" id=5]
[ext_resource path="res://src/main/ui/VolumeSetting.tscn" type="PackedScene" id=6]
[ext_resource path="res://src/main/ui/UiCancelShortcut.tres" type="ShortCut" id=7]



[node name="SettingsMenu" type="CanvasLayer"]
pause_mode = 2
script = ExtResource( 5 )
Expand Down Expand Up @@ -105,7 +104,7 @@ margin_bottom = 170.0
rect_min_size = Vector2( 120, 40 )
size_flags_horizontal = 4
size_flags_vertical = 4
custom_fonts/font = ExtResource( 3 )
theme = ExtResource( 3 )
shortcut_in_tooltip = false
shortcut = ExtResource( 7 )
text = "Ok"
Expand All @@ -118,7 +117,7 @@ margin_right = 80.0
rect_min_size = Vector2( 80, 30 )
size_flags_horizontal = 4
size_flags_vertical = 4
custom_fonts/font = ExtResource( 1 )
theme = ExtResource( 1 )
shortcut_in_tooltip = false
text = "Quit"
__meta__ = {
Expand Down
Loading

0 comments on commit 9ba3473

Please sign in to comment.