New main menu!

This commit is contained in:
Paul Black 2023-03-11 14:18:11 -07:00
parent e52db67b32
commit 80aa54de99
15 changed files with 222 additions and 58 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://btq8e7ujqqf5x"
path="res://.godot/imported/CreditsMenu.png-39493c2589dab2bd1f4491ac37541ab9.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://2DArt/credits/CreditsMenu.png"
dest_files=["res://.godot/imported/CreditsMenu.png-39493c2589dab2bd1f4491ac37541ab9.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://yg8aqnkfjqjf"
path="res://.godot/imported/SettingsMenu.png-6e98064a6ba5f75ff9d6e3ea2156e5ce.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://2DArt/settings/SettingsMenu.png"
dest_files=["res://.godot/imported/SettingsMenu.png-6e98064a6ba5f75ff9d6e3ea2156e5ce.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View file

@ -11,7 +11,7 @@ config_version=5
[application] [application]
config/name="Project Teddy" config/name="Project Teddy"
run/main_scene="res://scenes/mainmenu.tscn" run/main_scene="res://scenes/mainmenu-background.tscn"
config/features=PackedStringArray("4.0", "Forward Plus") config/features=PackedStringArray("4.0", "Forward Plus")
boot_splash/show_image=false boot_splash/show_image=false
config/icon="res://icon.svg" config/icon="res://icon.svg"
@ -24,6 +24,7 @@ Networking="*res://scripts/networking.gd"
[display] [display]
window/size/mode=3
window/stretch/mode="canvas_items" window/stretch/mode="canvas_items"
[input] [input]

View file

@ -1,7 +1,7 @@
[gd_scene load_steps=5 format=3 uid="uid://dp1q51kvd8uow"] [gd_scene load_steps=5 format=3 uid="uid://dp1q51kvd8uow"]
[ext_resource type="Script" path="res://characters/teddy/Teddy.gd" id="1_ywxo5"] [ext_resource type="Script" path="res://characters/teddy/Teddy.gd" id="1_ywxo5"]
[ext_resource type="PackedScene" path="res://characters/teddy/model_glb/teddy.glb" id="2_22nhn"] [ext_resource type="PackedScene" uid="uid://b3l10agcjfgdx" path="res://characters/teddy/model_glb/teddy.glb" id="2_22nhn"]
[sub_resource type="BoxShape3D" id="BoxShape3D_rpt2n"] [sub_resource type="BoxShape3D" id="BoxShape3D_rpt2n"]
size = Vector3(1, 1.99126, 1) size = Vector3(1, 1.99126, 1)

View file

@ -1,10 +1,10 @@
[gd_scene load_steps=5 format=3 uid="uid://bqwgly88dfeg"] [gd_scene load_steps=6 format=3 uid="uid://bqwgly88dfeg"]
[ext_resource type="Script" path="res://scripts/credits.gd" id="1_0ty5p"] [ext_resource type="Script" path="res://scripts/credits.gd" id="1_0ty5p"]
[ext_resource type="Texture2D" uid="uid://bg7x581ay4lr2" path="res://splashes/godot.svg" id="1_bq7vw"] [ext_resource type="Texture2D" uid="uid://bg7x581ay4lr2" path="res://splashes/godot.svg" id="1_bq7vw"]
[ext_resource type="Texture2D" uid="uid://dqq5utsav3i1o" path="res://splashes/blender.svg" id="2_0dbbk"] [ext_resource type="Texture2D" uid="uid://dqq5utsav3i1o" path="res://splashes/blender.svg" id="2_0dbbk"]
[ext_resource type="Texture2D" uid="uid://btq8e7ujqqf5x" path="res://2DArt/credits/CreditsMenu.png" id="4_pfycf"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_lia3x"] [ext_resource type="Texture2D" uid="uid://bbhehdpnnyjah" path="res://splashes/mixamo.png" id="5_y641b"]
[node name="credits" type="Control"] [node name="credits" type="Control"]
layout_mode = 3 layout_mode = 3
@ -15,21 +15,10 @@ grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
script = ExtResource("1_0ty5p") script = ExtResource("1_0ty5p")
[node name="Panel" type="Panel" parent="."] [node name="CreditsMenu" type="Sprite2D" parent="."]
modulate = Color(0.298039, 0.298039, 0.298039, 1) position = Vector2(576.443, 324)
layout_mode = 1 scale = Vector2(0.951542, 0.951542)
anchors_preset = 8 texture = ExtResource("4_pfycf")
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -203.5
offset_top = -195.0
offset_right = 203.5
offset_bottom = 195.0
grow_horizontal = 2
grow_vertical = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_lia3x")
[node name="Label" type="Label" parent="."] [node name="Label" type="Label" parent="."]
layout_mode = 0 layout_mode = 0
@ -95,22 +84,35 @@ offset_right = 616.0
offset_bottom = 454.0 offset_bottom = 454.0
text = "Blender" text = "Blender"
[node name="Label9" type="Label" parent="."]
offset_left = 554.0
offset_top = 457.0
offset_right = 617.0
offset_bottom = 483.0
text = "Mixamo"
[node name="Icon" type="Sprite2D" parent="."] [node name="Icon" type="Sprite2D" parent="."]
position = Vector2(429, 464) position = Vector2(357, 495)
scale = Vector2(0.742187, 0.742187) scale = Vector2(0.742187, 0.742187)
texture = ExtResource("1_bq7vw") texture = ExtResource("1_bq7vw")
[node name="Blender" type="Sprite2D" parent="."] [node name="Blender" type="Sprite2D" parent="."]
position = Vector2(716, 465) position = Vector2(787, 501)
scale = Vector2(0.194581, 0.194581) scale = Vector2(0.194581, 0.194581)
texture = ExtResource("2_0dbbk") texture = ExtResource("2_0dbbk")
[node name="Button" type="Button" parent="."] [node name="Button" type="Button" parent="."]
layout_mode = 0 layout_mode = 0
offset_left = 380.0 offset_left = 863.0
offset_top = 136.0 offset_top = 81.0
offset_right = 411.0 offset_right = 894.0
offset_bottom = 167.0 offset_bottom = 112.0
text = "X" text = "X"
flat = true
[node name="Mixamo" type="Sprite2D" parent="."]
position = Vector2(363, 260)
scale = Vector2(0.239125, 0.239125)
texture = ExtResource("5_y641b")
[connection signal="pressed" from="Button" to="." method="_on_button_pressed"] [connection signal="pressed" from="Button" to="." method="_on_button_pressed"]

View file

@ -0,0 +1,43 @@
[gd_scene load_steps=8 format=3 uid="uid://8lhdy8kiejvt"]
[ext_resource type="PackedScene" uid="uid://csxkrtwsgmebb" path="res://objects/toyland/toyland.glb" id="1_bb18u"]
[ext_resource type="Script" path="res://scripts/mainmenu-background.gd" id="1_nn4qs"]
[ext_resource type="PackedScene" uid="uid://b3l10agcjfgdx" path="res://characters/teddy/model_glb/teddy.glb" id="2_mie3v"]
[ext_resource type="PackedScene" uid="uid://dtvtu8w6b5es0" path="res://scenes/mainmenu.tscn" id="3_bj3gc"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_vpngx"]
sky_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
ground_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
[sub_resource type="Sky" id="Sky_wy734"]
sky_material = SubResource("ProceduralSkyMaterial_vpngx")
[sub_resource type="Environment" id="Environment_gyra6"]
background_mode = 2
sky = SubResource("Sky_wy734")
tonemap_mode = 2
glow_enabled = true
[node name="mainmenu-background" type="Node3D"]
script = ExtResource("1_nn4qs")
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_gyra6")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(-0.866025, -0.283203, 0.412063, 0, 0.824126, 0.566406, -0.5, 0.490522, -0.713714, 0, 0, 0)
shadow_enabled = true
directional_shadow_max_distance = 1.0
[node name="toyland" parent="." instance=ExtResource("1_bb18u")]
[node name="teddy" parent="." instance=ExtResource("2_mie3v")]
transform = Transform3D(-0.43792, 0, -0.0332195, 0, 0.439179, 0, 0.0332195, 0, -0.43792, -9.96286, 1.52042, -40.4288)
[node name="teddy2" parent="." instance=ExtResource("2_mie3v")]
transform = Transform3D(-0.43792, 0, -0.0332195, 0, 0.439179, 0, 0.0332195, 0, -0.43792, -14.1826, 1.52042, -40.4288)
[node name="mainmenu" parent="." instance=ExtResource("3_bj3gc")]
[node name="Camera3D" type="Camera3D" parent="."]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -12.0958, 3.68495, -48.2933)

View file

@ -1,7 +1,6 @@
[gd_scene load_steps=12 format=3 uid="uid://dtvtu8w6b5es0"] [gd_scene load_steps=11 format=3 uid="uid://dtvtu8w6b5es0"]
[ext_resource type="Script" path="res://scripts/mainmenu.gd" id="1_w5lhm"] [ext_resource type="Script" path="res://scripts/mainmenu.gd" id="1_w5lhm"]
[ext_resource type="Texture2D" uid="uid://p427bphnxyjc" path="res://2DArt/Main Menu/Background.jpg" id="2_xwdfd"]
[ext_resource type="Texture2D" uid="uid://gt440iakn1t5" path="res://2DArt/Main Menu/ProjectTeddyFULLLogo.png" id="3_kac7j"] [ext_resource type="Texture2D" uid="uid://gt440iakn1t5" path="res://2DArt/Main Menu/ProjectTeddyFULLLogo.png" id="3_kac7j"]
[ext_resource type="Texture2D" uid="uid://256bck7an7h" path="res://2DArt/Main Menu/PlayUnselected.png" id="4_aht2t"] [ext_resource type="Texture2D" uid="uid://256bck7an7h" path="res://2DArt/Main Menu/PlayUnselected.png" id="4_aht2t"]
[ext_resource type="Texture2D" uid="uid://cuev8l405quxs" path="res://2DArt/Main Menu/PlaySelected.png" id="4_tg1yj"] [ext_resource type="Texture2D" uid="uid://cuev8l405quxs" path="res://2DArt/Main Menu/PlaySelected.png" id="4_tg1yj"]
@ -21,11 +20,6 @@ grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
script = ExtResource("1_w5lhm") script = ExtResource("1_w5lhm")
[node name="Background" type="Sprite2D" parent="."]
position = Vector2(576.222, 324.375)
scale = Vector2(0.300347, 0.300347)
texture = ExtResource("2_xwdfd")
[node name="ProjectTeddyFullLogo" type="Sprite2D" parent="."] [node name="ProjectTeddyFullLogo" type="Sprite2D" parent="."]
position = Vector2(853, 120) position = Vector2(853, 120)
scale = Vector2(0.225195, 0.225195) scale = Vector2(0.225195, 0.225195)
@ -130,7 +124,7 @@ offset_left = 4.0
offset_top = 622.0 offset_top = 622.0
offset_right = 94.0 offset_right = 94.0
offset_bottom = 648.0 offset_bottom = 648.0
text = "Version: 0.5" text = "Version: PLAYTEST 20230311"
[node name="OurTimeIsNowSolo" type="Sprite2D" parent="."] [node name="OurTimeIsNowSolo" type="Sprite2D" parent="."]
position = Vector2(123, 104) position = Vector2(123, 104)

View file

@ -1,9 +1,7 @@
[gd_scene load_steps=3 format=3 uid="uid://dy5lqto7557fg"] [gd_scene load_steps=3 format=3 uid="uid://dy5lqto7557fg"]
[ext_resource type="Script" path="res://scripts/settings.gd" id="1_gpx88"] [ext_resource type="Script" path="res://scripts/settings.gd" id="1_gpx88"]
[ext_resource type="Texture2D" uid="uid://yg8aqnkfjqjf" path="res://2DArt/settings/SettingsMenu.png" id="2_1lv8m"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_j46gp"]
bg_color = Color(0.2, 0.2, 0.2, 1)
[node name="settings" type="Control"] [node name="settings" type="Control"]
layout_mode = 3 layout_mode = 3
@ -14,20 +12,10 @@ grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
script = ExtResource("1_gpx88") script = ExtResource("1_gpx88")
[node name="Panel" type="Panel" parent="."] [node name="SettingsMenu" type="Sprite2D" parent="."]
layout_mode = 1 position = Vector2(578.112, 326.125)
anchors_preset = 8 scale = Vector2(0.954846, 0.954846)
anchor_left = 0.5 texture = ExtResource("2_1lv8m")
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -121.0
offset_top = -156.0
offset_right = 129.0
offset_bottom = 134.0
grow_horizontal = 2
grow_vertical = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_j46gp")
[node name="h_slider" type="HSlider" parent="."] [node name="h_slider" type="HSlider" parent="."]
layout_mode = 2 layout_mode = 2
@ -49,12 +37,30 @@ text = "Adjust Mouse sensitivity"
[node name="Button" type="Button" parent="."] [node name="Button" type="Button" parent="."]
layout_mode = 0 layout_mode = 0
offset_left = 459.0 offset_left = 862.0
offset_top = 173.0 offset_top = 82.0
offset_right = 490.0 offset_right = 893.0
offset_bottom = 204.0 offset_bottom = 113.0
text = "X" text = "X"
flat = true
[node name="Label2" type="Label" parent="."]
layout_mode = 0
offset_left = 512.0
offset_top = 326.0
offset_right = 596.0
offset_bottom = 352.0
text = "Fullscreen:"
[node name="fullscreenBox" type="CheckBox" parent="."]
layout_mode = 0
offset_left = 601.0
offset_top = 326.0
offset_right = 625.0
offset_bottom = 350.0
[connection signal="ready" from="h_slider" to="." method="_on_h_slider_ready"] [connection signal="ready" from="h_slider" to="." method="_on_h_slider_ready"]
[connection signal="value_changed" from="h_slider" to="." method="_on_h_slider_value_changed"] [connection signal="value_changed" from="h_slider" to="." method="_on_h_slider_value_changed"]
[connection signal="pressed" from="Button" to="." method="_on_button_pressed"] [connection signal="pressed" from="Button" to="." method="_on_button_pressed"]
[connection signal="button_down" from="fullscreenBox" to="." method="_on_fullscreen_box_button_down"]
[connection signal="button_up" from="fullscreenBox" to="." method="_on_fullscreen_box_button_up"]

View file

@ -0,0 +1,8 @@
extends Node
func _process(delta):
if $teddy/AnimationPlayer.is_playing() == false:
$teddy/AnimationPlayer.play("idle")
if $teddy2/AnimationPlayer.is_playing() == false:
$teddy2/AnimationPlayer.play("idle")

View file

@ -6,7 +6,6 @@ func _ready():
if Global.playingGame == true: if Global.playingGame == true:
$Button.text = "RESUME" $Button.text = "RESUME"
$Button3.text = "MAIN MENU" $Button3.text = "MAIN MENU"
$Background.visible = false
$playButton.visible = false $playButton.visible = false
$OurTimeIsNowSolo.visible = false $OurTimeIsNowSolo.visible = false
$Button.disabled = false $Button.disabled = false
@ -33,7 +32,7 @@ func _on_button_2_pressed():
func _on_button_3_pressed(): func _on_button_3_pressed():
if Global.playingGame == true: if Global.playingGame == true:
get_tree().change_scene_to_file("res://scenes/mainmenu.tscn") get_tree().change_scene_to_file("res://scenes/mainmenu-background.tscn")
Global.playingGame = false Global.playingGame = false
elif Global.playingGame == false: elif Global.playingGame == false:
get_tree().quit() get_tree().quit()

View file

@ -2,7 +2,8 @@ extends Control
func _ready(): func _ready():
pass if get_window().get_mode() == Window.Mode.MODE_FULLSCREEN:
$fullscreenBox.button_pressed = true
func _on_h_slider_ready(): func _on_h_slider_ready():
var slider = $h_slider var slider = $h_slider
@ -19,3 +20,11 @@ func _on_h_slider_value_changed(value):
func _on_button_pressed(): func _on_button_pressed():
self.queue_free() self.queue_free()
func _on_fullscreen_box_button_down():
get_window().set_mode(Window.Mode.MODE_FULLSCREEN)
func _on_fullscreen_box_button_up():
get_window().set_mode(Window.Mode.MODE_WINDOWED)

BIN
splashes/mixamo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bbhehdpnnyjah"
path="res://.godot/imported/mixamo.png-88a5add2d82f36e3127dc0389ef76a25.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://splashes/mixamo.png"
dest_files=["res://.godot/imported/mixamo.png-88a5add2d82f36e3127dc0389ef76a25.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1