Settings Menu basic layout

This commit is contained in:
2025-01-15 14:35:52 +01:00
parent f07b3827b6
commit 77af2b8e9f
5 changed files with 325 additions and 6 deletions

View File

@ -0,0 +1,55 @@
[gd_scene load_steps=5 format=3 uid="uid://bd2tk3epl8hbw"]
[ext_resource type="FontFile" uid="uid://c3jp6yk6l8gei" path="res://Main_menu/KnightWarrior-w16n8.otf" id="1_62i2n"]
[ext_resource type="Script" path="res://Settings_menu/settings_menu.gd" id="1_p1tcl"]
[ext_resource type="PackedScene" uid="uid://b55g5fki74hey" path="res://Settings_menu/settings_tab_container.tscn" id="3_jn3pd"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ag8kh"]
bg_color = Color(0.6, 0.6, 0.6, 0)
shadow_color = Color(0, 0, 0, 1)
[node name="Settings_Menu" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_p1tcl")
[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 12
theme_override_constants/margin_top = 12
theme_override_constants/margin_right = 12
theme_override_constants/margin_bottom = 12
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
layout_mode = 2
[node name="Label-title" type="Label" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
theme_override_constants/line_spacing = 15
theme_override_constants/shadow_offset_x = 15
theme_override_constants/shadow_offset_y = 20
theme_override_constants/outline_size = 24
theme_override_fonts/font = ExtResource("1_62i2n")
theme_override_font_sizes/font_size = 32
theme_override_styles/normal = SubResource("StyleBoxFlat_ag8kh")
text = "Settings"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Control" parent="MarginContainer/VBoxContainer" instance=ExtResource("3_jn3pd")]
layout_mode = 2
size_flags_vertical = 3
[node name="Exit_Button" type="Button" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 8
text = "Exit"

View File

@ -0,0 +1,13 @@
extends Control
@onready var exit_button: Button = $MarginContainer/VBoxContainer/Exit_Button
signal exit_options_menu
func _ready():
exit_button.button_down.connect(on_exit_pressed)
set_process(false)
func on_exit_pressed() -> void:
exit_options_menu.emit()
set_process(false)

View File

@ -0,0 +1,230 @@
[gd_scene format=3 uid="uid://b55g5fki74hey"]
[node name="Control" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="TabContainer" type="TabContainer" parent="."]
layout_mode = 1
anchors_preset = -1
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 100.0
offset_top = 50.0
offset_right = -100.0
offset_bottom = -50.0
grow_horizontal = 2
grow_vertical = 2
tab_alignment = 1
current_tab = 0
[node name="Sound" type="TabBar" parent="TabContainer"]
layout_mode = 2
metadata/_tab_index = 0
[node name="MarginContainer" type="MarginContainer" parent="TabContainer/Sound"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 24
theme_override_constants/margin_top = 24
theme_override_constants/margin_right = 24
theme_override_constants/margin_bottom = 24
[node name="VBoxContainer" type="VBoxContainer" parent="TabContainer/Sound/MarginContainer"]
layout_mode = 2
theme_override_constants/separation = 64
alignment = 1
[node name="Label4" type="Label" parent="TabContainer/Sound/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "First
"
horizontal_alignment = 1
[node name="Label5" type="Label" parent="TabContainer/Sound/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "First
"
horizontal_alignment = 1
[node name="Label3" type="Label" parent="TabContainer/Sound/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "First
"
horizontal_alignment = 1
[node name="Label2" type="Label" parent="TabContainer/Sound/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "First
"
horizontal_alignment = 1
[node name="Label" type="Label" parent="TabContainer/Sound/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "First
"
horizontal_alignment = 1
[node name="Graphics" type="TabBar" parent="TabContainer"]
visible = false
layout_mode = 2
metadata/_tab_index = 1
[node name="MarginContainer" type="MarginContainer" parent="TabContainer/Graphics"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 24
theme_override_constants/margin_top = 24
theme_override_constants/margin_right = 24
theme_override_constants/margin_bottom = 24
[node name="VBoxContainer" type="VBoxContainer" parent="TabContainer/Graphics/MarginContainer"]
layout_mode = 2
theme_override_constants/separation = 64
alignment = 1
[node name="Label4" type="Label" parent="TabContainer/Graphics/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "Second
"
horizontal_alignment = 1
[node name="Label5" type="Label" parent="TabContainer/Graphics/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "Second
"
horizontal_alignment = 1
[node name="Label6" type="Label" parent="TabContainer/Graphics/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "Second
"
horizontal_alignment = 1
[node name="Label7" type="Label" parent="TabContainer/Graphics/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "Second
"
horizontal_alignment = 1
[node name="Label8" type="Label" parent="TabContainer/Graphics/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "Second
"
horizontal_alignment = 1
[node name="Controls" type="TabBar" parent="TabContainer"]
visible = false
layout_mode = 2
metadata/_tab_index = 2
[node name="MarginContainer" type="MarginContainer" parent="TabContainer/Controls"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 24
theme_override_constants/margin_top = 24
theme_override_constants/margin_right = 24
theme_override_constants/margin_bottom = 24
[node name="VBoxContainer" type="VBoxContainer" parent="TabContainer/Controls/MarginContainer"]
layout_mode = 2
theme_override_constants/separation = 64
alignment = 1
[node name="Label" type="Label" parent="TabContainer/Controls/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "third
"
horizontal_alignment = 1
[node name="Label2" type="Label" parent="TabContainer/Controls/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "third
"
horizontal_alignment = 1
[node name="Label3" type="Label" parent="TabContainer/Controls/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "third
"
horizontal_alignment = 1
[node name="Label4" type="Label" parent="TabContainer/Controls/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "third
"
horizontal_alignment = 1
[node name="Label5" type="Label" parent="TabContainer/Controls/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "third
"
horizontal_alignment = 1
[node name="Accesibility" type="TabBar" parent="TabContainer"]
visible = false
layout_mode = 2
metadata/_tab_index = 3
[node name="MarginContainer" type="MarginContainer" parent="TabContainer/Accesibility"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 24
theme_override_constants/margin_top = 24
theme_override_constants/margin_right = 24
theme_override_constants/margin_bottom = 24
[node name="VBoxContainer" type="VBoxContainer" parent="TabContainer/Accesibility/MarginContainer"]
layout_mode = 2
theme_override_constants/separation = 64
alignment = 1
[node name="Label4" type="Label" parent="TabContainer/Accesibility/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "First
"
horizontal_alignment = 1
[node name="Label5" type="Label" parent="TabContainer/Accesibility/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "First
"
horizontal_alignment = 1
[node name="Label3" type="Label" parent="TabContainer/Accesibility/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "First
"
horizontal_alignment = 1
[node name="Label2" type="Label" parent="TabContainer/Accesibility/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "First
"
horizontal_alignment = 1
[node name="Label" type="Label" parent="TabContainer/Accesibility/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "First
"
horizontal_alignment = 1