Beeg fixpack

This commit is contained in:
2026-02-16 03:30:45 -08:00
parent f09d6ac8e8
commit 366ed9f5e6
52 changed files with 2876 additions and 451 deletions

View File

@@ -63,6 +63,7 @@ public partial class ActionPanel : Panel
{
GetViewport().SetInputAsHandled();
HideActionPanel();
SfxDatabase.Instance.Play(SoundEffect.CancelUI);
}
}

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=11 format=3 uid="uid://tpqh7q0xh63c"]
[gd_scene load_steps=16 format=3 uid="uid://tpqh7q0xh63c"]
[ext_resource type="PackedScene" uid="uid://c005nd0m2eim" path="res://src/ui/inventory_menu/ItemSlot.tscn" id="1_a5r0f"]
[ext_resource type="Script" uid="uid://brtic4hw6thox" path="res://src/ui/inventory_menu/AugmentableItemsMenu.cs" id="1_ukqf2"]
@@ -6,12 +6,28 @@
[ext_resource type="FontFile" uid="uid://0syyay37admf" path="res://src/ui/fonts/georgiab.ttf" id="3_qtvkp"]
[ext_resource type="StyleBox" uid="uid://bxuy4tnftibfq" path="res://src/options/SelectedOptionsBox.tres" id="4_p84pf"]
[ext_resource type="StyleBox" uid="uid://bl15q835s4ene" path="res://src/options/UnselectedOptionsBox.tres" id="5_rxojm"]
[ext_resource type="LabelSettings" uid="uid://b6f8ggy3ulonb" path="res://src/ui/label_settings/GeorgiaItalic.tres" id="7_qtvkp"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_l0byb"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_7co7g"]
bg_color = Color(0, 0, 0, 0.745098)
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ukqf2"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_qtvkp"]
bg_color = Color(0, 0, 0, 0.745098)
[sub_resource type="LabelSettings" id="LabelSettings_p84pf"]
line_spacing = 1.0
font = ExtResource("3_qtvkp")
font_size = 50
outline_size = 3
outline_color = Color(0, 0, 0, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_p84pf"]
bg_color = Color(0, 0, 0, 0.745098)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_unikd"]
bg_color = Color(0, 0, 0, 1)
@@ -144,6 +160,99 @@ layout_mode = 2
[node name="AugmentableSlot19" parent="CenterContainer2/AugmentableItemsList/Panel/MarginContainer2/Inventory" instance=ExtResource("1_a5r0f")]
layout_mode = 2
[node name="TitleContainer" type="MarginContainer" parent="."]
layout_mode = 1
offset_right = 450.0
offset_bottom = 160.0
theme_override_constants/margin_left = 50
theme_override_constants/margin_top = 60
[node name="TitlePanelContainer" type="PanelContainer" parent="TitleContainer"]
custom_minimum_size = Vector2(400, 100)
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxEmpty_ukqf2")
[node name="AugmentTitlePanel" type="Panel" parent="TitleContainer/TitlePanelContainer"]
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_qtvkp")
[node name="MarginContainer" type="MarginContainer" parent="TitleContainer/TitlePanelContainer/AugmentTitlePanel"]
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 = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10
[node name="ReferenceRect" type="ReferenceRect" parent="TitleContainer/TitlePanelContainer/AugmentTitlePanel/MarginContainer"]
layout_mode = 2
border_color = Color(1, 1, 1, 1)
border_width = 2.0
editor_only = false
[node name="AugmentLabel" type="Label" parent="TitleContainer/TitlePanelContainer/AugmentTitlePanel/MarginContainer/ReferenceRect"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -148.0
offset_top = -28.5
offset_right = 148.0
offset_bottom = 28.5
grow_horizontal = 2
grow_vertical = 2
theme_override_font_sizes/font_size = 15
text = "AUGMENT"
label_settings = SubResource("LabelSettings_p84pf")
horizontal_alignment = 1
vertical_alignment = 1
[node name="DescriptionContainer" type="MarginContainer" parent="."]
layout_mode = 1
anchors_preset = 4
anchor_top = 0.5
anchor_bottom = 0.5
offset_top = -250.0
offset_right = 500.0
offset_bottom = 150.0
grow_vertical = 2
theme_override_constants/margin_left = 50
[node name="ItemDescriptionPanelContainer" type="PanelContainer" parent="DescriptionContainer"]
custom_minimum_size = Vector2(300, 300)
layout_mode = 2
[node name="ItemDescriptionBox" type="Panel" parent="DescriptionContainer/ItemDescriptionPanelContainer"]
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_p84pf")
[node name="MarginContainer" type="MarginContainer" parent="DescriptionContainer/ItemDescriptionPanelContainer"]
layout_mode = 2
theme_override_constants/margin_left = 5
theme_override_constants/margin_top = 5
theme_override_constants/margin_right = 5
theme_override_constants/margin_bottom = 5
[node name="ReferenceRect" type="ReferenceRect" parent="DescriptionContainer/ItemDescriptionPanelContainer/MarginContainer"]
layout_mode = 2
border_color = Color(1, 1, 1, 1)
border_width = 2.0
editor_only = false
[node name="CenterContainer" type="CenterContainer" parent="DescriptionContainer/ItemDescriptionPanelContainer"]
layout_mode = 2
[node name="Label" type="Label" parent="DescriptionContainer/ItemDescriptionPanelContainer/CenterContainer"]
layout_mode = 2
text = "Select an item to augment."
label_settings = ExtResource("7_qtvkp")
[node name="ConfirmAugmentContainer" type="Panel" parent="."]
unique_name_in_owner = true
visible = false

View File

@@ -31,6 +31,12 @@ public partial class InventoryMenu : Control, IInventoryMenu
[Node] public AugmentableItemsMenu AugmentMenu { get; set; }
[Node] public Label PlayerATKLabel { get; set; }
[Node] public Label PlayerDEFLabel { get; set; }
[Node] public Label StatusLabel { get; set; }
private List<IItemSlot> ItemSlots;
private IItemSlot _currentlySelected;
@@ -46,15 +52,29 @@ public partial class InventoryMenu : Control, IInventoryMenu
ActionPanel.AugmentMenuRequested += ActionPanel_AugmentMenuRequested;
AugmentMenu.AugmentMenuClosing += AugmentMenu_AugmentMenuClosing;
AugmentMenu.FocusMode = FocusModeEnum.None;
_player.AttackComponent.CurrentAttack.Changed += AttackChanged;
_player.AttackComponent.MaximumAttack.Changed += AttackChanged;
_player.DefenseComponent.CurrentDefense.Changed += DefenseChanged;
_player.DefenseComponent.MaximumDefense.Changed += DefenseChanged;
ClearDescriptionBox();
AttackChanged(0);
DefenseChanged(0);
StatusLabel.Text = string.Empty;
Hide();
}
private void AttackChanged(int obj) => PlayerATKLabel.Text = $"{_player.AttackComponent.CurrentAttack.Value:D2}/{_player.AttackComponent.MaximumAttack.Value:D2}+{_player.EquipmentComponent.BonusAttack}";
private void DefenseChanged(int obj) => PlayerDEFLabel.Text = $"{_player.DefenseComponent.CurrentDefense.Value:D2}/{_player.DefenseComponent.MaximumDefense.Value:D2}+{_player.EquipmentComponent.BonusDefense}";
public override void _Input(InputEvent @event)
{
if (Input.IsActionJustPressed(GameInputs.MoveUp) && _currentlySelected != ItemSlots.First())
SfxDatabase.Instance.Play(SoundEffect.MoveUI);
if (Input.IsActionJustPressed(GameInputs.MoveDown) && _currentlySelected != ItemSlots.Last(x => x.Item.Value != null))
SfxDatabase.Instance.Play(SoundEffect.MoveUI);
if (Input.IsActionJustPressed(GameInputs.Interact))
SfxDatabase.Instance.Play(SoundEffect.CancelUI);
}
private void ActionPanel_AugmentMenuRequested()

View File

@@ -1,7 +1,8 @@
[gd_scene load_steps=15 format=3 uid="uid://cbxw70qa7gifp"]
[gd_scene load_steps=16 format=3 uid="uid://cbxw70qa7gifp"]
[ext_resource type="Script" uid="uid://yh8qxmn058w2" path="res://src/ui/inventory_menu/InventoryMenu.cs" id="1_unikd"]
[ext_resource type="PackedScene" uid="uid://b648lhohtue70" path="res://src/ui/inventory_menu/ActionPanel.tscn" id="3_7co7g"]
[ext_resource type="FontFile" uid="uid://tfskthaq7tmi" path="res://src/ui/fonts/georgia.ttf" id="3_unikd"]
[ext_resource type="FontFile" uid="uid://0syyay37admf" path="res://src/ui/fonts/georgiab.ttf" id="6_ldqki"]
[ext_resource type="PackedScene" uid="uid://c005nd0m2eim" path="res://src/ui/inventory_menu/ItemSlot.tscn" id="6_unikd"]
[ext_resource type="PackedScene" uid="uid://tpqh7q0xh63c" path="res://src/ui/inventory_menu/AugmentableItemsMenu.tscn" id="6_xwkpe"]
@@ -33,7 +34,6 @@ bg_color = Color(0, 0, 0, 0.745098)
[node name="InventoryMenu" type="PanelContainer"]
process_mode = 2
visible = false
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
@@ -114,6 +114,112 @@ label_settings = SubResource("LabelSettings_ejvue")
horizontal_alignment = 1
vertical_alignment = 1
[node name="StatsPanelContainer" type="PanelContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel"]
custom_minimum_size = Vector2(400, 100)
layout_mode = 1
anchors_preset = -1
anchor_top = 0.121
anchor_right = 0.28
anchor_bottom = 0.218
offset_top = 0.369995
offset_right = -0.399994
offset_bottom = 0.459991
[node name="StatsPanel" type="Panel" parent="Panel/MarginContainer/PanelContainer/MenuPanel/StatsPanelContainer"]
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_cq2sk")
[node name="MarginContainer" type="MarginContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel/StatsPanelContainer/StatsPanel"]
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 = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10
[node name="ReferenceRect" type="ReferenceRect" parent="Panel/MarginContainer/PanelContainer/MenuPanel/StatsPanelContainer/StatsPanel/MarginContainer"]
layout_mode = 2
border_color = Color(1, 1, 1, 1)
border_width = 2.0
editor_only = false
[node name="MarginContainer" type="MarginContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel/StatsPanelContainer/StatsPanel/MarginContainer/ReferenceRect"]
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 = 15
theme_override_constants/margin_top = 5
theme_override_constants/margin_right = 5
theme_override_constants/margin_bottom = 5
[node name="HBoxContainer" type="HBoxContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel/StatsPanelContainer/StatsPanel/MarginContainer/ReferenceRect/MarginContainer"]
layout_mode = 2
theme_override_constants/separation = 20
[node name="StatsContainer" type="VBoxContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel/StatsPanelContainer/StatsPanel/MarginContainer/ReferenceRect/MarginContainer/HBoxContainer"]
layout_mode = 2
[node name="HBoxContainer" type="HBoxContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel/StatsPanelContainer/StatsPanel/MarginContainer/ReferenceRect/MarginContainer/HBoxContainer/StatsContainer"]
layout_mode = 2
[node name="ATKName" type="Label" parent="Panel/MarginContainer/PanelContainer/MenuPanel/StatsPanelContainer/StatsPanel/MarginContainer/ReferenceRect/MarginContainer/HBoxContainer/StatsContainer/HBoxContainer"]
layout_mode = 2
theme_override_fonts/font = ExtResource("3_unikd")
theme_override_font_sizes/font_size = 25
text = "ATK:"
vertical_alignment = 1
[node name="PlayerATKLabel" type="Label" parent="Panel/MarginContainer/PanelContainer/MenuPanel/StatsPanelContainer/StatsPanel/MarginContainer/ReferenceRect/MarginContainer/HBoxContainer/StatsContainer/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
theme_override_fonts/font = ExtResource("3_unikd")
theme_override_font_sizes/font_size = 25
text = "15/15"
vertical_alignment = 1
[node name="HBoxContainer2" type="HBoxContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel/StatsPanelContainer/StatsPanel/MarginContainer/ReferenceRect/MarginContainer/HBoxContainer/StatsContainer"]
layout_mode = 2
[node name="DEFName" type="Label" parent="Panel/MarginContainer/PanelContainer/MenuPanel/StatsPanelContainer/StatsPanel/MarginContainer/ReferenceRect/MarginContainer/HBoxContainer/StatsContainer/HBoxContainer2"]
layout_mode = 2
theme_override_fonts/font = ExtResource("3_unikd")
theme_override_font_sizes/font_size = 25
text = "DEF:"
vertical_alignment = 1
[node name="PlayerDEFLabel" type="Label" parent="Panel/MarginContainer/PanelContainer/MenuPanel/StatsPanelContainer/StatsPanel/MarginContainer/ReferenceRect/MarginContainer/HBoxContainer/StatsContainer/HBoxContainer2"]
unique_name_in_owner = true
layout_mode = 2
theme_override_fonts/font = ExtResource("3_unikd")
theme_override_font_sizes/font_size = 25
text = "15/15"
vertical_alignment = 1
[node name="StatusEffectContainer" type="VBoxContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel/StatsPanelContainer/StatsPanel/MarginContainer/ReferenceRect/MarginContainer/HBoxContainer"]
layout_mode = 2
alignment = 1
[node name="HBoxContainer" type="HBoxContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel/StatsPanelContainer/StatsPanel/MarginContainer/ReferenceRect/MarginContainer/HBoxContainer/StatusEffectContainer"]
layout_mode = 2
[node name="StatusName" type="Label" parent="Panel/MarginContainer/PanelContainer/MenuPanel/StatsPanelContainer/StatsPanel/MarginContainer/ReferenceRect/MarginContainer/HBoxContainer/StatusEffectContainer/HBoxContainer"]
layout_mode = 2
text = "Status:"
label_settings = ExtResource("7_we8a6")
[node name="StatusLabel" type="Label" parent="Panel/MarginContainer/PanelContainer/MenuPanel/StatsPanelContainer/StatsPanel/MarginContainer/ReferenceRect/MarginContainer/HBoxContainer/StatusEffectContainer/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
text = "Rust"
label_settings = ExtResource("7_we8a6")
[node name="ActionPanelContainer" type="PanelContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel"]
layout_mode = 1
anchors_preset = 2

View File

@@ -38,7 +38,8 @@ unique_name_in_owner = true
custom_minimum_size = Vector2(50, 50)
layout_mode = 2
texture = ExtResource("3_t6dim")
expand_mode = 2
expand_mode = 1
stretch_mode = 5
[node name="Control" type="HBoxContainer" parent="ItemInfo"]
layout_mode = 2
@@ -68,12 +69,12 @@ text = "Cross Sword"
[node name="AugmentTexture" type="TextureRect" parent="ItemInfo/Control"]
unique_name_in_owner = true
custom_minimum_size = Vector2(15, 20)
custom_minimum_size = Vector2(50, 50)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture = ExtResource("5_lt1pw")
stretch_mode = 2
expand_mode = 1
[node name="ItemCountLabel" type="Label" parent="."]
unique_name_in_owner = true