Save/Load System done
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://dy40jygog8t3k"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://dy40jygog8t3k"]
|
||||
|
||||
[ext_resource type="Script" path="res://ui.gd" id="1_mg12k"]
|
||||
[ext_resource type="FontFile" uid="uid://ckg5x0oonnjtn" path="res://Art/XanhMono-Regular.ttf" id="2_cohu5"]
|
||||
@@ -10,15 +10,8 @@ border_width_top = 2
|
||||
border_width_right = 2
|
||||
border_width_bottom = 2
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0joc6"]
|
||||
border_width_left = 2
|
||||
border_width_top = 2
|
||||
border_width_right = 2
|
||||
border_width_bottom = 2
|
||||
border_color = Color(0.629675, 0.629675, 0.629674, 1)
|
||||
|
||||
[node name="UILayer" type="CanvasLayer"]
|
||||
layer = 128
|
||||
layer = 127
|
||||
script = ExtResource("1_mg12k")
|
||||
|
||||
[node name="UI" type="Control" parent="."]
|
||||
@@ -32,6 +25,7 @@ grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="Menu" type="PanelContainer" parent="UI"]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
@@ -52,20 +46,20 @@ color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="UI/Menu"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 40
|
||||
theme_override_constants/margin_top = 40
|
||||
theme_override_constants/margin_right = 40
|
||||
theme_override_constants/margin_bottom = 40
|
||||
theme_override_constants/margin_left = 25
|
||||
theme_override_constants/margin_top = 25
|
||||
theme_override_constants/margin_right = 25
|
||||
theme_override_constants/margin_bottom = 25
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="UI/Menu/MarginContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Continue" type="Button" parent="UI/Menu/MarginContainer/VBoxContainer"]
|
||||
[node name="Resume" type="Button" parent="UI/Menu/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_fonts/font = ExtResource("2_cohu5")
|
||||
theme_override_font_sizes/font_size = 27
|
||||
text = "CONTINUE"
|
||||
text = "RESUME"
|
||||
|
||||
[node name="Save" type="Button" parent="UI/Menu/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
@@ -81,12 +75,12 @@ theme_override_fonts/font = ExtResource("2_cohu5")
|
||||
theme_override_font_sizes/font_size = 27
|
||||
text = "LOAD"
|
||||
|
||||
[node name="Options" type="Button" parent="UI/Menu/MarginContainer/VBoxContainer"]
|
||||
[node name="Settings" type="Button" parent="UI/Menu/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_fonts/font = ExtResource("2_cohu5")
|
||||
theme_override_font_sizes/font_size = 27
|
||||
text = "OPTIONS"
|
||||
text = "SETTINGS"
|
||||
|
||||
[node name="MainMenu" type="Button" parent="UI/Menu/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
@@ -95,14 +89,14 @@ theme_override_fonts/font = ExtResource("2_cohu5")
|
||||
theme_override_font_sizes/font_size = 27
|
||||
text = "MAIN MENU"
|
||||
|
||||
[node name="Exit" type="Button" parent="UI/Menu/MarginContainer/VBoxContainer"]
|
||||
[node name="Quit" type="Button" parent="UI/Menu/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_fonts/font = ExtResource("2_cohu5")
|
||||
theme_override_font_sizes/font_size = 27
|
||||
text = "EXIT GAME"
|
||||
text = "QUIT GAME"
|
||||
|
||||
[node name="ConfirmationDialog" type="PanelContainer" parent="UI"]
|
||||
[node name="Save" type="PanelContainer" parent="UI"]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
@@ -111,58 +105,272 @@ anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -200.0
|
||||
offset_top = -75.0
|
||||
offset_right = 300.0
|
||||
offset_bottom = 85.0
|
||||
offset_top = -300.0
|
||||
offset_right = 200.0
|
||||
offset_bottom = 300.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_0joc6")
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_fo2i3")
|
||||
|
||||
[node name="Background" type="ColorRect" parent="UI/ConfirmationDialog"]
|
||||
[node name="Background" type="ColorRect" parent="UI/Save"]
|
||||
layout_mode = 2
|
||||
color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="UI/ConfirmationDialog"]
|
||||
[node name="MarginContainer" type="MarginContainer" parent="UI/Save"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 10
|
||||
theme_override_constants/margin_top = 20
|
||||
theme_override_constants/margin_right = 10
|
||||
theme_override_constants/margin_bottom = 10
|
||||
theme_override_constants/margin_left = 25
|
||||
theme_override_constants/margin_top = 10
|
||||
theme_override_constants/margin_right = 25
|
||||
theme_override_constants/margin_bottom = 0
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="UI/ConfirmationDialog/MarginContainer"]
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="UI/Save/MarginContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ConfirmationText" type="RichTextLabel" parent="UI/ConfirmationDialog/MarginContainer/VBoxContainer"]
|
||||
[node name="RichTextLabel" type="RichTextLabel" parent="UI/Save/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
size_flags_stretch_ratio = 3.0
|
||||
theme_override_fonts/normal_font = ExtResource("2_cohu5")
|
||||
theme_override_font_sizes/normal_font_size = 25
|
||||
theme_override_font_sizes/normal_font_size = 30
|
||||
bbcode_enabled = true
|
||||
text = "
|
||||
[center]SAVE GAME[/center]"
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="UI/ConfirmationDialog/MarginContainer/VBoxContainer"]
|
||||
[node name="SaveSlot1" type="Button" parent="UI/Save/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_constants/margin_left = 70
|
||||
theme_override_constants/margin_right = 70
|
||||
theme_override_fonts/font = ExtResource("2_cohu5")
|
||||
theme_override_font_sizes/font_size = 27
|
||||
text = "EMPTY"
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="UI/ConfirmationDialog/MarginContainer/VBoxContainer/MarginContainer"]
|
||||
[node name="SaveSlot2" type="Button" parent="UI/Save/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 70
|
||||
size_flags_vertical = 3
|
||||
theme_override_fonts/font = ExtResource("2_cohu5")
|
||||
theme_override_font_sizes/font_size = 27
|
||||
text = "EMPTY"
|
||||
|
||||
[node name="YesButton" type="Button" parent="UI/ConfirmationDialog/MarginContainer/VBoxContainer/MarginContainer/HBoxContainer"]
|
||||
[node name="SaveSlot3" type="Button" parent="UI/Save/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
theme_override_fonts/font = ExtResource("2_cohu5")
|
||||
theme_override_font_sizes/font_size = 27
|
||||
text = "EMPTY"
|
||||
|
||||
[node name="SaveSlot4" type="Button" parent="UI/Save/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_fonts/font = ExtResource("2_cohu5")
|
||||
theme_override_font_sizes/font_size = 27
|
||||
text = "EMPTY"
|
||||
|
||||
[node name="Back" type="Button" parent="UI/Save/MarginContainer/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(80, 40)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 6
|
||||
theme_override_fonts/font = ExtResource("2_cohu5")
|
||||
theme_override_font_sizes/font_size = 20
|
||||
text = "YES"
|
||||
text = "BACK"
|
||||
|
||||
[node name="NoButton" type="Button" parent="UI/ConfirmationDialog/MarginContainer/VBoxContainer/MarginContainer/HBoxContainer"]
|
||||
[node name="Load" type="PanelContainer" parent="UI"]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -200.0
|
||||
offset_top = -300.0
|
||||
offset_right = 200.0
|
||||
offset_bottom = 300.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_fo2i3")
|
||||
|
||||
[node name="Background" type="ColorRect" parent="UI/Load"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="UI/Load"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 25
|
||||
theme_override_constants/margin_top = 10
|
||||
theme_override_constants/margin_right = 25
|
||||
theme_override_constants/margin_bottom = 0
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="UI/Load/MarginContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="RichTextLabel" type="RichTextLabel" parent="UI/Load/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_fonts/normal_font = ExtResource("2_cohu5")
|
||||
theme_override_font_sizes/normal_font_size = 30
|
||||
bbcode_enabled = true
|
||||
text = "
|
||||
[center]LOAD GAME[/center]"
|
||||
|
||||
[node name="LoadSlot1" type="Button" parent="UI/Load/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_fonts/font = ExtResource("2_cohu5")
|
||||
theme_override_font_sizes/font_size = 27
|
||||
text = "EMPTY"
|
||||
|
||||
[node name="LoadSlot2" type="Button" parent="UI/Load/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_fonts/font = ExtResource("2_cohu5")
|
||||
theme_override_font_sizes/font_size = 27
|
||||
text = "EMPTY"
|
||||
|
||||
[node name="LoadSlot3" type="Button" parent="UI/Load/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_fonts/font = ExtResource("2_cohu5")
|
||||
theme_override_font_sizes/font_size = 27
|
||||
text = "EMPTY"
|
||||
|
||||
[node name="LoadSlot4" type="Button" parent="UI/Load/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_fonts/font = ExtResource("2_cohu5")
|
||||
theme_override_font_sizes/font_size = 27
|
||||
text = "EMPTY"
|
||||
|
||||
[node name="Back" type="Button" parent="UI/Load/MarginContainer/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(80, 40)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 6
|
||||
theme_override_fonts/font = ExtResource("2_cohu5")
|
||||
theme_override_font_sizes/font_size = 20
|
||||
text = "NO"
|
||||
text = "BACK"
|
||||
|
||||
[node name="LoadTitle" type="PanelContainer" parent="UI"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -200.0
|
||||
offset_top = -300.0
|
||||
offset_right = 200.0
|
||||
offset_bottom = 300.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_fo2i3")
|
||||
|
||||
[node name="Background" type="ColorRect" parent="UI/LoadTitle"]
|
||||
layout_mode = 2
|
||||
color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="UI/LoadTitle"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 25
|
||||
theme_override_constants/margin_top = 10
|
||||
theme_override_constants/margin_right = 25
|
||||
theme_override_constants/margin_bottom = 0
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="UI/LoadTitle/MarginContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="RichTextLabel" type="RichTextLabel" parent="UI/LoadTitle/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_fonts/normal_font = ExtResource("2_cohu5")
|
||||
theme_override_font_sizes/normal_font_size = 30
|
||||
bbcode_enabled = true
|
||||
text = "
|
||||
[center]LOAD GAME[/center]"
|
||||
|
||||
[node name="LoadSlot1" type="Button" parent="UI/LoadTitle/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_fonts/font = ExtResource("2_cohu5")
|
||||
theme_override_font_sizes/font_size = 27
|
||||
text = "EMPTY"
|
||||
|
||||
[node name="LoadSlot2" type="Button" parent="UI/LoadTitle/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_fonts/font = ExtResource("2_cohu5")
|
||||
theme_override_font_sizes/font_size = 27
|
||||
text = "EMPTY"
|
||||
|
||||
[node name="LoadSlot3" type="Button" parent="UI/LoadTitle/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_fonts/font = ExtResource("2_cohu5")
|
||||
theme_override_font_sizes/font_size = 27
|
||||
text = "EMPTY"
|
||||
|
||||
[node name="LoadSlot4" type="Button" parent="UI/LoadTitle/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_fonts/font = ExtResource("2_cohu5")
|
||||
theme_override_font_sizes/font_size = 27
|
||||
text = "EMPTY"
|
||||
|
||||
[node name="Back" type="Button" parent="UI/LoadTitle/MarginContainer/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(80, 40)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 6
|
||||
theme_override_fonts/font = ExtResource("2_cohu5")
|
||||
theme_override_font_sizes/font_size = 20
|
||||
text = "BACK"
|
||||
|
||||
[node name="Settings" type="PanelContainer" parent="UI"]
|
||||
visible = false
|
||||
custom_minimum_size = Vector2(800, 800)
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -200.0
|
||||
offset_top = -300.0
|
||||
offset_right = 200.0
|
||||
offset_bottom = 300.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_fo2i3")
|
||||
|
||||
[node name="Background" type="ColorRect" parent="UI/Settings"]
|
||||
layout_mode = 2
|
||||
color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="UI/Settings"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 25
|
||||
theme_override_constants/margin_top = 10
|
||||
theme_override_constants/margin_right = 25
|
||||
theme_override_constants/margin_bottom = 0
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="UI/Settings/MarginContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="RichTextLabel" type="RichTextLabel" parent="UI/Settings/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_fonts/normal_font = ExtResource("2_cohu5")
|
||||
theme_override_font_sizes/normal_font_size = 30
|
||||
bbcode_enabled = true
|
||||
text = "
|
||||
[center]SETTINGS[/center]"
|
||||
|
||||
[node name="Back" type="Button" parent="UI/Settings/MarginContainer/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(80, 40)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 6
|
||||
theme_override_fonts/font = ExtResource("2_cohu5")
|
||||
theme_override_font_sizes/font_size = 20
|
||||
text = "BACK"
|
||||
|
||||
[node name="UpperContainer" type="HBoxContainer" parent="UI"]
|
||||
visible = false
|
||||
@@ -191,3 +399,12 @@ layout_mode = 2
|
||||
theme_override_fonts/font = ExtResource("3_e3v1e")
|
||||
theme_override_font_sizes/font_size = 20
|
||||
text = " Press Space to Next "
|
||||
|
||||
[node name="ConfirmationMask" type="ColorRect" parent="."]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_force_pass_scroll_events = false
|
||||
color = Color(0, 0, 0, 0.470588)
|
||||
|
||||
Reference in New Issue
Block a user