Groundwork for adding game settings

This commit is contained in:
Rain Clark 2022-04-25 18:59:36 -04:00
parent db7788fac2
commit 183f7f16f3
3 changed files with 55 additions and 6 deletions

View File

@ -52,17 +52,25 @@ alignment = 1
[node name="PlayButton" parent="MenuButtons" instance=ExtResource( 5 )]
margin_right = 171.0
margin_bottom = 47.0
focus_next = NodePath("../QuitButton")
margin_bottom = 40.0
focus_next = NodePath("../SettingsButton")
focus_previous = NodePath("../QuitButton")
size_flags_vertical = 3
text = "Play"
next_scene_path = "res://src/Screens/Game.tscn"
[node name="QuitButton" parent="MenuButtons" instance=ExtResource( 4 )]
margin_top = 51.0
[node name="SettingsButton" parent="MenuButtons" instance=ExtResource( 5 )]
margin_top = 44.0
margin_right = 171.0
margin_bottom = 99.0
focus_next = NodePath("../PlayButton")
margin_bottom = 84.0
focus_next = NodePath("../QuitButton")
focus_previous = NodePath("../PlayButton")
text = "Settings"
[node name="QuitButton" parent="MenuButtons" instance=ExtResource( 4 )]
margin_top = 88.0
margin_right = 171.0
margin_bottom = 128.0
focus_next = NodePath("../PlayButton")
focus_previous = NodePath("../SettingsButton")
size_flags_vertical = 3

View File

@ -0,0 +1,9 @@
extends Control
# TODO: Add GFX settings (resolution, fullscreen, effects & vsync)
# TODO: Add Audio settings (Master Volume, since only 2 SFX)
# TODO: Make them presist between launchs
func _ready() -> void:
pass

View File

@ -0,0 +1,32 @@
[gd_scene load_steps=7 format=2]
[ext_resource path="res://assets/Background.png" type="Texture" id=1]
[ext_resource path="res://assets-raw/BBB_Simulator_Black.otf" type="DynamicFontData" id=2]
[ext_resource path="res://src/UI/Title.tscn" type="PackedScene" id=3]
[ext_resource path="res://src/Screens/SettingsMenu.gd" type="Script" id=4]
[sub_resource type="DynamicFont" id=1]
font_data = ExtResource( 2 )
[sub_resource type="Theme" id=2]
default_font = SubResource( 1 )
[node name="SettingsMenu" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( 4 )
[node name="Background" type="TextureRect" parent="."]
modulate = Color( 0, 0, 0, 1 )
margin_right = 40.0
margin_bottom = 40.0
theme = SubResource( 2 )
texture = ExtResource( 1 )
[node name="Title" parent="." instance=ExtResource( 3 )]
anchor_left = 0.5
anchor_right = 0.5
margin_left = -150.5
margin_right = 150.5
margin_bottom = 67.0
text = "Settings"