From e2682da7fe8a4e4b67cfe2fcfb12377cf11a7694 Mon Sep 17 00:00:00 2001 From: yuki Date: Tue, 25 Nov 2025 17:37:54 -0300 Subject: [PATCH] add main menu --- project.godot | 1 + scenes/main_menu/main_menu.gd | 6 +++++ scenes/main_menu/main_menu.gd.uid | 1 + scenes/main_menu/main_menu.tscn | 44 +++++++++++++++++++++++++++++++ 4 files changed, 52 insertions(+) create mode 100644 scenes/main_menu/main_menu.gd create mode 100644 scenes/main_menu/main_menu.gd.uid create mode 100644 scenes/main_menu/main_menu.tscn diff --git a/project.godot b/project.godot index 6670308..0c035ed 100644 --- a/project.godot +++ b/project.godot @@ -11,6 +11,7 @@ config_version=5 [application] config/name="girl will never sing again" +run/main_scene="uid://5wfpwjykqson" config/features=PackedStringArray("4.5", "GL Compatibility") config/icon="uid://4aq8ekc6sruc" diff --git a/scenes/main_menu/main_menu.gd b/scenes/main_menu/main_menu.gd new file mode 100644 index 0000000..1387121 --- /dev/null +++ b/scenes/main_menu/main_menu.gd @@ -0,0 +1,6 @@ +extends Node2D + + +func _unhandled_input(event: InputEvent) -> void: + if event.is_action_pressed("interact"): + GameDirector.start_game() diff --git a/scenes/main_menu/main_menu.gd.uid b/scenes/main_menu/main_menu.gd.uid new file mode 100644 index 0000000..beb2fe3 --- /dev/null +++ b/scenes/main_menu/main_menu.gd.uid @@ -0,0 +1 @@ +uid://xuibr7dn2qtw diff --git a/scenes/main_menu/main_menu.tscn b/scenes/main_menu/main_menu.tscn new file mode 100644 index 0000000..aa272d4 --- /dev/null +++ b/scenes/main_menu/main_menu.tscn @@ -0,0 +1,44 @@ +[gd_scene load_steps=7 format=3 uid="uid://5wfpwjykqson"] + +[ext_resource type="FontFile" uid="uid://bce5el6o5igwn" path="res://assets/fonts/Axolotl.ttf" id="1_ob46e"] +[ext_resource type="Script" uid="uid://xuibr7dn2qtw" path="res://scenes/main_menu/main_menu.gd" id="1_uqeha"] +[ext_resource type="Shader" uid="uid://bxvmsjxx0tj21" path="res://shaders/palette.gdshader" id="2_uqeha"] +[ext_resource type="Texture2D" uid="uid://h5523ru86vrd" path="res://assets/palettes/forgotten-120.png" id="3_wem23"] + +[sub_resource type="LabelSettings" id="LabelSettings_3ovsr"] +font = ExtResource("1_ob46e") + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_5seab"] +shader = ExtResource("2_uqeha") +shader_parameter/palette = ExtResource("3_wem23") +shader_parameter/palette_size = 120 + +[node name="MainMenu" type="Node2D"] +script = ExtResource("1_uqeha") + +[node name="Label" type="Label" parent="."] +anchors_preset = 7 +anchor_left = 0.5 +anchor_top = 1.0 +anchor_right = 0.5 +anchor_bottom = 1.0 +offset_left = 24.0 +offset_top = 208.0 +offset_right = 99.0 +offset_bottom = 224.0 +grow_horizontal = 2 +grow_vertical = 0 +size_flags_horizontal = 4 +text = "press z to start" +label_settings = SubResource("LabelSettings_3ovsr") + +[node name="CanvasLayer" type="CanvasLayer" parent="."] + +[node name="PaletteShader" type="ColorRect" parent="CanvasLayer"] +material = SubResource("ShaderMaterial_5seab") +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +metadata/_edit_lock_ = true