New UI theme and menu tweaks

Added new button assets and reskinned the default UI theme. Pause menu has its own theme also.
This commit is contained in:
dukegoobler 2022-12-20 14:50:01 -07:00
parent 60f2ccd4f9
commit a6f07dad9a
25 changed files with 275 additions and 87 deletions

View File

@ -0,0 +1,3 @@
source_md5="e7ff8adad983ccaebd137d5a088e219f"
dest_md5="6dbb8b0b7e49465e444af4d54fd0dc08"

View File

@ -0,0 +1,3 @@
source_md5="31ab93069da1ac1e4973b02e491ad64e"
dest_md5="3cd5051ef4630a2f73d3ee321655d70b"

View File

@ -0,0 +1,3 @@
source_md5="ba0985dcbd463264ca1cf17ce3944c3a"
dest_md5="6e0c635700173b07a640dabfcc871b9c"

View File

@ -0,0 +1,3 @@
source_md5="ba0985dcbd463264ca1cf17ce3944c3a"
dest_md5="6e0c635700173b07a640dabfcc871b9c"

BIN
godot/assets/Button01.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Button01.png-dddfdcb3808573045e2ed3a829fa36a6.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Button01.png"
dest_files=[ "res://.import/Button01.png-dddfdcb3808573045e2ed3a829fa36a6.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
godot/assets/Button03.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Button03.png-671c9cb8368e44c810a563d955c96ff9.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Button03.png"
dest_files=[ "res://.import/Button03.png-671c9cb8368e44c810a563d955c96ff9.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
godot/assets/Button13.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Button13.png-bdd5ce03dfb4b19f3445e11943f8091a.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Button13.png"
dest_files=[ "res://.import/Button13.png-bdd5ce03dfb4b19f3445e11943f8091a.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View File

@ -1,6 +0,0 @@
[gd_resource type="Theme" load_steps=2 format=2]
[ext_resource path="res://assets/gratvityfont.tres" type="DynamicFont" id=1]
[resource]
default_font = ExtResource( 1 )

View File

@ -1,6 +1,38 @@
[gd_resource type="Theme" load_steps=2 format=2] [gd_resource type="Theme" load_steps=8 format=2]
[ext_resource path="res://assets/gratvityfont.tres" type="DynamicFont" id=1] [ext_resource path="res://assets/gratvityfont.tres" type="DynamicFont" id=1]
[ext_resource path="res://assets/Button01.png" type="Texture" id=2]
[ext_resource path="res://assets/Button03.png" type="Texture" id=3]
[sub_resource type="StyleBoxTexture" id=1]
texture = ExtResource( 3 )
region_rect = Rect2( 0, 0, 152, 40 )
modulate_color = Color( 0.41954, 0.740249, 0.761719, 1 )
[sub_resource type="StyleBoxTexture" id=2]
texture = ExtResource( 3 )
region_rect = Rect2( 0, 0, 152, 40 )
modulate_color = Color( 0.6, 0.6, 0.6, 1 )
[sub_resource type="StyleBoxTexture" id=3]
texture = ExtResource( 2 )
region_rect = Rect2( 0, 0, 152, 40 )
[sub_resource type="StyleBoxTexture" id=4]
texture = ExtResource( 3 )
region_rect = Rect2( 0, 0, 152, 40 )
modulate_color = Color( 0, 0, 0, 1 )
[resource] [resource]
default_font = ExtResource( 1 ) default_font = ExtResource( 1 )
Button/colors/font_color = Color( 0.88, 0.88, 0.88, 1 )
Button/colors/font_color_disabled = Color( 0.9, 0.9, 0.9, 0.2 )
Button/colors/font_color_focus = Color( 0.94, 0.94, 0.94, 1 )
Button/colors/font_color_hover = Color( 0.94, 0.94, 0.94, 1 )
Button/colors/font_color_pressed = Color( 1, 1, 1, 1 )
Button/constants/hseparation = 2
Button/styles/disabled = null
Button/styles/focus = SubResource( 1 )
Button/styles/hover = SubResource( 2 )
Button/styles/normal = SubResource( 3 )
Button/styles/pressed = SubResource( 4 )

View File

@ -0,0 +1,37 @@
[gd_resource type="Theme" load_steps=7 format=2]
[ext_resource path="res://assets/Button13.png" type="Texture" id=1]
[ext_resource path="res://assets/gratvityfont.tres" type="DynamicFont" id=2]
[sub_resource type="StyleBoxTexture" id=4]
texture = ExtResource( 1 )
region_rect = Rect2( 0, 0, 105, 21 )
[sub_resource type="StyleBoxTexture" id=2]
texture = ExtResource( 1 )
region_rect = Rect2( 0, 0, 105, 21 )
modulate_color = Color( 0.439216, 0.223529, 0.223529, 1 )
[sub_resource type="StyleBoxTexture" id=1]
texture = ExtResource( 1 )
region_rect = Rect2( 0, 0, 105, 21 )
modulate_color = Color( 0.52549, 0.403922, 0.403922, 1 )
[sub_resource type="StyleBoxTexture" id=3]
texture = ExtResource( 1 )
region_rect = Rect2( 0, 0, 105, 21 )
modulate_color = Color( 0.266667, 0.266667, 0.266667, 1 )
[resource]
Button/colors/font_color = Color( 0.88, 0.88, 0.88, 1 )
Button/colors/font_color_disabled = Color( 0.9, 0.9, 0.9, 0.2 )
Button/colors/font_color_focus = Color( 0.94, 0.94, 0.94, 1 )
Button/colors/font_color_hover = Color( 0.94, 0.94, 0.94, 1 )
Button/colors/font_color_pressed = Color( 1, 1, 1, 1 )
Button/constants/hseparation = 2
Button/fonts/font = ExtResource( 2 )
Button/styles/disabled = null
Button/styles/focus = SubResource( 4 )
Button/styles/hover = SubResource( 2 )
Button/styles/normal = SubResource( 1 )
Button/styles/pressed = SubResource( 3 )

View File

@ -81,7 +81,7 @@
"set_value": "true" "set_value": "true"
}, },
{ {
"change_scene": "res://test_with_all.tscn", "change_scene": "res://tests/test_player_locomotion.tscn",
"event_id": "dialogic_041" "event_id": "dialogic_041"
}, },
{ {
@ -98,7 +98,7 @@
"value": "true" "value": "true"
}, },
{ {
"change_scene": "res://test_with_all.tscn", "change_scene": "res://tests/test_player_locomotion.tscn",
"event_id": "dialogic_041" "event_id": "dialogic_041"
}, },
{ {

View File

@ -10,13 +10,13 @@
"character": "", "character": "",
"event_id": "dialogic_001", "event_id": "dialogic_001",
"portrait": "", "portrait": "",
"text": "Gravity Pixel Font courtesy of John Watson and Sunfire Interactive." "text": "User interface elements courtesy of John Watson, Wenrexa, and Sunfire Interactive."
}, },
{ {
"character": "", "character": "",
"event_id": "dialogic_001", "event_id": "dialogic_001",
"portrait": "", "portrait": "",
"text": "Background images courtesy of Bacteri." "text": "Overlays and images courtesy of Bacteri, ZimaJeKKT, hippopx.com, and thispersondoesnotexist.com"
}, },
{ {
"character": "", "character": "",
@ -24,24 +24,6 @@
"portrait": "", "portrait": "",
"text": "Sounds courtesy of Dryoma and VOiD1 Gaming." "text": "Sounds courtesy of Dryoma and VOiD1 Gaming."
}, },
{
"character": "",
"event_id": "dialogic_001",
"portrait": "",
"text": "Overlays courtesy of ZimaJeKKT."
},
{
"character": "",
"event_id": "dialogic_001",
"portrait": "",
"text": "All photos of people from thispersondoesnotexist.com."
},
{
"character": "",
"event_id": "dialogic_001",
"portrait": "",
"text": "Stock photos from www.hippopx.com."
},
{ {
"event_id": "dialogic_022", "event_id": "dialogic_022",
"transition_duration": 0 "transition_duration": 0

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=7 format=2] [gd_scene load_steps=8 format=2]
[ext_resource path="res://assets/audio/human-impact-on-ground-6982.mp3" type="AudioStream" id=1] [ext_resource path="res://assets/audio/human-impact-on-ground-6982.mp3" type="AudioStream" id=1]
[ext_resource path="res://assets/Background_space.png" type="Texture" id=2] [ext_resource path="res://assets/Background_space.png" type="Texture" id=2]
@ -6,6 +6,7 @@
[ext_resource path="res://screens/death.gd" type="Script" id=4] [ext_resource path="res://screens/death.gd" type="Script" id=4]
[ext_resource path="res://assets/ui_theme.tres" type="Theme" id=5] [ext_resource path="res://assets/ui_theme.tres" type="Theme" id=5]
[ext_resource path="res://effects/grainy_shader.tscn" type="PackedScene" id=6] [ext_resource path="res://effects/grainy_shader.tscn" type="PackedScene" id=6]
[ext_resource path="res://assets/title_font.tres" type="DynamicFont" id=7]
[node name="EndScreen" type="Control"] [node name="EndScreen" type="Control"]
anchor_right = 1.0 anchor_right = 1.0
@ -21,32 +22,33 @@ stretch_mode = 1
[node name="Menu" type="VBoxContainer" parent="."] [node name="Menu" type="VBoxContainer" parent="."]
anchor_left = 0.5 anchor_left = 0.5
anchor_top = 1.0 anchor_top = 0.5
anchor_right = 0.5 anchor_right = 0.5
anchor_bottom = 1.0 anchor_bottom = 0.5
margin_left = -133.0 margin_left = -104.0
margin_top = -253.0 margin_top = 46.0
margin_right = 134.0 margin_right = 104.0
margin_bottom = -53.0 margin_bottom = 244.0
theme = ExtResource( 5 )
[node name="RetryButton" type="Button" parent="Menu"] [node name="RetryButton" type="Button" parent="Menu"]
margin_right = 267.0 margin_right = 208.0
margin_bottom = 42.0 margin_bottom = 36.0
focus_neighbour_bottom = NodePath("../MenuButton") focus_neighbour_bottom = NodePath("../MenuButton")
text = "Retry" text = "Retry"
[node name="MenuButton" type="Button" parent="Menu"] [node name="MenuButton" type="Button" parent="Menu"]
margin_top = 46.0 margin_top = 40.0
margin_right = 267.0 margin_right = 208.0
margin_bottom = 88.0 margin_bottom = 76.0
focus_neighbour_top = NodePath("../RetryButton") focus_neighbour_top = NodePath("../RetryButton")
focus_neighbour_bottom = NodePath("../QuitButton") focus_neighbour_bottom = NodePath("../QuitButton")
text = "Main Menu" text = "Main Menu"
[node name="QuitButton" type="Button" parent="Menu"] [node name="QuitButton" type="Button" parent="Menu"]
margin_top = 92.0 margin_top = 80.0
margin_right = 267.0 margin_right = 208.0
margin_bottom = 134.0 margin_bottom = 116.0
focus_neighbour_top = NodePath("../MenuButton") focus_neighbour_top = NodePath("../MenuButton")
focus_neighbour_bottom = NodePath("../PlayButton") focus_neighbour_bottom = NodePath("../PlayButton")
text = "Quit" text = "Quit"
@ -72,6 +74,22 @@ stream = ExtResource( 3 )
[node name="shader" parent="." instance=ExtResource( 6 )] [node name="shader" parent="." instance=ExtResource( 6 )]
[node name="Title" type="Label" parent="."]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -342.0
margin_top = -135.0
margin_right = 342.0
margin_bottom = -71.0
custom_colors/font_color = Color( 1, 1, 1, 1 )
custom_colors/font_outline_modulate = Color( 0, 0, 0, 1 )
custom_constants/shadow_offset_x = 10
custom_fonts/font = ExtResource( 7 )
text = "MEAT MADNESS"
align = 1
[connection signal="pressed" from="Menu/RetryButton" to="." method="_on_RetryButton_pressed"] [connection signal="pressed" from="Menu/RetryButton" to="." method="_on_RetryButton_pressed"]
[connection signal="pressed" from="Menu/MenuButton" to="." method="_on_MenuButton_pressed"] [connection signal="pressed" from="Menu/MenuButton" to="." method="_on_MenuButton_pressed"]
[connection signal="pressed" from="Menu/QuitButton" to="." method="_on_QuitButton_pressed"] [connection signal="pressed" from="Menu/QuitButton" to="." method="_on_QuitButton_pressed"]

View File

@ -28,7 +28,7 @@ func _on_ResumeButton_pressed():
func _on_MainMenuButton_pressed(): func _on_MainMenuButton_pressed():
get_tree().paused = false get_tree().paused = false
var _a = get_tree().change_scene("res://Screens/TitleScreen.tscn") var _a = get_tree().change_scene("res://screens/TitleScreen.tscn")
func _on_ControlsButton_pressed(): func _on_ControlsButton_pressed():

View File

@ -1,13 +1,15 @@
[gd_scene load_steps=4 format=2] [gd_scene load_steps=5 format=2]
[ext_resource path="res://assets/blackbackground.png" type="Texture" id=1] [ext_resource path="res://assets/blackbackground.png" type="Texture" id=1]
[ext_resource path="res://assets/ui_theme.tres" type="Theme" id=2] [ext_resource path="res://assets/ui_theme.tres" type="Theme" id=2]
[ext_resource path="res://screens/PauseScreen.gd" type="Script" id=3] [ext_resource path="res://screens/PauseScreen.gd" type="Script" id=3]
[ext_resource path="res://assets/ui_theme_PauseScreen.tres" type="Theme" id=4]
[node name="PauseScreen" type="Control"] [node name="PauseScreen" type="Control"]
pause_mode = 2 pause_mode = 2
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
theme = ExtResource( 4 )
script = ExtResource( 3 ) script = ExtResource( 3 )
[node name="pauseBackground" type="TextureRect" parent="."] [node name="pauseBackground" type="TextureRect" parent="."]
@ -19,52 +21,47 @@ stretch_mode = 1
[node name="CenterContainer" type="CenterContainer" parent="."] [node name="CenterContainer" type="CenterContainer" parent="."]
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
theme = ExtResource( 2 )
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"] [node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"]
margin_left = 312.0 margin_left = 408.0
margin_top = 146.0 margin_top = 193.0
margin_right = 712.0 margin_right = 616.0
margin_bottom = 454.0 margin_bottom = 407.0
theme = ExtResource( 2 ) theme = ExtResource( 4 )
custom_constants/separation = 10 custom_constants/separation = 10
[node name="Label" type="Label" parent="CenterContainer/VBoxContainer"]
margin_right = 400.0
margin_bottom = 36.0
text = "Paused"
align = 1
[node name="Spacer" type="Control" parent="CenterContainer/VBoxContainer"] [node name="Spacer" type="Control" parent="CenterContainer/VBoxContainer"]
margin_top = 46.0 margin_right = 208.0
margin_right = 400.0 margin_bottom = 30.0
margin_bottom = 76.0
rect_min_size = Vector2( 1, 30 ) rect_min_size = Vector2( 1, 30 )
[node name="ResumeButton" type="Button" parent="CenterContainer/VBoxContainer"] [node name="ResumeButton" type="Button" parent="CenterContainer/VBoxContainer"]
margin_top = 86.0 margin_top = 40.0
margin_right = 400.0 margin_right = 208.0
margin_bottom = 136.0 margin_bottom = 76.0
rect_min_size = Vector2( 400, 50 ) rect_min_size = Vector2( 208, 36 )
text = "Resume" text = "Resume"
[node name="MainMenuButton" type="Button" parent="CenterContainer/VBoxContainer"] [node name="MainMenuButton" type="Button" parent="CenterContainer/VBoxContainer"]
margin_top = 146.0 margin_top = 86.0
margin_right = 400.0 margin_right = 208.0
margin_bottom = 196.0 margin_bottom = 122.0
rect_min_size = Vector2( 400, 50 ) rect_min_size = Vector2( 208, 36 )
text = "Main Menu" text = "Main Menu"
[node name="ControlsButton" type="Button" parent="CenterContainer/VBoxContainer"] [node name="ControlsButton" type="Button" parent="CenterContainer/VBoxContainer"]
margin_top = 206.0 margin_top = 132.0
margin_right = 400.0 margin_right = 208.0
margin_bottom = 248.0 margin_bottom = 168.0
rect_min_size = Vector2( 208, 36 )
text = "Controls" text = "Controls"
[node name="QuitButton" type="Button" parent="CenterContainer/VBoxContainer"] [node name="QuitButton" type="Button" parent="CenterContainer/VBoxContainer"]
margin_top = 258.0 margin_top = 178.0
margin_right = 400.0 margin_right = 208.0
margin_bottom = 308.0 margin_bottom = 214.0
rect_min_size = Vector2( 400, 50 ) rect_min_size = Vector2( 208, 36 )
text = "Quit" text = "Quit"
[connection signal="pressed" from="CenterContainer/VBoxContainer/ResumeButton" to="." method="_on_ResumeButton_pressed"] [connection signal="pressed" from="CenterContainer/VBoxContainer/ResumeButton" to="." method="_on_ResumeButton_pressed"]

View File

@ -49,25 +49,25 @@ custom_constants/separation = 10
[node name="PlayButton" type="Button" parent="ButtonContainer"] [node name="PlayButton" type="Button" parent="ButtonContainer"]
margin_right = 208.0 margin_right = 208.0
margin_bottom = 42.0 margin_bottom = 36.0
text = "Play" text = "Play"
[node name="Credits" type="Button" parent="ButtonContainer"] [node name="Credits" type="Button" parent="ButtonContainer"]
margin_top = 52.0 margin_top = 46.0
margin_right = 208.0 margin_right = 208.0
margin_bottom = 94.0 margin_bottom = 82.0
text = "Credits" text = "Credits"
[node name="Controls" type="Button" parent="ButtonContainer"] [node name="Controls" type="Button" parent="ButtonContainer"]
margin_top = 104.0 margin_top = 92.0
margin_right = 208.0 margin_right = 208.0
margin_bottom = 146.0 margin_bottom = 128.0
text = "Controls" text = "Controls"
[node name="QuitButton" type="Button" parent="ButtonContainer"] [node name="QuitButton" type="Button" parent="ButtonContainer"]
margin_top = 156.0 margin_top = 138.0
margin_right = 208.0 margin_right = 208.0
margin_bottom = 198.0 margin_bottom = 174.0
text = "Quit" text = "Quit"
[node name="BlackoutScreen" type="CanvasLayer" parent="."] [node name="BlackoutScreen" type="CanvasLayer" parent="."]

View File

@ -9,7 +9,7 @@ func _on_RetryButton_pressed():
pass # Replace with function body. pass # Replace with function body.
func _on_MenuButton_pressed(): func _on_MenuButton_pressed():
var _err = get_tree().change_scene("res://screens/title.tscn") var _err = get_tree().change_scene("res://screens/TitleScreen.tscn")
func _on_QuitButton_pressed(): func _on_QuitButton_pressed():
get_tree().quit() get_tree().quit()

View File

@ -10,12 +10,14 @@ func _on_PlayButton_pressed():
$BlackoutScreen.visible = true $BlackoutScreen.visible = true
func _on_Credits_pressed(): func _on_Credits_pressed():
pass # Replace with function body. var dialog = Dialogic.start("credits")
add_child(dialog)
dialog.connect("tree_exiting", self, "controls_done")
func _on_Controls_pressed(): func _on_Controls_pressed():
pass # Replace with function body. var dialog = Dialogic.start("controls")
add_child(dialog)
dialog.connect("tree_exiting", self, "controls_done")
func _on_QuitButton_pressed(): func _on_QuitButton_pressed():
get_tree().quit() get_tree().quit()