Polish Menu

This commit is contained in:
Snoweuph 2023-04-11 10:33:19 +02:00
parent 9201e21c78
commit 9c216a1dba
5 changed files with 87 additions and 23 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View file

@ -41,7 +41,7 @@
[ext_resource type="StyleBox" uid="uid://0jfr1uwuog0s" path="res://Assets/UI/Slider/v/background.tres" id="39_dl1e4"]
[ext_resource type="FontFile" uid="uid://dqdeftjkwxe64" path="res://Assets/Fonts/Dogica/dogicapixel.ttf" id="40_bmcvq"]
[sub_resource type="Image" id="Image_cw2pn"]
[sub_resource type="Image" id="Image_4kppd"]
data = {
"data": PackedByteArray(255, 255, 255, 0, 255, 255, 255, 64, 255, 255, 255, 64, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 64, 255, 255, 255, 64, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 64, 255, 255, 255, 64, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 64, 255, 255, 255, 64, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 64, 255, 255, 255, 64, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 64, 255, 255, 255, 64, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 64, 255, 255, 255, 64, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 64, 255, 255, 255, 64, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 64, 255, 255, 255, 64, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 64, 255, 255, 255, 64, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 64, 255, 255, 255, 64, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 64, 255, 255, 255, 64, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 64, 255, 255, 255, 64, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 64, 255, 255, 255, 64, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 64, 255, 255, 255, 64, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 64, 255, 255, 255, 64, 255, 255, 255, 0),
"format": "RGBA8",
@ -51,7 +51,7 @@ data = {
}
[sub_resource type="ImageTexture" id="ImageTexture_g5bup"]
image = SubResource("Image_cw2pn")
image = SubResource("Image_4kppd")
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_sj7h5"]

View file

@ -1,20 +1,63 @@
[gd_scene load_steps=25 format=3 uid="uid://cukyb513fah1u"]
[gd_scene load_steps=28 format=3 uid="uid://cukyb513fah1u"]
[ext_resource type="Script" path="res://Scripts/UI/MainMenuManager.gd" id="1_qepq0"]
[ext_resource type="Texture2D" uid="uid://tjxkew3m4v8m" path="res://Assets/Sprites/Start Menu Old/Easter Egg/Shadow.png" id="2_8o6th"]
[ext_resource type="PackedScene" uid="uid://c4btepmue6d7p" path="res://Scenes/Game.tscn" id="2_28004"]
[ext_resource type="Texture2D" uid="uid://daat37cyg0go5" path="res://Assets/Sprites/Start Menu Old/Easter Egg/Egg 3.png" id="3_1e3fe"]
[ext_resource type="PackedScene" uid="uid://cbfcolm6mjolp" path="res://Prefabs/Settings Menu.tscn" id="3_r3r61"]
[ext_resource type="Theme" uid="uid://babphdknr2kkd" path="res://Assets/UI/Theme.tres" id="4_bmt8e"]
[ext_resource type="Texture2D" uid="uid://c3yg6u8yncau3" path="res://Assets/Sprites/Start Menu Old/Easter Egg/Egg 2.png" id="6_45o7d"]
[ext_resource type="Texture2D" uid="uid://dkotcqflp3e32" path="res://Assets/Sprites/Start Menu Old/Easter Egg/Egg 1.png" id="7_285vd"]
[ext_resource type="Texture2D" uid="uid://ojlfqxj5bilo" path="res://Assets/Sprites/Jesus/jesus_spritesheet.png" id="7_g28i1"]
[ext_resource type="Texture2D" uid="uid://dlr823rtwhtq2" path="res://Assets/Sprites/EasterEgg.png" id="7_wokip"]
[ext_resource type="Texture2D" uid="uid://c54k7fn4fu42s" path="res://Assets/Sprites/Bunny/good_bunny_spritesheet.png" id="8_5vrmg"]
[ext_resource type="FontFile" uid="uid://dqdeftjkwxe64" path="res://Assets/Fonts/Dogica/dogicapixel.ttf" id="10_seibg"]
[ext_resource type="AudioStream" uid="uid://c6nf5s6xy2uii" path="res://Assets/Music/omw-to-beat-the-big-bad.wav" id="12_i62fw"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_5uvie"]
bg_color = Color(0.439216, 0.631373, 0.537255, 1)
[sub_resource type="Animation" id="Animation_iq7o3"]
resource_name = "Walk"
length = 0.8
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1),
"update": 1,
"values": [0, 1, 2, 3, 4, 5, 6, 7]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_xufdy"]
_data = {
"Autostart": SubResource("Animation_iq7o3")
}
[sub_resource type="Animation" id="Animation_53kbk"]
resource_name = "Autostart"
length = 0.2
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1),
"update": 1,
"values": [0, 1, 2, 3, 4]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_5tgwk"]
_data = {
"Autostart": SubResource("Animation_53kbk")
}
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_rmi2t"]
bg_color = Color(0.427451, 0.423529, 0.8, 1)
border_width_left = 4
@ -126,6 +169,7 @@ script = ExtResource("1_qepq0")
game_scene = ExtResource("2_28004")
settings_scene = ExtResource("3_r3r61")
default_focus = NodePath("MainVBox/ButtonsVbox/PlayButton")
autostart_animations = Array[NodePath]([NodePath("Decorations/Left Decor/Jesus/AnimationPlayer")])
[node name="ColorRect" type="Panel" parent="."]
anchors_preset = 15
@ -163,10 +207,24 @@ texture = ExtResource("7_g28i1")
hframes = 8
vframes = 4
[node name="Egg3" type="Sprite2D" parent="Decorations/Left Decor"]
position = Vector2(132, 530)
scale = Vector2(4.6875, 4.625)
texture = ExtResource("3_1e3fe")
[node name="AnimationPlayer" type="AnimationPlayer" parent="Decorations/Left Decor/Jesus"]
libraries = {
"": SubResource("AnimationLibrary_xufdy")
}
[node name="EasterEgg" type="Sprite2D" parent="Decorations/Left Decor"]
position = Vector2(137, 503)
scale = Vector2(4.97917, 4.97917)
texture = ExtResource("7_wokip")
hframes = 6
[node name="EasterEgg2" type="Sprite2D" parent="Decorations/Left Decor"]
position = Vector2(312, 528)
rotation = 1.33289
scale = Vector2(4.09073, 4.29567)
texture = ExtResource("7_wokip")
hframes = 6
frame = 4
[node name="Right Decor" type="CenterContainer" parent="Decorations"]
custom_minimum_size = Vector2(576, 0)
@ -183,21 +241,24 @@ position = Vector2(351, 403)
scale = Vector2(19.0938, 11.8125)
texture = ExtResource("2_8o6th")
[node name="Egg2" type="Sprite2D" parent="Decorations/Right Decor"]
position = Vector2(294, 487)
rotation = -1.5708
scale = Vector2(4.89203, 5.21732)
texture = ExtResource("6_45o7d")
[node name="Egg1" type="Sprite2D" parent="Decorations/Right Decor"]
position = Vector2(420.75, 471.25)
scale = Vector2(4.89062, 4.95313)
texture = ExtResource("7_285vd")
[node name="GoodBunny" type="Sprite2D" parent="Decorations/Right Decor"]
position = Vector2(331, 458.5)
position = Vector2(388, 471.5)
scale = Vector2(7.14286, 7.02941)
texture = ExtResource("8_5vrmg")
hframes = 5
vframes = 4
[node name="AnimationPlayer" type="AnimationPlayer" parent="Decorations/Right Decor/GoodBunny"]
libraries = {
"": SubResource("AnimationLibrary_5tgwk")
}
[node name="EasterEgg" type="Sprite2D" parent="Decorations/Right Decor"]
position = Vector2(298.625, 516.969)
scale = Vector2(4.11458, 4.11458)
texture = ExtResource("7_wokip")
hframes = 6
frame = 2
[node name="MainVBox" type="VBoxContainer" parent="."]
anchors_preset = 15

View file

@ -3,6 +3,7 @@ extends Node
@export var game_scene : Resource
@export var settings_scene : Resource
@export var default_focus : Control
@export var autostart_animations : Array[NodePath]
# Engine Callbackss
func _ready():
@ -14,6 +15,8 @@ func _ready():
GlobalSettings.update_music_volume(Save.game_data.music_volume)
GlobalSettings.update_sfx_volume(Save.game_data.sfx_volume)
default_focus.grab_focus()
for animation in autostart_animations:
(get_node(animation) as AnimationPlayer).play("Autostart")
pass
func _on_play_button_pressed():

View file

@ -1,6 +1,6 @@
extends Control
@export var min_time_between_remaps := 0.1
@export var min_time_between_remaps := 0.4
var remap_button : Button
var remap_action : String