Misc fixes and tweaks

This commit is contained in:
Zeffuro
2026-01-03 09:50:40 +01:00
parent 7cec19f5f2
commit b9654dfb21
13 changed files with 25 additions and 27 deletions
+1 -1
View File
@@ -90,7 +90,7 @@ public unsafe class AddonInventoryWindow : InventoryAddonBase
Services.Framework.RunOnTick(() =>
{
if (IsOpen) _notificationNode.NotificationInfo = info;
}, delayTicks: 1);
}, delayTicks: 3);
}
protected override void OnFinalize(AtkUnitBase* addon)
+1 -1
View File
@@ -88,7 +88,7 @@ public abstract unsafe class InventoryAddonBase : NativeAddon, IInventoryWindow
{
if (IsOpen) SearchInputNode.SearchString = searchText;
RefreshCategoriesCore(autosize: true);
}, delayTicks: 1);
}, delayTicks: 3);
}
public void RefreshFromLifecycle()
@@ -1,16 +0,0 @@
using FFXIVClientStructs.FFXIV.Client.Game;
using FFXIVClientStructs.FFXIV.Component.GUI;
namespace AetherBags.Extensions;
public static unsafe class AtkResNodeExtensions
{
extension(ref AtkResNode node)
{
public void ShowInventoryItemTooltip(InventoryType container, short slot) {
fixed (AtkResNode* nodePointer = &node) {
AtkStage.Instance()->ShowInventoryItemTooltip(nodePointer, container, slot);
}
}
}
}
+1 -1
View File
@@ -14,7 +14,7 @@ public static unsafe class InventoryMoveHelper
{
Services.Logger.DebugOnly($"[MoveItem] {sourceContainer}@{sourceSlot} -> {destContainer}@{destSlot}");
InventoryManager.Instance()->MoveItemSlot(sourceContainer, sourceSlot, destContainer, destSlot, true);
Services.Framework.DelayTicks(2);
Services.Framework.DelayTicks(3);
Services.Framework.RunOnFrameworkThread(System.AddonInventoryWindow.ManualRefresh);
}
@@ -203,8 +203,10 @@ public static unsafe class InventoryScanner
foreach (var inv in inventories)
{
var container = inventoryManager->GetInventoryContainer(inv);
var containerSize = container->Size;
if (container == null) continue;
for (int i = 0; i < container->Size; i++)
for (int i = 0; i < containerSize; i++)
{
if (container->Items[i]. ItemId == 0)
empty++;
@@ -76,7 +76,7 @@ public static class InventorySourceDefinitions
InventorySourceType.SaddleBag => 70, // 2 * 35
InventorySourceType.PremiumSaddleBag => 70, // 2 * 35
InventorySourceType.AllSaddleBags => 140, // 2 * 35
InventorySourceType.Retainer => Retainer.Length * 35, // 7 * 25
InventorySourceType.Retainer => Retainer.Length * 25, // 7 * 25
_ => 140,
};
}
+2 -2
View File
@@ -58,8 +58,8 @@ public class ColorInputRow : HorizontalListNode
if (_colorPickerAddon is not null) return;
_colorPickerAddon = new ColorPickerAddon {
InternalName = "ColorPicker",
Title = "ColorPicker_AetherBags",
InternalName = "ColorPicker_AetherBags",
Title = "Pick a color",
};
}
@@ -19,6 +19,8 @@ public sealed class CategoryGeneralConfigurationNode : TabbedVerticalListNode
{
CategorySettings config = System.Config.Categories;
ItemVerticalSpacing = 2;
LabelTextNode titleNode = new LabelTextNode
{
Size = Size with { Y = 18 },
@@ -12,6 +12,8 @@ public sealed class CurrencyGeneralConfigurationNode : TabbedVerticalListNode
{
CurrencySettings config = System.Config.Currency;
ItemVerticalSpacing = 2;
LabelTextNode titleNode = new LabelTextNode
{
Size = Size with { Y = 18 },
@@ -68,6 +70,7 @@ public sealed class CurrencyGeneralConfigurationNode : TabbedVerticalListNode
AddTab(1);
ColorInputRow cappedCurrencyColorNode = new ColorInputRow
{
Label = "Weekly Cap Color",
@@ -20,6 +20,8 @@ internal sealed class FunctionalConfigurationNode : TabbedVerticalListNode
{
GeneralSettings config = System.Config.General;
ItemVerticalSpacing = 2;
var titleNode = new CategoryTextNode
{
Height = 18,
@@ -132,6 +134,11 @@ internal sealed class FunctionalConfigurationNode : TabbedVerticalListNode
};
AddNode(linkItemCheckBox);
AddNode(new ResNode
{
Height = 6
});
var searchModeDropDown = new LabeledDropdownNode
{
Size = new Vector2(300, 20),
@@ -13,7 +13,7 @@ public sealed class GeneralScrollingAreaNode : ScrollingListNode
new ImportExportResetNode().AttachNode(this);
ItemSpacing = 32;
ItemSpacing = 10;
AddNode(new FunctionalConfigurationNode());
@@ -47,8 +47,8 @@ public sealed class InventoryFooterNode : SimpleComponentNode
IReadOnlyList<CurrencyInfo> currencyInfoList = InventoryState.GetCurrencyInfoList([1, 28, 0xFFFF_FFFE, 0xFFFF_FFFD]);
_currencyListNode.SyncWithListDataByKey<CurrencyInfo, CurrencyNode, uint>(
dataList: currencyInfoList,
getKeyFromData: c => c.ItemId,
getKeyFromNode: n => n.Currency.ItemId,
getKeyFromData: currencyInfo => currencyInfo.ItemId,
getKeyFromNode: node => node.Currency.ItemId,
updateNode: (node, data) =>
{
node.Currency = data;