implement level menu

This commit is contained in:
Fabio 2024-08-17 18:06:43 +02:00
parent b275630598
commit 6831dd3a3f
8 changed files with 185 additions and 5 deletions

View file

@ -0,0 +1,37 @@
[gd_scene load_steps=5 format=3 uid="uid://t83eid7pf4iv"]
[ext_resource type="Texture2D" uid="uid://yg2u8vwwbpv1" path="res://textures/File-Icon.png" id="1_2sfn6"]
[ext_resource type="Texture2D" uid="uid://bc2ictes4mln1" path="res://textures/File-Icon-Closed.png" id="2_6ev1f"]
[ext_resource type="FontFile" uid="uid://d3pbvdemdbxes" path="res://CommodoreSixtyFour.ttf" id="3_732s0"]
[ext_resource type="Script" path="res://scripts/level_menu_level_button.gd" id="3_t0h1w"]
[node name="LevelButton" type="TextureButton"]
custom_minimum_size = Vector2(50, 50)
offset_right = 40.0
offset_bottom = 40.0
size_flags_horizontal = 3
size_flags_vertical = 3
disabled = true
texture_normal = ExtResource("1_2sfn6")
texture_disabled = ExtResource("2_6ev1f")
ignore_texture_size = true
stretch_mode = 5
script = ExtResource("3_t0h1w")
[node name="Label" type="Label" parent="."]
visible = false
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 3
theme_override_fonts/font = ExtResource("3_732s0")
theme_override_font_sizes/font_size = 35
text = "1"
horizontal_alignment = 1
vertical_alignment = 1
[connection signal="pressed" from="." to="." method="_on_pressed"]

View file

@ -0,0 +1,86 @@
[gd_scene load_steps=5 format=3 uid="uid://bvvxwhg4tihng"]
[ext_resource type="Theme" uid="uid://cohbys634cf18" path="res://menu/main_menu/MainMenuTheme.tres" id="1_3v0vu"]
[ext_resource type="Texture2D" uid="uid://dr4ayedb5xb2k" path="res://textures/file_editor.png" id="1_44xee"]
[ext_resource type="Script" path="res://scripts/level_select.gd" id="2_nurro"]
[ext_resource type="PackedScene" uid="uid://t83eid7pf4iv" path="res://menu/level_menu/level_button.tscn" id="4_0d7hu"]
[node name="LevelSelect" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("1_3v0vu")
script = ExtResource("2_nurro")
[node name="Background" type="TextureRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("1_44xee")
expand_mode = 1
[node name="Label" type="Label" parent="Background"]
layout_mode = 0
offset_left = 30.0
offset_top = -8.0
offset_right = 272.0
offset_bottom = 42.0
theme_override_font_sizes/font_size = 45
text = "level select"
horizontal_alignment = 1
vertical_alignment = 1
[node name="QuitButton" type="Button" parent="Background"]
layout_mode = 0
offset_left = 1232.0
offset_top = 2.0
offset_right = 1270.0
offset_bottom = 40.0
flat = true
[node name="ClipControl" type="Control" parent="Background"]
layout_mode = 1
anchor_left = 0.005
anchor_top = 0.11
anchor_right = 0.956
anchor_bottom = 0.924
offset_left = 0.599999
offset_top = -0.200005
offset_right = 0.319946
offset_bottom = -0.280029
[node name="GridContainer" type="GridContainer" parent="Background/ClipControl"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
columns = 3
[node name="LevelButton" parent="Background/ClipControl/GridContainer" instance=ExtResource("4_0d7hu")]
layout_mode = 2
[node name="LevelButton2" parent="Background/ClipControl/GridContainer" instance=ExtResource("4_0d7hu")]
layout_mode = 2
[node name="LevelButton3" parent="Background/ClipControl/GridContainer" instance=ExtResource("4_0d7hu")]
layout_mode = 2
[node name="LevelButton4" parent="Background/ClipControl/GridContainer" instance=ExtResource("4_0d7hu")]
layout_mode = 2
level_num = 2
[node name="LevelButton5" parent="Background/ClipControl/GridContainer" instance=ExtResource("4_0d7hu")]
layout_mode = 2
[node name="LevelButton6" parent="Background/ClipControl/GridContainer" instance=ExtResource("4_0d7hu")]
layout_mode = 2
[connection signal="pressed" from="Background/QuitButton" to="." method="_on_quit_button_pressed"]