summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi92@disroot.org>2026-11-18 01:28:44 +0100
committerXavier Del Campo Romero <xavi92@disroot.org>2026-11-18 01:28:44 +0100
commitd42bf563c5e7a3935400bc06a835e160b161503c (patch)
treea21c452e8dc5ef6539d1e2f44a3d5ecce3f56bc6
parentdeb102e1ea913abec2b9e29bf84e6611baa843fe (diff)
downloadnj26-d42bf563c5e7a3935400bc06a835e160b161503c.tar.gz
Change title + setup splash boot screen
-rw-r--r--mainmenu.gd18
-rw-r--r--mainmenu.tscn36
-rw-r--r--project.godot5
-rw-r--r--splash.pngbin0 -> 392007 bytes
-rw-r--r--title.pngbin392007 -> 520643 bytes
5 files changed, 46 insertions, 13 deletions
diff --git a/mainmenu.gd b/mainmenu.gd
index f188091..03494fd 100644
--- a/mainmenu.gd
+++ b/mainmenu.gd
@@ -2,6 +2,9 @@ extends Node2D
var select = preload("res://select.tscn").instance()
var credits = preload("res://credits.tscn").instance()
+var images: Dictionary = {}
+var frame_i = 0
+var lastt = 0
func start():
get_tree().root.add_child(select)
@@ -16,9 +19,24 @@ func run_credits():
func set_music_pos(pos):
$music.play(pos)
+func _process(delta):
+ lastt += delta
+
+ if lastt >= 0.06:
+ lastt = 0
+ frame_i += 1
+
+ if frame_i >= 55:
+ frame_i = 0
+
+ $cl/c4/cat.texture = images[frame_i]
+
func _ready():
var __
+ for i in range(55):
+ images[i] = load("res://cat/c" + str(i) + ".png")
+
__ = $cl/c2/play.connect("button_up", self, "start")
__ = $cl/c3/credits.connect("button_up", self, "run_credits")
$music.play()
diff --git a/mainmenu.tscn b/mainmenu.tscn
index e8a4c31..8758b50 100644
--- a/mainmenu.tscn
+++ b/mainmenu.tscn
@@ -7,7 +7,7 @@
[ext_resource path="res://music.mp3" type="AudioStream" id=6]
[sub_resource type="DynamicFont" id=2]
-size = 48
+size = 64
use_filter = true
font_data = ExtResource( 3 )
@@ -35,32 +35,32 @@ margin_bottom = 40.0
use_top_left = true
[node name="Label" type="TextureRect" parent="cl/cc"]
-margin_left = -320.0
-margin_top = -320.0
-margin_right = 320.0
-margin_bottom = 320.0
+margin_left = -506.0
+margin_top = -131.0
+margin_right = 506.0
+margin_bottom = 130.0
texture = ExtResource( 2 )
[node name="c2" type="CenterContainer" parent="cl"]
anchor_left = 0.5
-anchor_top = 0.818
+anchor_top = 0.6
anchor_right = 0.5
-anchor_bottom = 0.847
+anchor_bottom = 0.6
margin_right = 40.0
margin_bottom = 40.0
use_top_left = true
[node name="play" type="Button" parent="cl/c2"]
-margin_left = -63.0
-margin_top = -32.0
-margin_right = 62.0
-margin_bottom = 31.0
+margin_left = -82.0
+margin_top = -41.0
+margin_right = 82.0
+margin_bottom = 41.0
custom_fonts/font = SubResource( 2 )
text = "Play"
[node name="c3" type="CenterContainer" parent="cl"]
anchor_left = 0.5
-anchor_top = 0.95
+anchor_top = 0.7
anchor_right = 0.5
anchor_bottom = 0.95
margin_right = 40.0
@@ -75,5 +75,17 @@ margin_bottom = 31.0
custom_fonts/font = SubResource( 3 )
text = "Credits"
+[node name="c4" type="CenterContainer" parent="cl"]
+anchor_left = 0.2
+anchor_top = 0.7
+anchor_right = 0.2
+anchor_bottom = 0.7
+margin_right = 40.0
+margin_bottom = 40.0
+rect_scale = Vector2( 0.6, 0.6 )
+use_top_left = true
+
+[node name="cat" type="TextureRect" parent="cl/c4"]
+
[node name="music" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 6 )
diff --git a/project.godot b/project.godot
index 592ca50..1baebd3 100644
--- a/project.godot
+++ b/project.godot
@@ -50,8 +50,11 @@ _global_script_class_icons={
[application]
-config/name="nj26"
+config/name="Eat the Cat!"
run/main_scene="res://mainmenu.tscn"
+boot_splash/image="res://splash.png"
+boot_splash/fullsize=false
+boot_splash/bg_color=Color( 0, 0, 0, 1 )
config/icon="res://icon.png"
[display]
diff --git a/splash.png b/splash.png
new file mode 100644
index 0000000..51c3cce
--- /dev/null
+++ b/splash.png
Binary files differ
diff --git a/title.png b/title.png
index 51c3cce..854fb1b 100644
--- a/title.png
+++ b/title.png
Binary files differ