Almost shippable

This commit is contained in:
2024-09-17 04:39:01 -07:00
parent 9b8884d459
commit 27fa657f92
76 changed files with 3259 additions and 220 deletions

View File

@@ -43,7 +43,7 @@ font_color = Color(0.737255, 0.705882, 0.690196, 1)
[sub_resource type="LabelSettings" id="LabelSettings_biilt"]
font = ExtResource("5_2qnnx")
font_size = 46
font_size = 40
font_color = Color(0.737255, 0.705882, 0.690196, 1)
[sub_resource type="LabelSettings" id="LabelSettings_dot3k"]
@@ -53,7 +53,7 @@ font_color = Color(0.737255, 0.705882, 0.690196, 1)
[sub_resource type="LabelSettings" id="LabelSettings_th0sm"]
font = ExtResource("4_rg5yb")
font_size = 46
font_size = 40
font_color = Color(0.737255, 0.705882, 0.690196, 1)
[sub_resource type="LabelSettings" id="LabelSettings_ankkq"]
@@ -63,7 +63,7 @@ font_color = Color(0.737255, 0.705882, 0.690196, 1)
[sub_resource type="LabelSettings" id="LabelSettings_ouwww"]
font = ExtResource("4_rg5yb")
font_size = 46
font_size = 40
font_color = Color(0.737255, 0.705882, 0.690196, 1)
[sub_resource type="LabelSettings" id="LabelSettings_mundu"]
@@ -185,13 +185,9 @@ texture = SubResource("PlaceholderTexture2D_3ynpe")
expand_mode = 2
[node name="InventoryInfo" type="MarginContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_bottom = -3.0
grow_horizontal = 2
grow_vertical = 2
layout_mode = 0
offset_right = 1359.0
offset_bottom = 958.0
theme_override_constants/margin_top = 100
[node name="HBoxContainer" type="HBoxContainer" parent="InventoryInfo"]
@@ -205,7 +201,7 @@ theme_override_constants/separation = 20
layout_mode = 2
[node name="ReferenceRect2" type="ReferenceRect" parent="InventoryInfo/HBoxContainer/PlayerInfo/FloorBox"]
custom_minimum_size = Vector2(176, 0)
custom_minimum_size = Vector2(50, 0)
layout_mode = 2
[node name="FloorLabel" type="Label" parent="InventoryInfo/HBoxContainer/PlayerInfo/FloorBox"]
@@ -218,7 +214,7 @@ label_settings = SubResource("LabelSettings_q0afw")
layout_mode = 2
[node name="ReferenceRect2" type="ReferenceRect" parent="InventoryInfo/HBoxContainer/PlayerInfo/LevelBox"]
custom_minimum_size = Vector2(176, 0)
custom_minimum_size = Vector2(50, 0)
layout_mode = 2
[node name="CurrentLevelLabel" type="Label" parent="InventoryInfo/HBoxContainer/PlayerInfo/LevelBox"]
@@ -235,17 +231,17 @@ layout_mode = 2
layout_mode = 2
[node name="ReferenceRect2" type="ReferenceRect" parent="InventoryInfo/HBoxContainer/PlayerInfo/EXPBox"]
custom_minimum_size = Vector2(247, 0)
custom_minimum_size = Vector2(50, 0)
layout_mode = 2
[node name="EXPLabel" type="Label" parent="InventoryInfo/HBoxContainer/PlayerInfo/EXPBox"]
custom_minimum_size = Vector2(100, 0)
custom_minimum_size = Vector2(50, 0)
layout_mode = 2
text = "EXP"
label_settings = SubResource("LabelSettings_xxgnh")
[node name="ReferenceRect" type="ReferenceRect" parent="InventoryInfo/HBoxContainer/PlayerInfo/EXPBox"]
custom_minimum_size = Vector2(100, 0)
custom_minimum_size = Vector2(50, 0)
layout_mode = 2
[node name="EXPValue" type="Label" parent="InventoryInfo/HBoxContainer/PlayerInfo/EXPBox"]
@@ -258,7 +254,7 @@ label_settings = SubResource("LabelSettings_biilt")
layout_mode = 2
[node name="ReferenceRect2" type="ReferenceRect" parent="InventoryInfo/HBoxContainer/PlayerInfo/HPBox"]
custom_minimum_size = Vector2(247, 0)
custom_minimum_size = Vector2(50, 0)
layout_mode = 2
[node name="HPLabel" type="Label" parent="InventoryInfo/HBoxContainer/PlayerInfo/HPBox"]
@@ -268,7 +264,7 @@ text = "HP"
label_settings = SubResource("LabelSettings_dot3k")
[node name="ReferenceRect" type="ReferenceRect" parent="InventoryInfo/HBoxContainer/PlayerInfo/HPBox"]
custom_minimum_size = Vector2(100, 0)
custom_minimum_size = Vector2(50, 0)
layout_mode = 2
[node name="HPValue" type="Label" parent="InventoryInfo/HBoxContainer/PlayerInfo/HPBox"]
@@ -292,7 +288,7 @@ label_settings = ExtResource("6_tmdno")
layout_mode = 2
[node name="ReferenceRect2" type="ReferenceRect" parent="InventoryInfo/HBoxContainer/PlayerInfo/VTBox"]
custom_minimum_size = Vector2(247, 0)
custom_minimum_size = Vector2(50, 0)
layout_mode = 2
[node name="VTLabel" type="Label" parent="InventoryInfo/HBoxContainer/PlayerInfo/VTBox"]
@@ -302,7 +298,7 @@ text = "VT"
label_settings = SubResource("LabelSettings_ankkq")
[node name="ReferenceRect" type="ReferenceRect" parent="InventoryInfo/HBoxContainer/PlayerInfo/VTBox"]
custom_minimum_size = Vector2(100, 0)
custom_minimum_size = Vector2(50, 0)
layout_mode = 2
[node name="VTValue" type="Label" parent="InventoryInfo/HBoxContainer/PlayerInfo/VTBox"]
@@ -326,7 +322,7 @@ label_settings = ExtResource("6_tmdno")
layout_mode = 2
[node name="ReferenceRect2" type="ReferenceRect" parent="InventoryInfo/HBoxContainer/PlayerInfo/ATKBox"]
custom_minimum_size = Vector2(247, 0)
custom_minimum_size = Vector2(50, 0)
layout_mode = 2
[node name="ATKLabel" type="Label" parent="InventoryInfo/HBoxContainer/PlayerInfo/ATKBox"]
@@ -336,7 +332,7 @@ text = "ATK"
label_settings = SubResource("LabelSettings_ankkq")
[node name="ReferenceRect" type="ReferenceRect" parent="InventoryInfo/HBoxContainer/PlayerInfo/ATKBox"]
custom_minimum_size = Vector2(100, 0)
custom_minimum_size = Vector2(50, 0)
layout_mode = 2
[node name="ATKValue" type="Label" parent="InventoryInfo/HBoxContainer/PlayerInfo/ATKBox"]
@@ -360,7 +356,7 @@ label_settings = ExtResource("6_tmdno")
layout_mode = 2
[node name="ReferenceRect2" type="ReferenceRect" parent="InventoryInfo/HBoxContainer/PlayerInfo/DEFBox"]
custom_minimum_size = Vector2(247, 0)
custom_minimum_size = Vector2(50, 0)
layout_mode = 2
[node name="DEFLabel" type="Label" parent="InventoryInfo/HBoxContainer/PlayerInfo/DEFBox"]
@@ -371,7 +367,7 @@ text = "DEF
label_settings = SubResource("LabelSettings_ankkq")
[node name="ReferenceRect" type="ReferenceRect" parent="InventoryInfo/HBoxContainer/PlayerInfo/DEFBox"]
custom_minimum_size = Vector2(100, 0)
custom_minimum_size = Vector2(50, 0)
layout_mode = 2
[node name="DEFValue" type="Label" parent="InventoryInfo/HBoxContainer/PlayerInfo/DEFBox"]
@@ -399,7 +395,7 @@ layout_mode = 2
layout_mode = 2
[node name="ReferenceRect2" type="ReferenceRect" parent="InventoryInfo/HBoxContainer/PlayerInfo/HBoxContainer"]
custom_minimum_size = Vector2(247, 0)
custom_minimum_size = Vector2(50, 0)
layout_mode = 2
[node name="VBoxContainer" type="VBoxContainer" parent="InventoryInfo/HBoxContainer/PlayerInfo/HBoxContainer"]
@@ -407,7 +403,7 @@ layout_mode = 2
[node name="ItemDescriptionTitle" type="Label" parent="InventoryInfo/HBoxContainer/PlayerInfo/HBoxContainer/VBoxContainer"]
unique_name_in_owner = true
custom_minimum_size = Vector2(800, 100)
custom_minimum_size = Vector2(400, 50)
layout_mode = 2
size_flags_horizontal = 0
label_settings = ExtResource("7_vyrxm")
@@ -416,7 +412,7 @@ autowrap_mode = 2
[node name="UseItemPrompt" type="Label" parent="InventoryInfo/HBoxContainer/PlayerInfo/HBoxContainer/VBoxContainer"]
unique_name_in_owner = true
visible = false
custom_minimum_size = Vector2(800, 100)
custom_minimum_size = Vector2(400, 100)
layout_mode = 2
size_flags_horizontal = 0
text = "Use Item?"
@@ -425,7 +421,7 @@ autowrap_mode = 2
[node name="ItemEffectLabel" type="Label" parent="InventoryInfo/HBoxContainer/PlayerInfo/HBoxContainer/VBoxContainer"]
unique_name_in_owner = true
custom_minimum_size = Vector2(800, 100)
custom_minimum_size = Vector2(400, 100)
layout_mode = 2
size_flags_horizontal = 0
label_settings = SubResource("LabelSettings_mundu")
@@ -504,11 +500,12 @@ text = "Drop"
alignment = 0
[node name="ItemInfo" type="VBoxContainer" parent="InventoryInfo/HBoxContainer"]
custom_minimum_size = Vector2(725, 0)
layout_mode = 2
theme_override_constants/separation = 20
[node name="ItemTitleContainer" type="MarginContainer" parent="InventoryInfo/HBoxContainer/ItemInfo"]
custom_minimum_size = Vector2(800, 125)
custom_minimum_size = Vector2(300, 125)
layout_mode = 2
size_flags_horizontal = 4
@@ -533,7 +530,7 @@ vertical_alignment = 1
[node name="ForwardArrow" type="Label" parent="InventoryInfo/HBoxContainer/ItemInfo/ItemTitleContainer"]
unique_name_in_owner = true
visible = false
custom_minimum_size = Vector2(800, 0)
custom_minimum_size = Vector2(300, 0)
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 1

View File

@@ -25,7 +25,7 @@ public partial class ItemSlot : HBoxContainer, IItemSlot
[Dependency]
public IGameRepo GameRepo => this.DependOn<IGameRepo>();
[Node] public Label EquipBonus { get; set; } = default!;
//[Node] public Label EquipBonus { get; set; } = default!;
[Node] public TextureRect ItemTexture { get; set; } = default!;
@@ -40,7 +40,7 @@ public partial class ItemSlot : HBoxContainer, IItemSlot
public void OnReady()
{
ItemName.Text = Item.Info.Name;
EquipBonus.Text = "...";
//EquipBonus.Text = "...";
ItemTexture.Texture = Item.Info.Texture;
GameRepo.PlayerData.Inventory.EquippedWeapon.Sync += EquippedWeapon_Sync;
GameRepo.PlayerData.Inventory.EquippedArmor.Sync += EquippedArmor_Sync;
@@ -51,12 +51,12 @@ public partial class ItemSlot : HBoxContainer, IItemSlot
{
if (Item is Weapon weapon && weapon == obj)
{
EquipBonus.Text = $"{obj.WeaponStats.Damage:+0;-#;\\.\\.\\.}";
//EquipBonus.Text = $"{obj.WeaponStats.Damage:+0;-#;\\.\\.\\.}";
SetEquippedSelectedItemStyle();
}
if (Item is Weapon unequippedItem && unequippedItem != obj)
{
EquipBonus.Text = $"...";
//EquipBonus.Text = $"...";
SetItemStyle();
}
}
@@ -65,12 +65,12 @@ public partial class ItemSlot : HBoxContainer, IItemSlot
{
if (Item is Armor armor && armor == obj)
{
EquipBonus.Text = $"{obj.ArmorStats.Defense:+0;-#;\\.\\.\\.}";
//EquipBonus.Text = $"{obj.ArmorStats.Defense:+0;-#;\\.\\.\\.}";
SetEquippedSelectedItemStyle();
}
if (Item is Armor unequippedItem && unequippedItem != obj)
{
EquipBonus.Text = $"...";
//EquipBonus.Text = $"...";
SetItemStyle();
}
}
@@ -86,31 +86,31 @@ public partial class ItemSlot : HBoxContainer, IItemSlot
public void SetItemStyle()
{
ItemName.LabelSettings = ItemFont;
EquipBonus.LabelSettings = ItemFont;
//EquipBonus.LabelSettings = ItemFont;
}
public void SetSelectedItemStyle()
{
if (Item is IEquipable equipableItem && GameRepo.PlayerData.Inventory.IsEquipped(equipableItem))
{
ItemName.LabelSettings = SelectedEquippedItemFont;
EquipBonus.LabelSettings = EquippedItemFont;
//EquipBonus.LabelSettings = EquippedItemFont;
}
else
{
ItemName.LabelSettings = SelectedItemFont;
EquipBonus.LabelSettings = SelectedItemFont;
//EquipBonus.LabelSettings = SelectedItemFont;
}
}
public void SetEquippedItemStyle()
{
ItemName.LabelSettings = EquippedItemFont;
EquipBonus.LabelSettings = EquippedItemFont;
//EquipBonus.LabelSettings = EquippedItemFont;
}
public void SetEquippedSelectedItemStyle()
{
ItemName.LabelSettings = SelectedEquippedItemFont;
EquipBonus.LabelSettings = EquippedItemFont;
//EquipBonus.LabelSettings = EquippedItemFont;
}
public IInventoryItem Item { get; set; } = default!;

View File

@@ -1,6 +1,5 @@
[gd_scene load_steps=7 format=3 uid="uid://c005nd0m2eim"]
[gd_scene load_steps=6 format=3 uid="uid://c005nd0m2eim"]
[ext_resource type="LabelSettings" uid="uid://ca1q6yu8blwxf" path="res://src/ui/label_settings/InventoryMainTextBold.tres" id="1_ybfv1"]
[ext_resource type="Script" path="res://src/inventory_menu/ItemSlot.cs" id="1_yttxt"]
[ext_resource type="Texture2D" uid="uid://0r1dws4ajhdx" path="res://src/items/accessory/textures/MASK 01.PNG" id="2_7kdbd"]
[ext_resource type="Script" path="res://src/inventory_menu/ItemLabel.cs" id="3_xlgl0"]
@@ -17,15 +16,6 @@ offset_right = 1748.0
offset_bottom = 85.0
script = ExtResource("1_yttxt")
[node name="EquipBonus" type="Label" parent="."]
unique_name_in_owner = true
custom_minimum_size = Vector2(0, 50)
layout_mode = 2
text = "..."
label_settings = ExtResource("1_ybfv1")
horizontal_alignment = 1
vertical_alignment = 1
[node name="ReferenceRect" type="ReferenceRect" parent="."]
custom_minimum_size = Vector2(40, 0)
layout_mode = 2