main menu

This commit is contained in:
Rendo 2025-07-01 17:31:12 +05:00
commit 089ebc4797
35 changed files with 389 additions and 117 deletions

Binary file not shown.

View file

@ -13,5 +13,5 @@ void fragment() {
{ {
COLOR.rgb = vec3(255.0/255.0,127.0/255.0,80.0/255.0); COLOR.rgb = vec3(255.0/255.0,127.0/255.0,80.0/255.0);
} }
COLOR.a = COLOR.a*texture(noise,UV).a; COLOR.a = step(0.4 + 0.05 * sin((TIME+1.0)/4.0),COLOR.a*texture(noise,UV).a);
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Before After
Before After

View file

@ -4,4 +4,4 @@
[resource] [resource]
atlas = ExtResource("1_au0m1") atlas = ExtResource("1_au0m1")
region = Rect2(31, 1, 31, 32) region = Rect2(31, 0, 31, 33)

View file

@ -4,4 +4,4 @@
[resource] [resource]
atlas = ExtResource("1_rrcfd") atlas = ExtResource("1_rrcfd")
region = Rect2(62, 11, 31, 22) region = Rect2(62, 0, 31, 33)

View file

@ -0,0 +1,7 @@
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://c35dr3hiy66k0"]
[ext_resource type="Texture2D" uid="uid://dvldjlg0nr355" path="res://assets/sprites/atlases/atlas1.png" id="1_6j62c"]
[resource]
atlas = ExtResource("1_6j62c")
region = Rect2(576, 0, 65, 65)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 558 B

View file

@ -0,0 +1,7 @@
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://31jc2e7dijas"]
[ext_resource type="Texture2D" uid="uid://dvldjlg0nr355" path="res://assets/sprites/atlases/atlas1.png" id="1_5bxlp"]
[resource]
atlas = ExtResource("1_5bxlp")
region = Rect2(351, 65, 41, 56)

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 B

View file

@ -2,16 +2,16 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://cxlr34yh0bqch" uid="uid://cmcwrgcm272gy"
path="res://.godot/imported/DisabledEmptyCard.png-7f5482b96bf2d482bb3d5df447102c95.ctex" path="res://.godot/imported/main_menu_buttons.png-879fc80bdc55423878339132e84ccb38.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://assets/sprites/gui/DisabledEmptyCard.png" source_file="res://assets/sprites/gui/main_menu_buttons.png"
dest_files=["res://.godot/imported/DisabledEmptyCard.png-7f5482b96bf2d482bb3d5df447102c95.ctex"] dest_files=["res://.godot/imported/main_menu_buttons.png-879fc80bdc55423878339132e84ccb38.ctex"]
[params] [params]

BIN
assets/sprites/menu_bg.ase Normal file

Binary file not shown.

BIN
assets/sprites/menu_bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c37pvdhol2x02"
path="res://.godot/imported/menu_bg.png-9478556fe857b797a39f623531c087e9.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/menu_bg.png"
dest_files=["res://.godot/imported/menu_bg.png-9478556fe857b797a39f623531c087e9.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

View file

@ -48,6 +48,10 @@ folder_colors={
"res://scripts/": "blue" "res://scripts/": "blue"
} }
[filesystem]
import/blender/enabled=false
[gui] [gui]
theme/custom="res://resources/themes/GameStyle.tres" theme/custom="res://resources/themes/GameStyle.tres"

View file

@ -1,8 +1,20 @@
[gd_resource type="Resource" script_class="PlantResource" load_steps=4 format=3 uid="uid://bf7vjtufjc8kt"] [gd_resource type="Resource" script_class="PlantResource" load_steps=9 format=3 uid="uid://bf7vjtufjc8kt"]
[ext_resource type="Texture2D" uid="uid://d4btl7vqi4v0q" path="res://assets/sprites/plants/aloe.tres" id="1_t4137"] [ext_resource type="Texture2D" uid="uid://d4btl7vqi4v0q" path="res://assets/sprites/plants/aloe.tres" id="1_t4137"]
[ext_resource type="Script" uid="uid://cyenlko1knygw" path="res://scripts/resources/PlantResource.cs" id="1_vw2kg"] [ext_resource type="Script" uid="uid://cyenlko1knygw" path="res://scripts/resources/PlantResource.cs" id="1_vw2kg"]
[ext_resource type="PackedScene" uid="uid://bw1w8jp0yeypy" path="res://scenes/entities/plants/aloe.tscn" id="2_6a4ia"] [ext_resource type="PackedScene" uid="uid://bw1w8jp0yeypy" path="res://scenes/entities/plants/aloe.tscn" id="2_6a4ia"]
[ext_resource type="Texture2D" uid="uid://c35dr3hiy66k0" path="res://assets/sprites/gui/ChooseYourSeeds/PremiumFrameField.tres" id="3_2s3af"]
[ext_resource type="Texture2D" uid="uid://31jc2e7dijas" path="res://assets/sprites/gui/PremiumPlantCard.tres" id="3_vfv8g"]
[ext_resource type="Script" uid="uid://3m7xks3xq3hl" path="res://scripts/components/gui/seedpackets/CustomSeedpacketFrame.cs" id="4_d5nqg"]
[sub_resource type="LabelSettings" id="LabelSettings_2s3af"]
[sub_resource type="Resource" id="Resource_5me4i"]
script = ExtResource("4_d5nqg")
frame = ExtResource("3_vfv8g")
font = SubResource("LabelSettings_2s3af")
almanachField = ExtResource("3_2s3af")
metadata/_custom_type_script = "uid://3m7xks3xq3hl"
[resource] [resource]
script = ExtResource("1_vw2kg") script = ExtResource("1_vw2kg")
@ -18,3 +30,4 @@ ReloadTime = 15.0
ReloadProgress = 0.0 ReloadProgress = 0.0
Preview = ExtResource("1_t4137") Preview = ExtResource("1_t4137")
Layer = 1 Layer = 1
customFrame = SubResource("Resource_5me4i")

View file

@ -0,0 +1,44 @@
[gd_resource type="Theme" load_steps=8 format=3 uid="uid://btulhvgwclket"]
[ext_resource type="Texture2D" uid="uid://cmcwrgcm272gy" path="res://assets/sprites/gui/main_menu_buttons.png" id="1_jv7fv"]
[sub_resource type="AtlasTexture" id="AtlasTexture_132w1"]
atlas = ExtResource("1_jv7fv")
region = Rect2(96, 0, 48, 48)
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_45124"]
texture = SubResource("AtlasTexture_132w1")
texture_margin_left = 15.0
texture_margin_top = 15.0
texture_margin_right = 15.0
texture_margin_bottom = 15.0
[sub_resource type="AtlasTexture" id="AtlasTexture_n6pvk"]
atlas = ExtResource("1_jv7fv")
region = Rect2(0, 0, 48, 48)
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_2hb1n"]
texture = SubResource("AtlasTexture_n6pvk")
texture_margin_left = 15.0
texture_margin_top = 15.0
texture_margin_right = 15.0
texture_margin_bottom = 15.0
[sub_resource type="AtlasTexture" id="AtlasTexture_p1ypd"]
atlas = ExtResource("1_jv7fv")
region = Rect2(48, 0, 48, 48)
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_fg17j"]
texture = SubResource("AtlasTexture_p1ypd")
texture_margin_left = 15.0
texture_margin_top = 15.0
texture_margin_right = 15.0
texture_margin_bottom = 15.0
[resource]
Button/colors/font_color = Color(0.875, 0.875, 0.875, 1)
Button/colors/font_focus_color = Color(0.95, 0.95, 0.95, 1)
Button/colors/font_hover_color = Color(1, 1, 1, 1)
Button/styles/hover = SubResource("StyleBoxTexture_45124")
Button/styles/normal = SubResource("StyleBoxTexture_2hb1n")
Button/styles/pressed = SubResource("StyleBoxTexture_fg17j")

View file

@ -1,91 +0,0 @@
[gd_scene load_steps=4 format=3 uid="uid://bfstrli64u23y"]
[ext_resource type="Texture2D" uid="uid://dvldjlg0nr355" path="res://assets/sprites/atlases/atlas1.png" id="1_xbu81"]
[sub_resource type="AtlasTexture" id="AtlasTexture_5pe7g"]
atlas = ExtResource("1_xbu81")
region = Rect2(226, 77, 18, 18)
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_jl0ue"]
texture = SubResource("AtlasTexture_5pe7g")
texture_margin_left = 6.0
texture_margin_top = 6.0
texture_margin_right = 6.0
texture_margin_bottom = 6.0
[node name="MainMenu" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="PrototypeWindow" type="AcceptDialog" parent="."]
title = ""
size = Vector2i(600, 400)
visible = true
unresizable = true
borderless = true
theme_override_styles/panel = SubResource("StyleBoxTexture_jl0ue")
ok_button_text = "Let's go"
dialog_close_on_escape = false
[node name="ScrollContainer" type="ScrollContainer" parent="PrototypeWindow"]
offset_left = 6.0
offset_top = 6.0
offset_right = 594.0
offset_bottom = 343.0
[node name="PrototypeNotification" type="RichTextLabel" parent="PrototypeWindow/ScrollContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
bbcode_enabled = true
text = "[p][center][wave amp=50.0 freq=5.0 connected=1][font_size=24]WELCOME TO LIBERATION OF NEIGHBOURVILLE PROTOTYPE![/font_size][/wave][/center][/p]
[p]Big thanks from me, Rendo, and our team! We appreciate any feedback, so consider reporting bugs to our [color=cyan][url=https://www.youtube.com/watch?v=dQw4w9WgXcQ]discord server[/url][/color].[/p][p][/p]
[p]Liberation of Neighbourville is currently in early stages of development. However, we reached point when all essential systems and mechanics are ready.[/p]
[p][/p]
[p]As for now, you can play survival endless with all currently made plants. Game includes some plants from first Plants versus Zombies, Aloe from sequel, three basic zombies and a hobo zombie.[/p]
[p][/p]
[p]As for 0.2.X version, current roadmap contains:[ul]
[p]Adventure mode[/p]
[p]Almanach[/p]
[p]New plants and zombies, obviously[/p]
[p]More ways to play[/p]
[/ul][/p]"
fit_content = true
scroll_active = false
[node name="AboutWindow" type="AcceptDialog" parent="."]
title = ""
initial_position = 2
size = Vector2i(300, 400)
unresizable = true
borderless = true
theme_override_styles/panel = SubResource("StyleBoxTexture_jl0ue")
[node name="ScrollContainer" type="ScrollContainer" parent="AboutWindow"]
offset_left = 6.0
offset_top = 6.0
offset_right = 294.0
offset_bottom = 343.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="AboutText" type="RichTextLabel" parent="AboutWindow/ScrollContainer"]
layout_mode = 2
size_flags_horizontal = 3
bbcode_enabled = true
text = "[p][center][font_size=24]About[/font_size][/center][/p]
[p]Made in [color=steel_blue]Godot Engine [img=16]res://icon.svg[/img][/color][/p]
[p]
Made by: [ul]
[p]Rendo - programmer, gamedesigner[/p]
[p]Slaimy - graphics designer, gamedesigner[/p]
[p]CaTronick - graphics designer, gamedesigner[/p]
[/ul]
[/p]
[p]All rights for Plants versus Zombies franchise belong to PopCap games[/p]"
fit_content = true
scroll_active = false

View file

@ -8,6 +8,7 @@
[ext_resource type="Script" uid="uid://ddi84kmmq1qla" path="res://scripts/components/gui/VeilResizer.cs" id="7_tv07f"] [ext_resource type="Script" uid="uid://ddi84kmmq1qla" path="res://scripts/components/gui/VeilResizer.cs" id="7_tv07f"]
[sub_resource type="LabelSettings" id="LabelSettings_js4li"] [sub_resource type="LabelSettings" id="LabelSettings_js4li"]
resource_local_to_scene = true
font_size = 13 font_size = 13
font_color = Color(0, 0, 0, 1) font_color = Color(0, 0, 0, 1)

181
scenes/main_menu.tscn Normal file
View file

@ -0,0 +1,181 @@
[gd_scene load_steps=13 format=3 uid="uid://bfstrli64u23y"]
[ext_resource type="Texture2D" uid="uid://dvldjlg0nr355" path="res://assets/sprites/atlases/atlas1.png" id="1_jk1qb"]
[ext_resource type="Script" uid="uid://drru785m4eep" path="res://scripts/components/gui/main_menu_rich_text.gd" id="2_5dd4i"]
[ext_resource type="Script" uid="uid://dgevhrbucpwrs" path="res://scripts/components/gui/prototype_window.gd" id="2_lgwnu"]
[ext_resource type="Texture2D" uid="uid://c37pvdhol2x02" path="res://assets/sprites/menu_bg.png" id="3_lgwnu"]
[ext_resource type="Theme" uid="uid://btulhvgwclket" path="res://resources/themes/MainMenu.tres" id="4_flqon"]
[ext_resource type="Script" uid="uid://c06k4k3ww48ev" path="res://scripts/components/gui/menu_buttons.gd" id="5_rcqid"]
[ext_resource type="Script" uid="uid://6e8n6kc0y11o" path="res://scripts/sacrifice.gd" id="6_1ajci"]
[ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="7_7b55j"]
[ext_resource type="AudioStream" uid="uid://bdx83fokp6kha" path="res://assets/audio/sfx/buttonclick.mp3" id="8_5pajh"]
[ext_resource type="AudioStream" uid="uid://djgyc7bbwcepp" path="res://assets/audio/music/Александр Зацепин - Увертюра.mp3" id="9_j7ex8"]
[sub_resource type="AtlasTexture" id="AtlasTexture_5pe7g"]
atlas = ExtResource("1_jk1qb")
region = Rect2(226, 77, 18, 18)
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_jl0ue"]
texture = SubResource("AtlasTexture_5pe7g")
texture_margin_left = 6.0
texture_margin_top = 6.0
texture_margin_right = 6.0
texture_margin_bottom = 6.0
[node name="MainMenu" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="PrototypeWindow" type="AcceptDialog" parent="."]
title = ""
size = Vector2i(600, 400)
unresizable = true
borderless = true
theme_override_styles/panel = SubResource("StyleBoxTexture_jl0ue")
ok_button_text = "Close"
dialog_close_on_escape = false
script = ExtResource("2_lgwnu")
[node name="ScrollContainer" type="ScrollContainer" parent="PrototypeWindow"]
offset_left = 6.0
offset_top = 6.0
offset_right = 594.0
offset_bottom = 343.0
[node name="PrototypeNotification" type="RichTextLabel" parent="PrototypeWindow/ScrollContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
bbcode_enabled = true
text = "[p][center][wave amp=50.0 freq=5.0 connected=1][font_size=24]WELCOME TO LIBERATION OF NEIGHBOURVILLE PROTOTYPE![/font_size][/wave][/center][/p]
[p]Big thanks from me, Rendo, and our team! We appreciate any feedback, so consider reporting bugs to our [color=cyan][url=https://www.youtube.com/watch?v=dQw4w9WgXcQ]discord server[/url][/color].[/p][p][/p]
[p]Liberation of Neighbourville is currently in early stages of development. However, we reached point when all essential systems and mechanics are ready.[/p]
[p][/p]
[p]As for now, you can play survival endless with all currently made plants. Game includes some plants from first Plants versus Zombies, Aloe from sequel, three basic zombies and a hobo zombie.[/p]
[p][/p]
[p]As for 0.2.X version, current roadmap contains:[ul]
[p]Adventure mode[/p]
[p]Almanach[/p]
[p]New plants and zombies, obviously[/p]
[p]More ways to play[/p]
[/ul][/p]"
fit_content = true
scroll_active = false
script = ExtResource("2_5dd4i")
[node name="AboutWindow" type="AcceptDialog" parent="."]
title = ""
initial_position = 2
size = Vector2i(300, 300)
unresizable = true
borderless = true
theme_override_styles/panel = SubResource("StyleBoxTexture_jl0ue")
ok_button_text = "Close"
[node name="ScrollContainer" type="ScrollContainer" parent="AboutWindow"]
offset_left = 6.0
offset_top = 6.0
offset_right = 294.0
offset_bottom = 243.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="AboutText" type="RichTextLabel" parent="AboutWindow/ScrollContainer"]
layout_mode = 2
size_flags_horizontal = 3
bbcode_enabled = true
text = "[p][center][font_size=24]About[/font_size][/center][/p]
[p]Made in [color=steel_blue]Godot Engine [img=16]res://icon.svg[/img][/color][/p]
[p]
Made by: [ul]
[p]Rendo - programmer, gamedesigner[/p]
[p]Slaimy - graphics designer, gamedesigner[/p]
[p]CaTronick - graphics designer, gamedesigner[/p]
[/ul]
[/p]
[p]All rights for Plants versus Zombies franchise belong to PopCap games[/p]"
fit_content = true
scroll_active = false
[node name="BG" type="TextureRect" parent="."]
z_index = -1
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
texture = ExtResource("3_lgwnu")
metadata/_edit_lock_ = true
[node name="Buttons" type="Control" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("4_flqon")
script = ExtResource("5_rcqid")
metadata/_edit_lock_ = true
[node name="GameButtons" type="VBoxContainer" parent="Buttons"]
layout_mode = 0
offset_left = 501.0
offset_top = 177.0
offset_right = 593.0
offset_bottom = 275.0
[node name="PlayButton" type="Button" parent="Buttons/GameButtons"]
layout_mode = 2
text = "Play"
[node name="ExitButton" type="Button" parent="Buttons/GameButtons"]
layout_mode = 2
text = "Exit"
[node name="InfoButtons" type="VBoxContainer" parent="Buttons"]
layout_mode = 0
offset_left = 10.0
offset_top = 188.0
offset_right = 86.0
offset_bottom = 235.0
[node name="Button" type="Button" parent="Buttons/InfoButtons"]
layout_mode = 2
text = "About"
[node name="SACRIFICE" type="TextureButton" parent="Buttons"]
layout_mode = 0
offset_left = 338.0
offset_top = 254.0
offset_right = 387.0
offset_bottom = 278.0
script = ExtResource("6_1ajci")
[node name="CONFIRM" type="AcceptDialog" parent="Buttons/SACRIFICE"]
title = ""
initial_position = 1
size = Vector2i(359, 100)
ok_button_text = ""
dialog_text = " ?
"
[node name="ChannelPlayer" type="Node" parent="Buttons"]
script = ExtResource("7_7b55j")
audioStream = ExtResource("8_5pajh")
channel = "button"
metadata/_custom_type_script = "uid://c36bj8u7jghc7"
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource("9_j7ex8")
volume_db = -20.0
autoplay = true
[connection signal="meta_clicked" from="PrototypeWindow/ScrollContainer/PrototypeNotification" to="PrototypeWindow/ScrollContainer/PrototypeNotification" method="_on_meta_clicked"]
[connection signal="pressed" from="Buttons/GameButtons/PlayButton" to="Buttons" method="_on_play_button_pressed"]
[connection signal="pressed" from="Buttons/GameButtons/ExitButton" to="Buttons" method="_on_exit_button_pressed"]
[connection signal="pressed" from="Buttons/InfoButtons/Button" to="Buttons" method="_on_button_pressed"]
[connection signal="close_requested" from="Buttons/SACRIFICE/CONFIRM" to="Buttons/SACRIFICE" method="_on_confirm_close_requested"]
[connection signal="confirmed" from="Buttons/SACRIFICE/CONFIRM" to="Buttons/SACRIFICE" method="_on_confirm_confirmed"]

View file

@ -9,6 +9,7 @@
colors = PackedColorArray(0, 0, 0, 0, 1, 1, 1, 1) colors = PackedColorArray(0, 0, 0, 0, 1, 1, 1, 1)
[sub_resource type="FastNoiseLite" id="FastNoiseLite_1ybnd"] [sub_resource type="FastNoiseLite" id="FastNoiseLite_1ybnd"]
seed = 4
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_yu0ma"] [sub_resource type="NoiseTexture2D" id="NoiseTexture2D_yu0ma"]
width = 600 width = 600
@ -24,6 +25,21 @@ shader_parameter/noise = SubResource("NoiseTexture2D_yu0ma")
stream_count = 1 stream_count = 1
stream_0 = ExtResource("2_bijdt") stream_0 = ExtResource("2_bijdt")
[sub_resource type="Animation" id="Animation_1ybnd"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("TextureRect:self_modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 1)]
}
[sub_resource type="Animation" id="Animation_b8skw"] [sub_resource type="Animation" id="Animation_b8skw"]
resource_name = "main" resource_name = "main"
length = 10.0 length = 10.0
@ -40,21 +56,6 @@ tracks/0/keys = {
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)] "values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
} }
[sub_resource type="Animation" id="Animation_1ybnd"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("TextureRect:self_modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 1)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_yu0ma"] [sub_resource type="AnimationLibrary" id="AnimationLibrary_yu0ma"]
_data = { _data = {
&"RESET": SubResource("Animation_1ybnd"), &"RESET": SubResource("Animation_1ybnd"),

View file

@ -1,10 +1,9 @@
using Godot; using Godot;
using System;
public partial class ExitButton : Button public partial class ExitButton : Button
{ {
public override void _Pressed() public override void _Pressed()
{ {
GetTree().Quit(); GetTree().ChangeSceneToFile("uid://bfstrli64u23y");
} }
} }

View file

@ -21,7 +21,7 @@ public partial class PauseMenu : Control
} }
public void Exit() public void Exit()
{ {
GetTree().Quit(); GetTree().ChangeSceneToFile("uid://bfstrli64u23y");
} }
public static void Pause() public static void Pause()
{ {

View file

@ -6,6 +6,7 @@ using Newlon.Components.Plants;
public partial class Previewport : SubViewport public partial class Previewport : SubViewport
{ {
private RuntimePlantData current_display; private RuntimePlantData current_display;
private Texture2D start_Field;
[Export] private Label title; [Export] private Label title;
[Export] private RichTextLabel description; [Export] private RichTextLabel description;
@ -13,6 +14,7 @@ public partial class Previewport : SubViewport
public override void _Ready() public override void _Ready()
{ {
GetParent().GetViewport().GuiFocusChanged += OnFocusChanged; GetParent().GetViewport().GuiFocusChanged += OnFocusChanged;
start_Field = GetNode<Sprite2D>("FrameField").Texture;
} }
public void OnFocusChanged(Control node) public void OnFocusChanged(Control node)
@ -30,6 +32,12 @@ public partial class Previewport : SubViewport
{ {
current_display.QueueFree(); current_display.QueueFree();
} }
if (resource.customFrame != null && resource.customFrame.almanachField != null)
{
GetNode<Sprite2D>("FrameField").Texture = resource.customFrame.almanachField;
}
else
GetNode<Sprite2D>("FrameField").Texture = start_Field;
current_display = resource.Scene.Instantiate<RuntimePlantData>(); current_display = resource.Scene.Instantiate<RuntimePlantData>();
title.Text = resource.display_name; title.Text = resource.display_name;
description.Text = resource.display_description; description.Text = resource.display_description;

View file

@ -0,0 +1,5 @@
extends RichTextLabel
func _on_meta_clicked(meta: Variant) -> void:
OS.shell_open(meta)

View file

@ -0,0 +1 @@
uid://drru785m4eep

View file

@ -0,0 +1,16 @@
extends Node
func _on_play_button_pressed() -> void:
get_tree().change_scene_to_file("res://scenes/prototype_survival.tscn")
$ChannelPlayer.call("Play")
func _on_exit_button_pressed() -> void:
get_tree().quit()
$ChannelPlayer.call("Play")
func _on_button_pressed() -> void:
$"../AboutWindow".popup_centered()
$ChannelPlayer.call("Play")

View file

@ -0,0 +1 @@
uid://c06k4k3ww48ev

View file

@ -0,0 +1,9 @@
extends AcceptDialog
static var seen = false
func _ready() -> void:
if seen:
return
seen = true
popup_centered()

View file

@ -0,0 +1 @@
uid://dgevhrbucpwrs

View file

@ -0,0 +1,9 @@
using Godot;
[GlobalClass]
public partial class CustomSeedpacketFrame : Resource
{
[Export] public Texture2D frame;
[Export] public LabelSettings font;
[Export] public Texture2D almanachField;
}

View file

@ -0,0 +1 @@
uid://3m7xks3xq3hl

View file

@ -73,6 +73,11 @@ public partial class Seedpacket : TextureButton
_cost.Text = _resource.Cost.ToString(); _cost.Text = _resource.Cost.ToString();
_icon.Texture = _resource.Preview; _icon.Texture = _resource.Preview;
_timer.WaitTime = _resource.ReloadTime; _timer.WaitTime = _resource.ReloadTime;
if (_resource.customFrame != null)
{
TextureNormal = _resource.customFrame.frame;
_cost.LabelSettings = _resource.customFrame.font;
}
} }
public override void _Pressed() public override void _Pressed()

View file

@ -18,6 +18,7 @@ public partial class PlantResource : Resource
[Export] [Export]
public Texture2D Preview; public Texture2D Preview;
[Export] public int Layer = 1; [Export] public int Layer = 1;
[Export] public CustomSeedpacketFrame customFrame;
public string internal_id; public string internal_id;
} }

14
scripts/sacrifice.gd Normal file
View file

@ -0,0 +1,14 @@
extends TextureButton
@onready var confirm = $CONFIRM
func _pressed() -> void:
confirm.popup_centered()
func _on_confirm_close_requested() -> void:
get_tree().change_scene_to_file("res://scenes/sacrifice.tscn")
func _on_confirm_confirmed() -> void:
get_tree().change_scene_to_file("res://scenes/sacrifice.tscn")

1
scripts/sacrifice.gd.uid Normal file
View file

@ -0,0 +1 @@
uid://6e8n6kc0y11o