2 Commits

Author SHA1 Message Date
7baa5965e4 Merge branch 'main' of ssh://gitea.lozy.pink:22222/lozy360/GlamourBrowser
All checks were successful
Build and Release / Build (push) Successful in 25s
2026-01-01 13:55:50 +02:00
667c54bc83 Reorder item categories and update related logic for gloves and body items 2026-01-01 13:55:44 +02:00

View File

@@ -18,8 +18,8 @@ namespace Glamaholic.Ui {
private enum ItemCategory {
Head,
Gloves,
Body,
Gloves,
Legs,
Feet,
}
@@ -44,8 +44,8 @@ namespace Glamaholic.Ui {
private void InitializeSelectedItems() {
SelectedItems[ItemCategory.Head] = null;
SelectedItems[ItemCategory.Gloves] = null;
SelectedItems[ItemCategory.Body] = null;
SelectedItems[ItemCategory.Gloves] = null;
SelectedItems[ItemCategory.Legs] = null;
SelectedItems[ItemCategory.Feet] = null;
}
@@ -64,17 +64,6 @@ namespace Glamaholic.Ui {
.OrderBy(item => item.RowId)
.ToImmutableList();
ItemsByCategory[ItemCategory.Gloves] = equippableItems
.Where(item => {
if (!item.EquipSlotCategory.IsValid) {
return false;
}
var equipSlot = item.EquipSlotCategory.Value;
return equipSlot.Gloves > 0;
})
.OrderBy(item => item.RowId)
.ToImmutableList();
ItemsByCategory[ItemCategory.Body] = equippableItems
.Where(item => {
if (!item.EquipSlotCategory.IsValid) {
@@ -86,6 +75,17 @@ namespace Glamaholic.Ui {
.OrderBy(item => item.RowId)
.ToImmutableList();
ItemsByCategory[ItemCategory.Gloves] = equippableItems
.Where(item => {
if (!item.EquipSlotCategory.IsValid) {
return false;
}
var equipSlot = item.EquipSlotCategory.Value;
return equipSlot.Gloves > 0;
})
.OrderBy(item => item.RowId)
.ToImmutableList();
ItemsByCategory[ItemCategory.Legs] = equippableItems
.Where(item => {
if (!item.EquipSlotCategory.IsValid) {
@@ -204,8 +204,8 @@ namespace Glamaholic.Ui {
}
private unsafe void DrawSelectedGearDisplay() {
var categories = new[] { ItemCategory.Head, ItemCategory.Gloves, ItemCategory.Body, ItemCategory.Legs, ItemCategory.Feet };
var categoryLabels = new[] { "Hat", "Gloves", "Top", "Bottom", "Shoes" };
var categories = new[] { ItemCategory.Head, ItemCategory.Body, ItemCategory.Gloves, ItemCategory.Legs, ItemCategory.Feet };
var categoryLabels = new[] { "Hat", "Top", "Gloves", "Bottom", "Shoes" };
for (int i = 0; i < categories.Length; i++) {
var category = categories[i];
@@ -278,8 +278,8 @@ namespace Glamaholic.Ui {
var slotMappings = new Dictionary<ItemCategory, Glamourer.Api.Enums.ApiEquipSlot>
{
{ ItemCategory.Head, Glamourer.Api.Enums.ApiEquipSlot.Head },
{ ItemCategory.Gloves, Glamourer.Api.Enums.ApiEquipSlot.Hands },
{ ItemCategory.Body, Glamourer.Api.Enums.ApiEquipSlot.Body },
{ ItemCategory.Gloves, Glamourer.Api.Enums.ApiEquipSlot.Hands },
{ ItemCategory.Legs, Glamourer.Api.Enums.ApiEquipSlot.Legs },
{ ItemCategory.Feet, Glamourer.Api.Enums.ApiEquipSlot.Feet },
};
@@ -299,10 +299,10 @@ namespace Glamaholic.Ui {
}
private void DrawTabs() {
if (ImGui.BeginTabBar("item-category-tabs")) {
if (ImGui.BeginTabBar("item-category-tabs2")) {
DrawTabButton("Hat", ItemCategory.Head);
DrawTabButton("Gloves", ItemCategory.Gloves);
DrawTabButton("Top", ItemCategory.Body);
DrawTabButton("Gloves", ItemCategory.Gloves);
DrawTabButton("Bottom", ItemCategory.Legs);
DrawTabButton("Shoes", ItemCategory.Feet);
@@ -434,8 +434,8 @@ namespace Glamaholic.Ui {
var slotMapping = new Dictionary<ItemCategory, Glamourer.Api.Enums.ApiEquipSlot>
{
{ ItemCategory.Head, Glamourer.Api.Enums.ApiEquipSlot.Head },
{ ItemCategory.Gloves, Glamourer.Api.Enums.ApiEquipSlot.Hands },
{ ItemCategory.Body, Glamourer.Api.Enums.ApiEquipSlot.Body },
{ ItemCategory.Gloves, Glamourer.Api.Enums.ApiEquipSlot.Hands },
{ ItemCategory.Legs, Glamourer.Api.Enums.ApiEquipSlot.Legs },
{ ItemCategory.Feet, Glamourer.Api.Enums.ApiEquipSlot.Feet },
};