Start cleaning up some UI, specifically Options menu. Use anchors to correctly position options after resizing window

This commit is contained in:
2026-06-09 00:44:19 -07:00
parent 31fcb275f5
commit 714d3a771c
5 changed files with 221 additions and 117 deletions
@@ -21,7 +21,4 @@ public partial class OptionsData : Node
[Save("ScreenResolution")] [Save("ScreenResolution")]
public required int ScreenResolution { get; set; } public required int ScreenResolution { get; set; }
[Save("SkipCutscene")]
public required bool SkipCutscene { get; set; }
} }
@@ -23,7 +23,6 @@ public partial class OptionsMenu : Control
[Node] public InputMapper Controller { get; set; } [Node] public InputMapper Controller { get; set; }
[Node] public CheckBox SkipOpeningCSCheck { get; set; }
[Node] public Button DeleteSaveButton { get; set; } [Node] public Button DeleteSaveButton { get; set; }
[Node] public Control ConfirmDeletePopup { get; set; } [Node] public Control ConfirmDeletePopup { get; set; }
@@ -78,10 +77,8 @@ public partial class OptionsMenu : Control
SFXVolumeLevel = SFXVolumeSlider.Value, SFXVolumeLevel = SFXVolumeSlider.Value,
AudioDeviceName = "Default", AudioDeviceName = "Default",
ScreenResolution = ResolutionOptions.GetSelectedId(), ScreenResolution = ResolutionOptions.GetSelectedId(),
SkipCutscene = SkipOpeningCSCheck.ButtonPressed
}; };
SkipOpeningCSCheck.Pressed += SkipOpeningCS_Pressed;
DeleteSaveButton.Pressed += DeleteSaveButton_Pressed; DeleteSaveButton.Pressed += DeleteSaveButton_Pressed;
YesDeleteButton.Pressed += YesDeleteButton_Pressed; YesDeleteButton.Pressed += YesDeleteButton_Pressed;
@@ -185,7 +182,6 @@ public partial class OptionsMenu : Control
SoundDeviceOptions.Select(selectedDeviceIndex); SoundDeviceOptions.Select(selectedDeviceIndex);
} }
SkipOpeningCSCheck.ButtonPressed = optionsData.SkipCutscene;
DisplayServer.WindowSetMode(_windowModes[optionsData.ScreenResolution]); DisplayServer.WindowSetMode(_windowModes[optionsData.ScreenResolution]);
} }
@@ -217,8 +213,6 @@ public partial class OptionsMenu : Control
SoundDeviceOptions.Select(selectedItem); SoundDeviceOptions.Select(selectedItem);
} }
private void SkipOpeningCS_Pressed() => OptionsData.SkipCutscene = SkipOpeningCSCheck.ButtonPressed;
private void NoDeleteButton_Pressed() private void NoDeleteButton_Pressed()
{ {
ReleaseFocus(); ReleaseFocus();
+104 -104
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=21 format=3 uid="uid://drkl3btdy6uxj"] [gd_scene load_steps=20 format=3 uid="uid://drkl3btdy6uxj"]
[ext_resource type="Script" uid="uid://cjxmdvhixcj6e" path="res://src/options/OptionsMenu.cs" id="1_jli36"] [ext_resource type="Script" uid="uid://cjxmdvhixcj6e" path="res://src/options/OptionsMenu.cs" id="1_jli36"]
[ext_resource type="Shortcut" uid="uid://dumkrjur22k2a" path="res://src/ui/ButtonShortcut.tres" id="2_1egkf"] [ext_resource type="Shortcut" uid="uid://dumkrjur22k2a" path="res://src/ui/ButtonShortcut.tres" id="2_1egkf"]
@@ -7,8 +7,6 @@
[ext_resource type="LabelSettings" uid="uid://cuuo43x72xcsc" path="res://src/ui/label_settings/MainTextBold.tres" id="2_o7aaw"] [ext_resource type="LabelSettings" uid="uid://cuuo43x72xcsc" path="res://src/ui/label_settings/MainTextBold.tres" id="2_o7aaw"]
[ext_resource type="FontFile" uid="uid://cke424xtk2s0o" path="res://src/ui/fonts/ebrima.ttf" id="2_ohii5"] [ext_resource type="FontFile" uid="uid://cke424xtk2s0o" path="res://src/ui/fonts/ebrima.ttf" id="2_ohii5"]
[ext_resource type="LabelSettings" uid="uid://b6f8ggy3ulonb" path="res://src/ui/label_settings/GeorgiaItalic.tres" id="5_1mx8s"] [ext_resource type="LabelSettings" uid="uid://b6f8ggy3ulonb" path="res://src/ui/label_settings/GeorgiaItalic.tres" id="5_1mx8s"]
[ext_resource type="Texture2D" uid="uid://u255bg4nytuf" path="res://src/ui/gallery/checkbox.png" id="5_wn77p"]
[ext_resource type="Texture2D" uid="uid://2fwkphkxib7p" path="res://src/ui/gallery/Unchecked.png" id="6_ko1q6"]
[ext_resource type="StyleBox" uid="uid://bxuy4tnftibfq" path="res://src/options/SelectedOptionsBox.tres" id="9_lx8gn"] [ext_resource type="StyleBox" uid="uid://bxuy4tnftibfq" path="res://src/options/SelectedOptionsBox.tres" id="9_lx8gn"]
[ext_resource type="StyleBox" uid="uid://bl15q835s4ene" path="res://src/options/UnselectedOptionsBox.tres" id="10_qvpxc"] [ext_resource type="StyleBox" uid="uid://bl15q835s4ene" path="res://src/options/UnselectedOptionsBox.tres" id="10_qvpxc"]
[ext_resource type="Script" uid="uid://c6lw5yp8p0wb5" path="res://src/options/InputMapper.cs" id="12_776se"] [ext_resource type="Script" uid="uid://c6lw5yp8p0wb5" path="res://src/options/InputMapper.cs" id="12_776se"]
@@ -34,6 +32,8 @@ bg_color = Color(0.215686, 0.215686, 0.215686, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_1egkf"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_1egkf"]
bg_color = Color(2.5028e-06, 0.712708, 0.445629, 1) bg_color = Color(2.5028e-06, 0.712708, 0.445629, 1)
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ko1q6"]
[node name="OptionsMenu" type="Control"] [node name="OptionsMenu" type="Control"]
layout_mode = 3 layout_mode = 3
anchors_preset = 15 anchors_preset = 15
@@ -59,55 +59,50 @@ expand_mode = 1
[node name="Game" type="VBoxContainer" parent="."] [node name="Game" type="VBoxContainer" parent="."]
unique_name_in_owner = true unique_name_in_owner = true
visible = false visible = false
layout_mode = 2 layout_mode = 1
anchor_right = 1.0 anchors_preset = -1
anchor_bottom = 1.0 anchor_left = 0.253
offset_left = 487.0 anchor_top = 0.248
offset_top = 270.0 anchor_right = 0.917
offset_right = -161.0 anchor_bottom = 0.911
offset_bottom = -97.0 grow_horizontal = 2
grow_vertical = 2
size_flags_vertical = 3 size_flags_vertical = 3
focus_next = NodePath("../Audio") focus_next = NodePath("../Audio")
focus_previous = NodePath(".") focus_previous = NodePath(".")
[node name="MarginContainer" type="MarginContainer" parent="Game"] [node name="MarginContainer" type="MarginContainer" parent="Game"]
layout_mode = 2 layout_mode = 2
theme_override_constants/margin_left = 50 theme_override_constants/margin_left = 20
theme_override_constants/margin_top = 100 theme_override_constants/margin_top = 20
theme_override_constants/margin_bottom = 0
[node name="VBoxContainer" type="VBoxContainer" parent="Game/MarginContainer"] [node name="VBoxContainer" type="VBoxContainer" parent="Game/MarginContainer"]
layout_mode = 2 layout_mode = 2
theme_override_constants/separation = 20 theme_override_constants/separation = 20
[node name="HBoxContainer" type="HBoxContainer" parent="Game/MarginContainer/VBoxContainer"] [node name="Screen Mode" type="HBoxContainer" parent="Game/MarginContainer/VBoxContainer"]
layout_mode = 2 layout_mode = 2
[node name="SkipOpeningCSCheck" type="CheckBox" parent="Game/MarginContainer/VBoxContainer/HBoxContainer"] [node name="ResolutionLabel" type="Label" parent="Game/MarginContainer/VBoxContainer/Screen Mode"]
unique_name_in_owner = true custom_minimum_size = Vector2(125, 0)
layout_mode = 2 layout_mode = 2
focus_neighbor_left = NodePath("../../../../../VBoxContainer/GameTab") focus_neighbor_left = NodePath("../../../../../MarginContainer/VBoxContainer/GameTab")
text = "Screen Mode: "
label_settings = ExtResource("5_1mx8s")
[node name="ResolutionOptions" type="OptionButton" parent="Game/MarginContainer/VBoxContainer/Screen Mode"]
unique_name_in_owner = true
custom_minimum_size = Vector2(200, 0)
layout_mode = 2
focus_neighbor_left = NodePath("../../../../../MarginContainer/VBoxContainer/GameTab")
focus_neighbor_top = NodePath(".") focus_neighbor_top = NodePath(".")
focus_neighbor_right = NodePath(".") focus_neighbor_right = NodePath(".")
focus_neighbor_bottom = NodePath("../../HBoxContainer2/DeleteSaveButton") focus_neighbor_bottom = NodePath("../../HBoxContainer2/DeleteSaveButton")
theme_override_constants/h_separation = 20
theme_override_fonts/font = ExtResource("2_n0yw3") theme_override_fonts/font = ExtResource("2_n0yw3")
theme_override_font_sizes/font_size = 25 theme_override_styles/normal = SubResource("StyleBoxFlat_ko1q6")
theme_override_styles/focus = ExtResource("9_lx8gn") shortcut = ExtResource("2_1egkf")
theme_override_styles/disabled_mirrored = ExtResource("10_qvpxc") flat = true
theme_override_styles/disabled = ExtResource("10_qvpxc") alignment = 1
theme_override_styles/hover_pressed_mirrored = ExtResource("9_lx8gn")
theme_override_styles/hover_pressed = ExtResource("9_lx8gn")
theme_override_styles/hover_mirrored = ExtResource("9_lx8gn")
theme_override_styles/hover = ExtResource("9_lx8gn")
theme_override_styles/pressed_mirrored = ExtResource("10_qvpxc")
theme_override_styles/pressed = ExtResource("10_qvpxc")
theme_override_styles/normal_mirrored = ExtResource("10_qvpxc")
theme_override_styles/normal = ExtResource("10_qvpxc")
theme_override_icons/checked = ExtResource("5_wn77p")
theme_override_icons/unchecked = ExtResource("6_ko1q6")
button_mask = 0
text = "Skip opening cutscene"
[node name="HBoxContainer2" type="HBoxContainer" parent="Game/MarginContainer/VBoxContainer"] [node name="HBoxContainer2" type="HBoxContainer" parent="Game/MarginContainer/VBoxContainer"]
layout_mode = 2 layout_mode = 2
@@ -116,39 +111,14 @@ layout_mode = 2
unique_name_in_owner = true unique_name_in_owner = true
custom_minimum_size = Vector2(200, 35) custom_minimum_size = Vector2(200, 35)
layout_mode = 2 layout_mode = 2
focus_neighbor_left = NodePath("../../../../../VBoxContainer/GameTab") focus_neighbor_left = NodePath("../../../../../MarginContainer/VBoxContainer/GameTab")
focus_neighbor_top = NodePath("../../HBoxContainer/SkipOpeningCSCheck") focus_neighbor_top = NodePath("../../Screen Mode/ResolutionOptions")
focus_neighbor_right = NodePath(".") focus_neighbor_right = NodePath(".")
focus_neighbor_bottom = NodePath("../../Resolution/ResolutionOptions") focus_neighbor_bottom = NodePath(".")
theme_override_colors/font_focus_color = Color(0.976471, 0.827451, 0, 1) theme_override_colors/font_focus_color = Color(0.976471, 0.827451, 0, 1)
theme_override_fonts/font = ExtResource("2_n0yw3") theme_override_fonts/font = ExtResource("2_n0yw3")
text = "Delete Save Data" text = "Delete Save Data"
[node name="Resolution" type="HBoxContainer" parent="Game/MarginContainer/VBoxContainer"]
layout_mode = 2
[node name="ResolutionLabel" type="Label" parent="Game/MarginContainer/VBoxContainer/Resolution"]
custom_minimum_size = Vector2(125, 0)
layout_mode = 2
focus_neighbor_left = NodePath("../../../../../VBoxContainer/GameTab")
text = "Resolution: "
label_settings = ExtResource("5_1mx8s")
horizontal_alignment = 2
[node name="ResolutionOptions" type="OptionButton" parent="Game/MarginContainer/VBoxContainer/Resolution"]
unique_name_in_owner = true
custom_minimum_size = Vector2(200, 0)
layout_mode = 2
focus_neighbor_left = NodePath("../../../../../VBoxContainer/GameTab")
focus_neighbor_top = NodePath("../../HBoxContainer2/DeleteSaveButton")
focus_neighbor_right = NodePath(".")
focus_neighbor_bottom = NodePath(".")
theme_override_fonts/font = ExtResource("2_n0yw3")
theme_override_styles/normal = SubResource("StyleBoxFlat_ko1q6")
shortcut = ExtResource("2_1egkf")
flat = true
alignment = 1
[node name="CenterContainer" type="CenterContainer" parent="Game"] [node name="CenterContainer" type="CenterContainer" parent="Game"]
layout_mode = 2 layout_mode = 2
@@ -217,15 +187,15 @@ text = "Confirm"
[node name="Audio" type="MarginContainer" parent="."] [node name="Audio" type="MarginContainer" parent="."]
unique_name_in_owner = true unique_name_in_owner = true
visible = false visible = false
layout_mode = 2 layout_mode = 1
offset_top = 49.0 anchors_preset = -1
offset_right = 1920.0 anchor_left = 0.253
offset_bottom = 1129.0 anchor_top = 0.248
anchor_right = 0.917
anchor_bottom = 0.911
size_flags_vertical = 3 size_flags_vertical = 3
theme_override_constants/margin_left = 550 theme_override_constants/margin_left = 20
theme_override_constants/margin_top = 300 theme_override_constants/margin_top = 20
theme_override_constants/margin_right = 100
theme_override_constants/margin_bottom = 100
[node name="VBoxContainer" type="VBoxContainer" parent="Audio"] [node name="VBoxContainer" type="VBoxContainer" parent="Audio"]
layout_mode = 2 layout_mode = 2
@@ -240,10 +210,12 @@ layout_mode = 2
unique_name_in_owner = true unique_name_in_owner = true
layout_mode = 2 layout_mode = 2
size_flags_stretch_ratio = 1.34 size_flags_stretch_ratio = 1.34
focus_neighbor_left = NodePath("../../../../VBoxContainer/AudioTab") focus_neighbor_left = NodePath("../../../../MarginContainer/VBoxContainer/AudioTab")
focus_neighbor_top = NodePath(".") focus_neighbor_top = NodePath(".")
focus_neighbor_right = NodePath(".") focus_neighbor_right = NodePath(".")
focus_neighbor_bottom = NodePath("../../MusicVolume/MusicLabel") focus_neighbor_bottom = NodePath("../../MusicVolume/MusicLabel")
theme_override_fonts/font = ExtResource("2_n0yw3")
theme_override_font_sizes/font_size = 20
theme_override_styles/focus = ExtResource("9_lx8gn") theme_override_styles/focus = ExtResource("9_lx8gn")
theme_override_styles/hover = ExtResource("10_qvpxc") theme_override_styles/hover = ExtResource("10_qvpxc")
theme_override_styles/pressed = ExtResource("10_qvpxc") theme_override_styles/pressed = ExtResource("10_qvpxc")
@@ -281,10 +253,14 @@ unique_name_in_owner = true
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 8 size_flags_horizontal = 8
size_flags_vertical = 8 size_flags_vertical = 8
focus_neighbor_left = NodePath("../../../../VBoxContainer/AudioTab") focus_neighbor_left = NodePath("../../../../MarginContainer/VBoxContainer/AudioTab")
focus_neighbor_top = NodePath("../../SFXVolume/SELabel") focus_neighbor_top = NodePath("../../SFXVolume/SELabel")
focus_neighbor_right = NodePath(".") focus_neighbor_right = NodePath(".")
focus_neighbor_bottom = NodePath("../../MasterVolume/MasterLabel") focus_neighbor_bottom = NodePath("../../MasterVolume/MasterLabel")
theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 3
theme_override_fonts/font = ExtResource("2_n0yw3")
theme_override_font_sizes/font_size = 20
theme_override_styles/focus = ExtResource("9_lx8gn") theme_override_styles/focus = ExtResource("9_lx8gn")
theme_override_styles/hover = ExtResource("10_qvpxc") theme_override_styles/hover = ExtResource("10_qvpxc")
theme_override_styles/pressed = ExtResource("10_qvpxc") theme_override_styles/pressed = ExtResource("10_qvpxc")
@@ -319,6 +295,10 @@ layout_mode = 2
[node name="MasterLabel" type="Button" parent="Audio/VBoxContainer/MasterVolume"] [node name="MasterLabel" type="Button" parent="Audio/VBoxContainer/MasterVolume"]
unique_name_in_owner = true unique_name_in_owner = true
layout_mode = 2 layout_mode = 2
theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 3
theme_override_fonts/font = ExtResource("2_n0yw3")
theme_override_font_sizes/font_size = 20
theme_override_styles/focus = ExtResource("9_lx8gn") theme_override_styles/focus = ExtResource("9_lx8gn")
theme_override_styles/hover = ExtResource("10_qvpxc") theme_override_styles/hover = ExtResource("10_qvpxc")
theme_override_styles/pressed = ExtResource("10_qvpxc") theme_override_styles/pressed = ExtResource("10_qvpxc")
@@ -353,14 +333,18 @@ layout_mode = 2
[node name="ModeSelectLabel" type="Label" parent="Audio/VBoxContainer/ModeSelect"] [node name="ModeSelectLabel" type="Label" parent="Audio/VBoxContainer/ModeSelect"]
custom_minimum_size = Vector2(200, 0) custom_minimum_size = Vector2(200, 0)
layout_mode = 2 layout_mode = 2
theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 3
theme_override_fonts/font = ExtResource("2_n0yw3")
theme_override_font_sizes/font_size = 20
theme_override_styles/normal = SubResource("StyleBoxEmpty_ko1q6")
text = "Output Device: " text = "Output Device: "
label_settings = ExtResource("5_1mx8s")
[node name="SoundDeviceOptions" type="OptionButton" parent="Audio/VBoxContainer/ModeSelect"] [node name="SoundDeviceOptions" type="OptionButton" parent="Audio/VBoxContainer/ModeSelect"]
unique_name_in_owner = true unique_name_in_owner = true
custom_minimum_size = Vector2(300, 0) custom_minimum_size = Vector2(300, 0)
layout_mode = 2 layout_mode = 2
focus_neighbor_left = NodePath("../../../../VBoxContainer/AudioTab") focus_neighbor_left = NodePath("../../../../MarginContainer/VBoxContainer/AudioTab")
focus_neighbor_top = NodePath("../../MasterVolume/MasterLabel") focus_neighbor_top = NodePath("../../MasterVolume/MasterLabel")
focus_neighbor_right = NodePath(".") focus_neighbor_right = NodePath(".")
focus_neighbor_bottom = NodePath(".") focus_neighbor_bottom = NodePath(".")
@@ -370,18 +354,23 @@ flat = true
[node name="Controller" type="Control" parent="."] [node name="Controller" type="Control" parent="."]
unique_name_in_owner = true unique_name_in_owner = true
custom_minimum_size = Vector2(800, 800)
layout_mode = 2 layout_mode = 2
anchors_preset = 0 anchors_preset = 0
offset_left = 487.0 anchor_left = 0.254
offset_top = 271.0 anchor_top = 0.251
offset_right = 1760.0 anchor_right = 0.916
offset_bottom = 983.0 anchor_bottom = 0.907
focus_neighbor_left = NodePath("../VBoxContainer/ControllerTab") offset_left = -0.680023
offset_top = -0.0800171
offset_right = -1271.72
offset_bottom = -708.56
focus_neighbor_left = NodePath("../MarginContainer/VBoxContainer/ControllerTab")
script = ExtResource("12_776se") script = ExtResource("12_776se")
[node name="MarginContainer" type="MarginContainer" parent="Controller"] [node name="MarginContainer" type="MarginContainer" parent="Controller"]
layout_mode = 1 layout_mode = 1
anchors_preset = 15 anchors_preset = -1
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
grow_horizontal = 2 grow_horizontal = 2
@@ -426,8 +415,11 @@ size_flags_horizontal = 3
[node name="Label2" type="Label" parent="Controller/MarginContainer/VBoxContainer/ScrollContainer/ActionList/Header"] [node name="Label2" type="Label" parent="Controller/MarginContainer/VBoxContainer/ScrollContainer/ActionList/Header"]
custom_minimum_size = Vector2(200, 0) custom_minimum_size = Vector2(200, 0)
layout_mode = 2 layout_mode = 2
theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 3
theme_override_fonts/font = ExtResource("2_n0yw3")
theme_override_font_sizes/font_size = 20
text = "Keyboard" text = "Keyboard"
label_settings = ExtResource("5_1mx8s")
horizontal_alignment = 1 horizontal_alignment = 1
[node name="Control2" type="Control" parent="Controller/MarginContainer/VBoxContainer/ScrollContainer/ActionList/Header"] [node name="Control2" type="Control" parent="Controller/MarginContainer/VBoxContainer/ScrollContainer/ActionList/Header"]
@@ -437,8 +429,11 @@ size_flags_horizontal = 3
[node name="Label3" type="Label" parent="Controller/MarginContainer/VBoxContainer/ScrollContainer/ActionList/Header"] [node name="Label3" type="Label" parent="Controller/MarginContainer/VBoxContainer/ScrollContainer/ActionList/Header"]
custom_minimum_size = Vector2(200, 0) custom_minimum_size = Vector2(200, 0)
layout_mode = 2 layout_mode = 2
theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 3
theme_override_fonts/font = ExtResource("2_n0yw3")
theme_override_font_sizes/font_size = 20
text = "Controller" text = "Controller"
label_settings = ExtResource("5_1mx8s")
horizontal_alignment = 1 horizontal_alignment = 1
[node name="Move Forward" type="HBoxContainer" parent="Controller/MarginContainer/VBoxContainer/ScrollContainer/ActionList"] [node name="Move Forward" type="HBoxContainer" parent="Controller/MarginContainer/VBoxContainer/ScrollContainer/ActionList"]
@@ -459,7 +454,7 @@ size_flags_horizontal = 3
unique_name_in_owner = true unique_name_in_owner = true
custom_minimum_size = Vector2(200, 35) custom_minimum_size = Vector2(200, 35)
layout_mode = 2 layout_mode = 2
focus_neighbor_left = NodePath("../../../../../../../VBoxContainer/ControllerTab") focus_neighbor_left = NodePath("../../../../../../../MarginContainer/VBoxContainer/ControllerTab")
script = ExtResource("13_rjjwr") script = ExtResource("13_rjjwr")
[node name="Control2" type="Control" parent="Controller/MarginContainer/VBoxContainer/ScrollContainer/ActionList/Move Forward"] [node name="Control2" type="Control" parent="Controller/MarginContainer/VBoxContainer/ScrollContainer/ActionList/Move Forward"]
@@ -490,7 +485,7 @@ size_flags_horizontal = 3
unique_name_in_owner = true unique_name_in_owner = true
custom_minimum_size = Vector2(200, 35) custom_minimum_size = Vector2(200, 35)
layout_mode = 2 layout_mode = 2
focus_neighbor_left = NodePath("../../../../../../../VBoxContainer/ControllerTab") focus_neighbor_left = NodePath("../../../../../../../MarginContainer/VBoxContainer/ControllerTab")
script = ExtResource("13_rjjwr") script = ExtResource("13_rjjwr")
[node name="Control2" type="Control" parent="Controller/MarginContainer/VBoxContainer/ScrollContainer/ActionList/Move Left"] [node name="Control2" type="Control" parent="Controller/MarginContainer/VBoxContainer/ScrollContainer/ActionList/Move Left"]
@@ -521,7 +516,7 @@ size_flags_horizontal = 3
unique_name_in_owner = true unique_name_in_owner = true
custom_minimum_size = Vector2(200, 35) custom_minimum_size = Vector2(200, 35)
layout_mode = 2 layout_mode = 2
focus_neighbor_left = NodePath("../../../../../../../VBoxContainer/ControllerTab") focus_neighbor_left = NodePath("../../../../../../../MarginContainer/VBoxContainer/ControllerTab")
script = ExtResource("13_rjjwr") script = ExtResource("13_rjjwr")
[node name="Control2" type="Control" parent="Controller/MarginContainer/VBoxContainer/ScrollContainer/ActionList/Move Right"] [node name="Control2" type="Control" parent="Controller/MarginContainer/VBoxContainer/ScrollContainer/ActionList/Move Right"]
@@ -552,7 +547,7 @@ size_flags_horizontal = 3
unique_name_in_owner = true unique_name_in_owner = true
custom_minimum_size = Vector2(200, 35) custom_minimum_size = Vector2(200, 35)
layout_mode = 2 layout_mode = 2
focus_neighbor_left = NodePath("../../../../../../../VBoxContainer/ControllerTab") focus_neighbor_left = NodePath("../../../../../../../MarginContainer/VBoxContainer/ControllerTab")
script = ExtResource("13_rjjwr") script = ExtResource("13_rjjwr")
[node name="Control2" type="Control" parent="Controller/MarginContainer/VBoxContainer/ScrollContainer/ActionList/Move Backward"] [node name="Control2" type="Control" parent="Controller/MarginContainer/VBoxContainer/ScrollContainer/ActionList/Move Backward"]
@@ -583,7 +578,7 @@ size_flags_horizontal = 3
unique_name_in_owner = true unique_name_in_owner = true
custom_minimum_size = Vector2(200, 35) custom_minimum_size = Vector2(200, 35)
layout_mode = 2 layout_mode = 2
focus_neighbor_left = NodePath("../../../../../../../VBoxContainer/ControllerTab") focus_neighbor_left = NodePath("../../../../../../../MarginContainer/VBoxContainer/ControllerTab")
script = ExtResource("13_rjjwr") script = ExtResource("13_rjjwr")
[node name="Control2" type="Control" parent="Controller/MarginContainer/VBoxContainer/ScrollContainer/ActionList/Strafe Left"] [node name="Control2" type="Control" parent="Controller/MarginContainer/VBoxContainer/ScrollContainer/ActionList/Strafe Left"]
@@ -614,7 +609,7 @@ size_flags_horizontal = 3
unique_name_in_owner = true unique_name_in_owner = true
custom_minimum_size = Vector2(200, 35) custom_minimum_size = Vector2(200, 35)
layout_mode = 2 layout_mode = 2
focus_neighbor_left = NodePath("../../../../../../../VBoxContainer/ControllerTab") focus_neighbor_left = NodePath("../../../../../../../MarginContainer/VBoxContainer/ControllerTab")
script = ExtResource("13_rjjwr") script = ExtResource("13_rjjwr")
[node name="Control2" type="Control" parent="Controller/MarginContainer/VBoxContainer/ScrollContainer/ActionList/Strafe Right"] [node name="Control2" type="Control" parent="Controller/MarginContainer/VBoxContainer/ScrollContainer/ActionList/Strafe Right"]
@@ -645,7 +640,7 @@ size_flags_horizontal = 3
unique_name_in_owner = true unique_name_in_owner = true
custom_minimum_size = Vector2(200, 35) custom_minimum_size = Vector2(200, 35)
layout_mode = 2 layout_mode = 2
focus_neighbor_left = NodePath("../../../../../../../VBoxContainer/ControllerTab") focus_neighbor_left = NodePath("../../../../../../../MarginContainer/VBoxContainer/ControllerTab")
script = ExtResource("13_rjjwr") script = ExtResource("13_rjjwr")
[node name="Control2" type="Control" parent="Controller/MarginContainer/VBoxContainer/ScrollContainer/ActionList/Attack"] [node name="Control2" type="Control" parent="Controller/MarginContainer/VBoxContainer/ScrollContainer/ActionList/Attack"]
@@ -676,7 +671,7 @@ size_flags_horizontal = 3
unique_name_in_owner = true unique_name_in_owner = true
custom_minimum_size = Vector2(200, 35) custom_minimum_size = Vector2(200, 35)
layout_mode = 2 layout_mode = 2
focus_neighbor_left = NodePath("../../../../../../../VBoxContainer/ControllerTab") focus_neighbor_left = NodePath("../../../../../../../MarginContainer/VBoxContainer/ControllerTab")
script = ExtResource("13_rjjwr") script = ExtResource("13_rjjwr")
[node name="Control2" type="Control" parent="Controller/MarginContainer/VBoxContainer/ScrollContainer/ActionList/Interact"] [node name="Control2" type="Control" parent="Controller/MarginContainer/VBoxContainer/ScrollContainer/ActionList/Interact"]
@@ -707,7 +702,7 @@ size_flags_horizontal = 3
unique_name_in_owner = true unique_name_in_owner = true
custom_minimum_size = Vector2(200, 35) custom_minimum_size = Vector2(200, 35)
layout_mode = 2 layout_mode = 2
focus_neighbor_left = NodePath("../../../../../../../VBoxContainer/ControllerTab") focus_neighbor_left = NodePath("../../../../../../../MarginContainer/VBoxContainer/ControllerTab")
script = ExtResource("13_rjjwr") script = ExtResource("13_rjjwr")
[node name="Control2" type="Control" parent="Controller/MarginContainer/VBoxContainer/ScrollContainer/ActionList/Open Inventory"] [node name="Control2" type="Control" parent="Controller/MarginContainer/VBoxContainer/ScrollContainer/ActionList/Open Inventory"]
@@ -738,7 +733,7 @@ size_flags_horizontal = 3
unique_name_in_owner = true unique_name_in_owner = true
custom_minimum_size = Vector2(200, 35) custom_minimum_size = Vector2(200, 35)
layout_mode = 2 layout_mode = 2
focus_neighbor_left = NodePath("../../../../../../../VBoxContainer/ControllerTab") focus_neighbor_left = NodePath("../../../../../../../MarginContainer/VBoxContainer/ControllerTab")
script = ExtResource("13_rjjwr") script = ExtResource("13_rjjwr")
[node name="Control2" type="Control" parent="Controller/MarginContainer/VBoxContainer/ScrollContainer/ActionList/Sort Inventory"] [node name="Control2" type="Control" parent="Controller/MarginContainer/VBoxContainer/ScrollContainer/ActionList/Sort Inventory"]
@@ -751,22 +746,27 @@ custom_minimum_size = Vector2(200, 0)
layout_mode = 2 layout_mode = 2
script = ExtResource("14_wsiwg") script = ExtResource("14_wsiwg")
[node name="VBoxContainer" type="VBoxContainer" parent="."] [node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 0 layout_mode = 1
offset_left = 164.0 anchors_preset = -1
offset_top = 327.0 anchor_left = 0.081
offset_right = 414.0 anchor_top = 0.248
offset_bottom = 560.0 anchor_right = 0.22
anchor_bottom = 0.909
theme_override_constants/margin_top = 40
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
layout_mode = 2
theme_override_constants/separation = 40 theme_override_constants/separation = 40
[node name="GameTab" type="Button" parent="VBoxContainer"] [node name="GameTab" type="Button" parent="MarginContainer/VBoxContainer"]
unique_name_in_owner = true unique_name_in_owner = true
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 4 size_flags_horizontal = 4
size_flags_vertical = 4 size_flags_vertical = 4
focus_neighbor_left = NodePath(".") focus_neighbor_left = NodePath(".")
focus_neighbor_top = NodePath(".") focus_neighbor_top = NodePath(".")
focus_neighbor_right = NodePath("../../Game/MarginContainer/VBoxContainer/HBoxContainer/SkipOpeningCSCheck") focus_neighbor_right = NodePath("../../../Game/MarginContainer/VBoxContainer/Screen Mode/ResolutionOptions")
focus_neighbor_bottom = NodePath("../AudioTab") focus_neighbor_bottom = NodePath("../AudioTab")
theme_override_constants/outline_size = 3 theme_override_constants/outline_size = 3
theme_override_fonts/font = ExtResource("2_n0yw3") theme_override_fonts/font = ExtResource("2_n0yw3")
@@ -778,14 +778,14 @@ theme_override_styles/pressed = ExtResource("10_qvpxc")
theme_override_styles/normal = ExtResource("10_qvpxc") theme_override_styles/normal = ExtResource("10_qvpxc")
text = "Game" text = "Game"
[node name="AudioTab" type="Button" parent="VBoxContainer"] [node name="AudioTab" type="Button" parent="MarginContainer/VBoxContainer"]
unique_name_in_owner = true unique_name_in_owner = true
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 4 size_flags_horizontal = 4
size_flags_vertical = 4 size_flags_vertical = 4
focus_neighbor_left = NodePath(".") focus_neighbor_left = NodePath(".")
focus_neighbor_top = NodePath("../GameTab") focus_neighbor_top = NodePath("../GameTab")
focus_neighbor_right = NodePath("../../Audio/VBoxContainer/SFXVolume/SELabel") focus_neighbor_right = NodePath("../../../Audio/VBoxContainer/SFXVolume/SELabel")
theme_override_constants/outline_size = 3 theme_override_constants/outline_size = 3
theme_override_fonts/font = ExtResource("2_n0yw3") theme_override_fonts/font = ExtResource("2_n0yw3")
theme_override_font_sizes/font_size = 25 theme_override_font_sizes/font_size = 25
@@ -797,14 +797,14 @@ theme_override_styles/normal = ExtResource("10_qvpxc")
text = "Audio" text = "Audio"
flat = true flat = true
[node name="ControllerTab" type="Button" parent="VBoxContainer"] [node name="ControllerTab" type="Button" parent="MarginContainer/VBoxContainer"]
unique_name_in_owner = true unique_name_in_owner = true
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 4 size_flags_horizontal = 4
size_flags_vertical = 4 size_flags_vertical = 4
focus_neighbor_left = NodePath(".") focus_neighbor_left = NodePath(".")
focus_neighbor_top = NodePath("../AudioTab") focus_neighbor_top = NodePath("../AudioTab")
focus_neighbor_right = NodePath("../../Controller/MarginContainer/VBoxContainer/ScrollContainer/ActionList/Move Forward/MoveForwardKeyboard") focus_neighbor_right = NodePath("../../../Controller/MarginContainer/VBoxContainer/ScrollContainer/ActionList/Move Forward/MoveForwardKeyboard")
focus_neighbor_bottom = NodePath(".") focus_neighbor_bottom = NodePath(".")
theme_override_constants/outline_size = 3 theme_override_constants/outline_size = 3
theme_override_fonts/font = ExtResource("2_n0yw3") theme_override_fonts/font = ExtResource("2_n0yw3")
@@ -21,6 +21,7 @@ public partial class InventoryMessageUI : Control
public async void DisplayMessage(string message) public async void DisplayMessage(string message)
{ {
var newLabel = new Label() { Text = message, LabelSettings = _labelSettings }; var newLabel = new Label() { Text = message, LabelSettings = _labelSettings };
newLabel.AddThemeStyleboxOverride("normal", new StyleBoxFlat() { BgColor = new Color("171717d5"), BorderWidthLeft = 50, BorderWidthTop = 5, BorderWidthBottom = 5, BorderWidthRight = 50, BorderColor = new Color("171717d5") });
MessageBox.AddChild(newLabel); MessageBox.AddChild(newLabel);
GetTree().CreateTimer(3f).Timeout += () => GetTree().CreateTimer(3f).Timeout += () =>
File diff suppressed because one or more lines are too long