Main menu UI

This commit is contained in:
2023-09-13 12:17:36 -07:00
parent 915a6ed72c
commit 17f2003fe0
10 changed files with 171 additions and 31 deletions

3
UI/ButtonGroup.tres Normal file
View File

@@ -0,0 +1,3 @@
[gd_resource type="ButtonGroup" format=3 uid="uid://c0p3ikgo34st5"]
[resource]

View File

@@ -20,6 +20,7 @@ public partial class MainMenu : Node2D
bgmPlayer.PlayBGM();
_player1Input = new Player1Input();
_player2Input = new Player2Input();
GetNode<TextureButton>("NewGame/1Player").GrabFocus();
}
public override void _UnhandledInput(InputEvent @event)

View File

@@ -1,13 +1,16 @@
[gd_scene load_steps=4 format=3 uid="uid://b12gq4yqc3d8i"]
[gd_scene load_steps=6 format=3 uid="uid://b12gq4yqc3d8i"]
[ext_resource type="Script" path="res://UI/MainMenu.cs" id="1_6aikc"]
[ext_resource type="PackedScene" uid="uid://cjl20bs56430j" path="res://UI/Animations/UIAnimations.tscn" id="2_erh7e"]
[ext_resource type="Texture2D" uid="uid://swxqmtawd1yo" path="res://UI/TITLE-SCREEN-01.png" id="4_0156s"]
[ext_resource type="Texture2D" uid="uid://cctv3qmvq8tup" path="res://UI/TitleScreenFixed.png" id="3_718bb"]
[ext_resource type="Texture2D" uid="uid://b4dodyvo2d4j0" path="res://UI/buttonoutline.png" id="4_g5pcy"]
[ext_resource type="Texture2D" uid="uid://cgutt1y2s74dr" path="res://UI/Quit.png" id="5_6xvn1"]
[node name="MainMenu" type="Node2D"]
script = ExtResource("1_6aikc")
[node name="UIAnimations" parent="." instance=ExtResource("2_erh7e")]
visible = false
[node name="NewGame" type="Control" parent="."]
layout_mode = 3
@@ -21,41 +24,37 @@ grow_vertical = 2
layout_mode = 0
offset_right = 1920.0
offset_bottom = 1080.0
texture = ExtResource("4_0156s")
texture = ExtResource("3_718bb")
[node name="Button" type="Button" parent="NewGame"]
modulate = Color(1, 1, 1, 0)
[node name="1Player" type="TextureButton" parent="NewGame"]
layout_mode = 0
offset_left = 432.0
offset_top = 597.0
offset_right = 845.0
offset_bottom = 723.0
text = "
"
flat = true
offset_left = 424.0
offset_top = 599.0
offset_right = 854.0
offset_bottom = 745.0
focus_neighbor_right = NodePath("../2 Player")
focus_neighbor_bottom = NodePath("../Quit")
texture_focused = ExtResource("4_g5pcy")
[node name="Button2" type="Button" parent="NewGame"]
modulate = Color(1, 1, 1, 0)
[node name="2 Player" type="TextureButton" parent="NewGame"]
layout_mode = 0
offset_left = 1061.0
offset_left = 1055.0
offset_top = 598.0
offset_right = 1485.0
offset_bottom = 720.0
text = "
"
flat = true
offset_bottom = 744.0
focus_neighbor_left = NodePath("../1Player")
focus_neighbor_bottom = NodePath("../Quit")
texture_focused = ExtResource("4_g5pcy")
[node name="Button3" type="Button" parent="NewGame"]
modulate = Color(1, 1, 1, 0)
[node name="Quit" type="TextureButton" parent="NewGame"]
layout_mode = 0
offset_left = 748.0
offset_top = 822.0
offset_right = 1172.0
offset_bottom = 944.0
text = "
"
flat = true
offset_left = 905.0
offset_top = 858.0
offset_right = 1335.0
offset_bottom = 1004.0
focus_neighbor_top = NodePath("../1Player")
texture_focused = ExtResource("5_6xvn1")
[connection signal="pressed" from="NewGame/Button" to="." method="OneSinglePlayerPressed"]
[connection signal="pressed" from="NewGame/Button2" to="." method="OnTwoPlayerPressed"]
[connection signal="pressed" from="NewGame/Button3" to="." method="OnQuitButtonPressed"]
[connection signal="pressed" from="NewGame/1Player" to="." method="OneSinglePlayerPressed"]
[connection signal="pressed" from="NewGame/2 Player" to="." method="OnTwoPlayerPressed"]
[connection signal="pressed" from="NewGame/Quit" to="." method="OnQuitButtonPressed"]

BIN
UI/Quit.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

34
UI/Quit.png.import Normal file
View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cgutt1y2s74dr"
path="res://.godot/imported/Quit.png-8c44128bec82546e8be3b14e660991c4.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://UI/Quit.png"
dest_files=["res://.godot/imported/Quit.png-8c44128bec82546e8be3b14e660991c4.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

BIN
UI/TitleScreenFixed.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cctv3qmvq8tup"
path="res://.godot/imported/TitleScreenFixed.png-d333d455663a27cfd06d815f9a7dc509.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://UI/TitleScreenFixed.png"
dest_files=["res://.godot/imported/TitleScreenFixed.png-d333d455663a27cfd06d815f9a7dc509.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

BIN
UI/buttonoutline.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b4dodyvo2d4j0"
path="res://.godot/imported/buttonoutline.png-6630ca0342cba1cc70a9651218b5d4ed.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://UI/buttonoutline.png"
dest_files=["res://.godot/imported/buttonoutline.png-6630ca0342cba1cc70a9651218b5d4ed.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