almanach button
This commit is contained in:
parent
473421eb32
commit
c8956dc38b
7 changed files with 102 additions and 21 deletions
5
scenes/gui/almanach.gd
Normal file
5
scenes/gui/almanach.gd
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
extends TabContainer
|
||||
|
||||
func _on_quit_button_pressed() -> void:
|
||||
visible = false
|
||||
$ChannelPlayer.call("Play")
|
||||
1
scenes/gui/almanach.gd.uid
Normal file
1
scenes/gui/almanach.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bs1qywtqijyd2
|
||||
|
|
@ -1,15 +1,18 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://bvpt0q4j6nx18"]
|
||||
[gd_scene load_steps=10 format=3 uid="uid://bvpt0q4j6nx18"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dr8a0rx42o3qy" path="res://assets/sprites/gui/ChooseYourSeeds/PlantFrame.tres" id="1_1hnxi"]
|
||||
[ext_resource type="Script" uid="uid://bs1qywtqijyd2" path="res://scenes/gui/almanach.gd" id="1_oy57w"]
|
||||
[ext_resource type="Script" uid="uid://0mvmfvwe1bc7" path="res://scripts/components/gui/almanach/AlmanachGrid.cs" id="1_ru62c"]
|
||||
[ext_resource type="Script" uid="uid://covbig00p22di" path="res://scripts/components/gui/choose_your_seeds/Previewport.cs" id="2_ru62c"]
|
||||
[ext_resource type="Texture2D" uid="uid://dycdvvgmgmfu6" path="res://assets/sprites/gui/ChooseYourSeeds/FrameField.tres" id="3_oy57w"]
|
||||
[ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="6_7vo1l"]
|
||||
[ext_resource type="AudioStream" uid="uid://bdx83fokp6kha" path="res://assets/audio/sfx/buttonclick.mp3" id="7_vvhxq"]
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_ru62c"]
|
||||
viewport_path = NodePath("plants/Infobox/FrameAndTitle/Frame/Previewport")
|
||||
viewport_path = NodePath("plants/Infobox/FrameAndTitle/VboxContainer/Frame/Previewport")
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_7yl8g"]
|
||||
viewport_path = NodePath("zombies/Infobox/FrameAndTitle/Frame/Previewport")
|
||||
viewport_path = NodePath("zombies/Infobox/FrameAndTitle/VBoxContainer/Frame/Previewport")
|
||||
|
||||
[node name="Almanach" type="TabContainer"]
|
||||
anchors_preset = 15
|
||||
|
|
@ -19,6 +22,7 @@ grow_horizontal = 2
|
|||
grow_vertical = 2
|
||||
tab_alignment = 1
|
||||
current_tab = 0
|
||||
script = ExtResource("1_oy57w")
|
||||
|
||||
[node name="plants" type="HBoxContainer" parent="."]
|
||||
layout_mode = 2
|
||||
|
|
@ -40,26 +44,29 @@ size_flags_horizontal = 3
|
|||
[node name="FrameAndTitle" type="HBoxContainer" parent="plants/Infobox"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Frame" type="TextureRect" parent="plants/Infobox/FrameAndTitle"]
|
||||
[node name="VboxContainer" type="VBoxContainer" parent="plants/Infobox/FrameAndTitle"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Frame" type="TextureRect" parent="plants/Infobox/FrameAndTitle/VboxContainer"]
|
||||
clip_contents = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 0
|
||||
texture = ExtResource("1_1hnxi")
|
||||
|
||||
[node name="Previewport" type="SubViewport" parent="plants/Infobox/FrameAndTitle/Frame" node_paths=PackedStringArray("title", "description")]
|
||||
[node name="Previewport" type="SubViewport" parent="plants/Infobox/FrameAndTitle/VboxContainer/Frame" node_paths=PackedStringArray("title", "description")]
|
||||
canvas_item_default_texture_filter = 0
|
||||
size = Vector2i(65, 65)
|
||||
script = ExtResource("2_ru62c")
|
||||
title = NodePath("../../Label")
|
||||
description = NodePath("../../../Description/ScrollContainer/RichTextLabel")
|
||||
title = NodePath("../../../Label")
|
||||
description = NodePath("../../../../Description/ScrollContainer/RichTextLabel")
|
||||
|
||||
[node name="FrameField" type="Sprite2D" parent="plants/Infobox/FrameAndTitle/Frame/Previewport"]
|
||||
[node name="FrameField" type="Sprite2D" parent="plants/Infobox/FrameAndTitle/VboxContainer/Frame/Previewport"]
|
||||
texture = ExtResource("3_oy57w")
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="plants/Infobox/FrameAndTitle/Frame/Previewport"]
|
||||
[node name="Camera2D" type="Camera2D" parent="plants/Infobox/FrameAndTitle/VboxContainer/Frame/Previewport"]
|
||||
|
||||
[node name="Render" type="TextureRect" parent="plants/Infobox/FrameAndTitle/Frame"]
|
||||
[node name="Render" type="TextureRect" parent="plants/Infobox/FrameAndTitle/VboxContainer/Frame"]
|
||||
show_behind_parent = true
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
|
|
@ -69,6 +76,11 @@ grow_horizontal = 2
|
|||
grow_vertical = 2
|
||||
texture = SubResource("ViewportTexture_ru62c")
|
||||
|
||||
[node name="QuitButton" type="Button" parent="plants/Infobox/FrameAndTitle/VboxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
text = "exit"
|
||||
|
||||
[node name="Label" type="Label" parent="plants/Infobox/FrameAndTitle"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
|
@ -115,27 +127,30 @@ size_flags_horizontal = 3
|
|||
[node name="FrameAndTitle" type="HBoxContainer" parent="zombies/Infobox"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Frame" type="TextureRect" parent="zombies/Infobox/FrameAndTitle"]
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="zombies/Infobox/FrameAndTitle"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Frame" type="TextureRect" parent="zombies/Infobox/FrameAndTitle/VBoxContainer"]
|
||||
clip_contents = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 0
|
||||
texture = ExtResource("1_1hnxi")
|
||||
|
||||
[node name="Previewport" type="SubViewport" parent="zombies/Infobox/FrameAndTitle/Frame" node_paths=PackedStringArray("title", "description")]
|
||||
[node name="Previewport" type="SubViewport" parent="zombies/Infobox/FrameAndTitle/VBoxContainer/Frame" node_paths=PackedStringArray("title", "description")]
|
||||
canvas_item_default_texture_filter = 0
|
||||
size = Vector2i(130, 130)
|
||||
script = ExtResource("2_ru62c")
|
||||
title = NodePath("../../Label")
|
||||
description = NodePath("../../../Description/ScrollContainer/RichTextLabel")
|
||||
title = NodePath("../../../Label")
|
||||
description = NodePath("../../../../Description/ScrollContainer/RichTextLabel")
|
||||
|
||||
[node name="FrameField" type="Sprite2D" parent="zombies/Infobox/FrameAndTitle/Frame/Previewport"]
|
||||
[node name="FrameField" type="Sprite2D" parent="zombies/Infobox/FrameAndTitle/VBoxContainer/Frame/Previewport"]
|
||||
texture = ExtResource("3_oy57w")
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="zombies/Infobox/FrameAndTitle/Frame/Previewport"]
|
||||
[node name="Camera2D" type="Camera2D" parent="zombies/Infobox/FrameAndTitle/VBoxContainer/Frame/Previewport"]
|
||||
position = Vector2(0, -45)
|
||||
|
||||
[node name="Render" type="TextureRect" parent="zombies/Infobox/FrameAndTitle/Frame"]
|
||||
[node name="Render" type="TextureRect" parent="zombies/Infobox/FrameAndTitle/VBoxContainer/Frame"]
|
||||
show_behind_parent = true
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
|
|
@ -146,6 +161,11 @@ grow_vertical = 2
|
|||
texture = SubResource("ViewportTexture_7yl8g")
|
||||
expand_mode = 1
|
||||
|
||||
[node name="QuitButton" type="Button" parent="zombies/Infobox/FrameAndTitle/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
text = "exit"
|
||||
|
||||
[node name="Label" type="Label" parent="zombies/Infobox/FrameAndTitle"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
|
@ -169,3 +189,12 @@ size_flags_vertical = 3
|
|||
theme_override_colors/default_color = Color(0, 0, 0, 1)
|
||||
theme_override_colors/font_selected_color = Color(0, 0, 0, 1)
|
||||
bbcode_enabled = true
|
||||
|
||||
[node name="ChannelPlayer" type="Node" parent="."]
|
||||
script = ExtResource("6_7vo1l")
|
||||
audioStream = ExtResource("7_vvhxq")
|
||||
channel = "button"
|
||||
metadata/_custom_type_script = "uid://c36bj8u7jghc7"
|
||||
|
||||
[connection signal="pressed" from="plants/Infobox/FrameAndTitle/VboxContainer/QuitButton" to="." method="_on_quit_button_pressed"]
|
||||
[connection signal="pressed" from="zombies/Infobox/FrameAndTitle/VBoxContainer/QuitButton" to="." method="_on_quit_button_pressed"]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=16 format=3 uid="uid://dpxxjfd5lv5sv"]
|
||||
[gd_scene load_steps=19 format=3 uid="uid://dpxxjfd5lv5sv"]
|
||||
|
||||
[ext_resource type="Theme" uid="uid://e8n88g31w7x7" path="res://resources/themes/ChooseYourSeeds.tres" id="1_bfo8i"]
|
||||
[ext_resource type="Texture2D" uid="uid://dr8a0rx42o3qy" path="res://assets/sprites/gui/ChooseYourSeeds/PlantFrame.tres" id="2_so2bw"]
|
||||
|
|
@ -7,8 +7,10 @@
|
|||
[ext_resource type="Script" uid="uid://eq3ecja30mlj" path="res://scripts/components/gui/choose_your_seeds/GridLoader.cs" id="4_i7sou"]
|
||||
[ext_resource type="PackedScene" uid="uid://10b1egek6upx" path="res://scenes/gui/level_run_button.tscn" id="5_n80ic"]
|
||||
[ext_resource type="Script" uid="uid://d26waisd3v488" path="res://scripts/components/gui/choose_your_seeds/LevelRunButton.cs" id="7_k6b6g"]
|
||||
[ext_resource type="Texture2D" uid="uid://drydueofrb448" path="res://assets/sprites/gui/almanach/book.tres" id="8_hmdmm"]
|
||||
[ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="8_v7xff"]
|
||||
[ext_resource type="AudioStream" uid="uid://bdx83fokp6kha" path="res://assets/audio/sfx/buttonclick.mp3" id="9_v7xff"]
|
||||
[ext_resource type="PackedScene" uid="uid://bvpt0q4j6nx18" path="res://scenes/gui/almanach.tscn" id="11_nlh6x"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_0rps3"]
|
||||
resource_name = "Hide"
|
||||
|
|
@ -106,6 +108,16 @@ viewport_path = NodePath("Panel/MarginContainer/VBoxContainer/HBoxContainer/Fram
|
|||
font_size = 24
|
||||
font_color = Color(0, 0, 0, 1)
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_hmdmm"]
|
||||
resource_name = "Almanach"
|
||||
script/source = "extends Button
|
||||
|
||||
|
||||
func _pressed() -> void:
|
||||
$\"../../Independer/Almanach\".visible = true
|
||||
$\"../../ChannelPlayer\".call(\"Play\")
|
||||
"
|
||||
|
||||
[node name="ChooseYourSeeds" type="Control"]
|
||||
process_mode = 3
|
||||
layout_mode = 3
|
||||
|
|
@ -222,10 +234,27 @@ offset_bottom = -16.016
|
|||
script = ExtResource("7_k6b6g")
|
||||
_player = NodePath("../../AnimationPlayer")
|
||||
|
||||
[node name="AlmanachButton" type="Button" parent="Panel"]
|
||||
layout_mode = 0
|
||||
anchor_left = 1.0
|
||||
anchor_top = 0.883929
|
||||
anchor_right = 1.14167
|
||||
anchor_bottom = 1.0
|
||||
offset_bottom = -3.05176e-05
|
||||
icon = ExtResource("8_hmdmm")
|
||||
icon_alignment = 1
|
||||
script = SubResource("GDScript_hmdmm")
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="ChannelPlayer" type="Node" parent="."]
|
||||
script = ExtResource("8_v7xff")
|
||||
audioStream = ExtResource("9_v7xff")
|
||||
channel = "button"
|
||||
metadata/_custom_type_script = "uid://c36bj8u7jghc7"
|
||||
|
||||
[node name="Independer" type="Node" parent="."]
|
||||
|
||||
[node name="Almanach" parent="Independer" instance=ExtResource("11_nlh6x")]
|
||||
visible = false
|
||||
|
||||
[connection signal="pressed" from="Panel/LevelRunButton" to="ChannelPlayer" method="Play"]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=14 format=3 uid="uid://bfstrli64u23y"]
|
||||
[gd_scene load_steps=16 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"]
|
||||
|
|
@ -8,8 +8,10 @@
|
|||
[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="Texture2D" uid="uid://drydueofrb448" path="res://assets/sprites/gui/almanach/book.tres" id="7_flqon"]
|
||||
[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"]
|
||||
[ext_resource type="PackedScene" uid="uid://bvpt0q4j6nx18" path="res://scenes/gui/almanach.tscn" id="12_rcqid"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_5dd4i"]
|
||||
resource_name = "main_menu"
|
||||
|
|
@ -135,10 +137,15 @@ offset_top = 188.0
|
|||
offset_right = 86.0
|
||||
offset_bottom = 235.0
|
||||
|
||||
[node name="Button" type="Button" parent="Buttons/InfoButtons"]
|
||||
[node name="AboutButton" type="Button" parent="Buttons/InfoButtons"]
|
||||
layout_mode = 2
|
||||
text = "about"
|
||||
|
||||
[node name="AlmanachButton" type="Button" parent="Buttons/InfoButtons"]
|
||||
layout_mode = 2
|
||||
icon = ExtResource("7_flqon")
|
||||
icon_alignment = 1
|
||||
|
||||
[node name="SACRIFICE" type="TextureButton" parent="Buttons"]
|
||||
layout_mode = 0
|
||||
offset_left = 338.0
|
||||
|
|
@ -167,9 +174,14 @@ volume_db = -20.0
|
|||
autoplay = true
|
||||
bus = &"MusicBus"
|
||||
|
||||
[node name="Almanach" parent="." instance=ExtResource("12_rcqid")]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
|
||||
[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="pressed" from="Buttons/InfoButtons/AboutButton" to="Buttons" method="_on_button_pressed"]
|
||||
[connection signal="pressed" from="Buttons/InfoButtons/AlmanachButton" to="Buttons" method="_on_almanach_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"]
|
||||
|
|
|
|||
|
|
@ -14,3 +14,8 @@ func _on_exit_button_pressed() -> void:
|
|||
func _on_button_pressed() -> void:
|
||||
$"../AboutWindow".popup_centered()
|
||||
$ChannelPlayer.call("Play")
|
||||
|
||||
|
||||
func _on_almanach_button_pressed() -> void:
|
||||
$"../Almanach".visible = true
|
||||
$ChannelPlayer.call("Play")
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue