diff --git a/UI/ButtonGroup.tres b/UI/ButtonGroup.tres new file mode 100644 index 0000000..8f35b6a --- /dev/null +++ b/UI/ButtonGroup.tres @@ -0,0 +1,3 @@ +[gd_resource type="ButtonGroup" format=3 uid="uid://c0p3ikgo34st5"] + +[resource] diff --git a/UI/MainMenu.cs b/UI/MainMenu.cs index 058e330..4aa2fa8 100644 --- a/UI/MainMenu.cs +++ b/UI/MainMenu.cs @@ -20,6 +20,7 @@ public partial class MainMenu : Node2D bgmPlayer.PlayBGM(); _player1Input = new Player1Input(); _player2Input = new Player2Input(); + GetNode("NewGame/1Player").GrabFocus(); } public override void _UnhandledInput(InputEvent @event) diff --git a/UI/MainMenu.tscn b/UI/MainMenu.tscn index 5cbff5d..23396e1 100644 --- a/UI/MainMenu.tscn +++ b/UI/MainMenu.tscn @@ -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"] diff --git a/UI/Quit.png b/UI/Quit.png new file mode 100644 index 0000000..613e4a9 Binary files /dev/null and b/UI/Quit.png differ diff --git a/UI/Quit.png.import b/UI/Quit.png.import new file mode 100644 index 0000000..dde87ab --- /dev/null +++ b/UI/Quit.png.import @@ -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 diff --git a/UI/TitleScreenFixed.png b/UI/TitleScreenFixed.png new file mode 100644 index 0000000..d2d335e Binary files /dev/null and b/UI/TitleScreenFixed.png differ diff --git a/UI/TitleScreenFixed.png.import b/UI/TitleScreenFixed.png.import new file mode 100644 index 0000000..d56e061 --- /dev/null +++ b/UI/TitleScreenFixed.png.import @@ -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 diff --git a/UI/buttonoutline.png b/UI/buttonoutline.png new file mode 100644 index 0000000..c3289e8 Binary files /dev/null and b/UI/buttonoutline.png differ diff --git a/UI/buttonoutline.png.import b/UI/buttonoutline.png.import new file mode 100644 index 0000000..60c5d87 --- /dev/null +++ b/UI/buttonoutline.png.import @@ -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 diff --git a/project.godot b/project.godot index a83bafb..fc79b6a 100644 --- a/project.godot +++ b/project.godot @@ -33,6 +33,41 @@ project/assembly_name="GameJam2023" [input] +ui_accept={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194309,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194310,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":32,"physical_keycode":0,"key_label":0,"unicode":32,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":true,"script":null) +] +} +ui_select={ +"deadzone": 0.5, +"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":3,"pressure":0.0,"pressed":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":32,"physical_keycode":0,"key_label":0,"unicode":32,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":true,"script":null) +] +} +ui_cancel={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194305,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":1,"pressure":0.0,"pressed":true,"script":null) +] +} +ui_left={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":65,"physical_keycode":0,"key_label":0,"unicode":97,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":13,"pressure":0.0,"pressed":true,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":0,"axis_value":-1.0,"script":null) +] +} +ui_right={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":68,"physical_keycode":0,"key_label":0,"unicode":100,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":14,"pressure":0.0,"pressed":true,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":0,"axis_value":1.0,"script":null) +] +} p1_up={ "deadzone": 0.5, "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"echo":false,"script":null)