Main menu UI
This commit is contained in:
3
UI/ButtonGroup.tres
Normal file
3
UI/ButtonGroup.tres
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[gd_resource type="ButtonGroup" format=3 uid="uid://c0p3ikgo34st5"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
@@ -20,6 +20,7 @@ public partial class MainMenu : Node2D
|
|||||||
bgmPlayer.PlayBGM();
|
bgmPlayer.PlayBGM();
|
||||||
_player1Input = new Player1Input();
|
_player1Input = new Player1Input();
|
||||||
_player2Input = new Player2Input();
|
_player2Input = new Player2Input();
|
||||||
|
GetNode<TextureButton>("NewGame/1Player").GrabFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void _UnhandledInput(InputEvent @event)
|
public override void _UnhandledInput(InputEvent @event)
|
||||||
|
|||||||
@@ -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="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="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"]
|
[node name="MainMenu" type="Node2D"]
|
||||||
script = ExtResource("1_6aikc")
|
script = ExtResource("1_6aikc")
|
||||||
|
|
||||||
[node name="UIAnimations" parent="." instance=ExtResource("2_erh7e")]
|
[node name="UIAnimations" parent="." instance=ExtResource("2_erh7e")]
|
||||||
|
visible = false
|
||||||
|
|
||||||
[node name="NewGame" type="Control" parent="."]
|
[node name="NewGame" type="Control" parent="."]
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
@@ -21,41 +24,37 @@ grow_vertical = 2
|
|||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
offset_right = 1920.0
|
offset_right = 1920.0
|
||||||
offset_bottom = 1080.0
|
offset_bottom = 1080.0
|
||||||
texture = ExtResource("4_0156s")
|
texture = ExtResource("3_718bb")
|
||||||
|
|
||||||
[node name="Button" type="Button" parent="NewGame"]
|
[node name="1Player" type="TextureButton" parent="NewGame"]
|
||||||
modulate = Color(1, 1, 1, 0)
|
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
offset_left = 432.0
|
offset_left = 424.0
|
||||||
offset_top = 597.0
|
offset_top = 599.0
|
||||||
offset_right = 845.0
|
offset_right = 854.0
|
||||||
offset_bottom = 723.0
|
offset_bottom = 745.0
|
||||||
text = "
|
focus_neighbor_right = NodePath("../2 Player")
|
||||||
"
|
focus_neighbor_bottom = NodePath("../Quit")
|
||||||
flat = true
|
texture_focused = ExtResource("4_g5pcy")
|
||||||
|
|
||||||
[node name="Button2" type="Button" parent="NewGame"]
|
[node name="2 Player" type="TextureButton" parent="NewGame"]
|
||||||
modulate = Color(1, 1, 1, 0)
|
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
offset_left = 1061.0
|
offset_left = 1055.0
|
||||||
offset_top = 598.0
|
offset_top = 598.0
|
||||||
offset_right = 1485.0
|
offset_right = 1485.0
|
||||||
offset_bottom = 720.0
|
offset_bottom = 744.0
|
||||||
text = "
|
focus_neighbor_left = NodePath("../1Player")
|
||||||
"
|
focus_neighbor_bottom = NodePath("../Quit")
|
||||||
flat = true
|
texture_focused = ExtResource("4_g5pcy")
|
||||||
|
|
||||||
[node name="Button3" type="Button" parent="NewGame"]
|
[node name="Quit" type="TextureButton" parent="NewGame"]
|
||||||
modulate = Color(1, 1, 1, 0)
|
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
offset_left = 748.0
|
offset_left = 905.0
|
||||||
offset_top = 822.0
|
offset_top = 858.0
|
||||||
offset_right = 1172.0
|
offset_right = 1335.0
|
||||||
offset_bottom = 944.0
|
offset_bottom = 1004.0
|
||||||
text = "
|
focus_neighbor_top = NodePath("../1Player")
|
||||||
"
|
texture_focused = ExtResource("5_6xvn1")
|
||||||
flat = true
|
|
||||||
|
|
||||||
[connection signal="pressed" from="NewGame/Button" to="." method="OneSinglePlayerPressed"]
|
[connection signal="pressed" from="NewGame/1Player" to="." method="OneSinglePlayerPressed"]
|
||||||
[connection signal="pressed" from="NewGame/Button2" to="." method="OnTwoPlayerPressed"]
|
[connection signal="pressed" from="NewGame/2 Player" to="." method="OnTwoPlayerPressed"]
|
||||||
[connection signal="pressed" from="NewGame/Button3" to="." method="OnQuitButtonPressed"]
|
[connection signal="pressed" from="NewGame/Quit" to="." method="OnQuitButtonPressed"]
|
||||||
|
|||||||
BIN
UI/Quit.png
Normal file
BIN
UI/Quit.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
34
UI/Quit.png.import
Normal file
34
UI/Quit.png.import
Normal 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
BIN
UI/TitleScreenFixed.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 MiB |
34
UI/TitleScreenFixed.png.import
Normal file
34
UI/TitleScreenFixed.png.import
Normal 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
BIN
UI/buttonoutline.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
34
UI/buttonoutline.png.import
Normal file
34
UI/buttonoutline.png.import
Normal 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
|
||||||
@@ -33,6 +33,41 @@ project/assembly_name="GameJam2023"
|
|||||||
|
|
||||||
[input]
|
[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={
|
p1_up={
|
||||||
"deadzone": 0.5,
|
"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)
|
"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)
|
||||||
|
|||||||
Reference in New Issue
Block a user