Misc fixes and tweaks
This commit is contained in:
@@ -90,7 +90,7 @@ public unsafe class AddonInventoryWindow : InventoryAddonBase
|
|||||||
Services.Framework.RunOnTick(() =>
|
Services.Framework.RunOnTick(() =>
|
||||||
{
|
{
|
||||||
if (IsOpen) _notificationNode.NotificationInfo = info;
|
if (IsOpen) _notificationNode.NotificationInfo = info;
|
||||||
}, delayTicks: 1);
|
}, delayTicks: 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnFinalize(AtkUnitBase* addon)
|
protected override void OnFinalize(AtkUnitBase* addon)
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ public abstract unsafe class InventoryAddonBase : NativeAddon, IInventoryWindow
|
|||||||
{
|
{
|
||||||
if (IsOpen) SearchInputNode.SearchString = searchText;
|
if (IsOpen) SearchInputNode.SearchString = searchText;
|
||||||
RefreshCategoriesCore(autosize: true);
|
RefreshCategoriesCore(autosize: true);
|
||||||
}, delayTicks: 1);
|
}, delayTicks: 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RefreshFromLifecycle()
|
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -14,7 +14,7 @@ public static unsafe class InventoryMoveHelper
|
|||||||
{
|
{
|
||||||
Services.Logger.DebugOnly($"[MoveItem] {sourceContainer}@{sourceSlot} -> {destContainer}@{destSlot}");
|
Services.Logger.DebugOnly($"[MoveItem] {sourceContainer}@{sourceSlot} -> {destContainer}@{destSlot}");
|
||||||
InventoryManager.Instance()->MoveItemSlot(sourceContainer, sourceSlot, destContainer, destSlot, true);
|
InventoryManager.Instance()->MoveItemSlot(sourceContainer, sourceSlot, destContainer, destSlot, true);
|
||||||
Services.Framework.DelayTicks(2);
|
Services.Framework.DelayTicks(3);
|
||||||
Services.Framework.RunOnFrameworkThread(System.AddonInventoryWindow.ManualRefresh);
|
Services.Framework.RunOnFrameworkThread(System.AddonInventoryWindow.ManualRefresh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -203,8 +203,10 @@ public static unsafe class InventoryScanner
|
|||||||
foreach (var inv in inventories)
|
foreach (var inv in inventories)
|
||||||
{
|
{
|
||||||
var container = inventoryManager->GetInventoryContainer(inv);
|
var container = inventoryManager->GetInventoryContainer(inv);
|
||||||
|
var containerSize = container->Size;
|
||||||
|
|
||||||
if (container == null) continue;
|
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)
|
if (container->Items[i]. ItemId == 0)
|
||||||
empty++;
|
empty++;
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ public static class InventorySourceDefinitions
|
|||||||
InventorySourceType.SaddleBag => 70, // 2 * 35
|
InventorySourceType.SaddleBag => 70, // 2 * 35
|
||||||
InventorySourceType.PremiumSaddleBag => 70, // 2 * 35
|
InventorySourceType.PremiumSaddleBag => 70, // 2 * 35
|
||||||
InventorySourceType.AllSaddleBags => 140, // 2 * 35
|
InventorySourceType.AllSaddleBags => 140, // 2 * 35
|
||||||
InventorySourceType.Retainer => Retainer.Length * 35, // 7 * 25
|
InventorySourceType.Retainer => Retainer.Length * 25, // 7 * 25
|
||||||
_ => 140,
|
_ => 140,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -58,8 +58,8 @@ public class ColorInputRow : HorizontalListNode
|
|||||||
if (_colorPickerAddon is not null) return;
|
if (_colorPickerAddon is not null) return;
|
||||||
|
|
||||||
_colorPickerAddon = new ColorPickerAddon {
|
_colorPickerAddon = new ColorPickerAddon {
|
||||||
InternalName = "ColorPicker",
|
InternalName = "ColorPicker_AetherBags",
|
||||||
Title = "ColorPicker_AetherBags",
|
Title = "Pick a color",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ public sealed class CategoryGeneralConfigurationNode : TabbedVerticalListNode
|
|||||||
{
|
{
|
||||||
CategorySettings config = System.Config.Categories;
|
CategorySettings config = System.Config.Categories;
|
||||||
|
|
||||||
|
ItemVerticalSpacing = 2;
|
||||||
|
|
||||||
LabelTextNode titleNode = new LabelTextNode
|
LabelTextNode titleNode = new LabelTextNode
|
||||||
{
|
{
|
||||||
Size = Size with { Y = 18 },
|
Size = Size with { Y = 18 },
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ public sealed class CurrencyGeneralConfigurationNode : TabbedVerticalListNode
|
|||||||
{
|
{
|
||||||
CurrencySettings config = System.Config.Currency;
|
CurrencySettings config = System.Config.Currency;
|
||||||
|
|
||||||
|
ItemVerticalSpacing = 2;
|
||||||
|
|
||||||
LabelTextNode titleNode = new LabelTextNode
|
LabelTextNode titleNode = new LabelTextNode
|
||||||
{
|
{
|
||||||
Size = Size with { Y = 18 },
|
Size = Size with { Y = 18 },
|
||||||
@@ -68,6 +70,7 @@ public sealed class CurrencyGeneralConfigurationNode : TabbedVerticalListNode
|
|||||||
|
|
||||||
AddTab(1);
|
AddTab(1);
|
||||||
|
|
||||||
|
|
||||||
ColorInputRow cappedCurrencyColorNode = new ColorInputRow
|
ColorInputRow cappedCurrencyColorNode = new ColorInputRow
|
||||||
{
|
{
|
||||||
Label = "Weekly Cap Color",
|
Label = "Weekly Cap Color",
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ internal sealed class FunctionalConfigurationNode : TabbedVerticalListNode
|
|||||||
{
|
{
|
||||||
GeneralSettings config = System.Config.General;
|
GeneralSettings config = System.Config.General;
|
||||||
|
|
||||||
|
ItemVerticalSpacing = 2;
|
||||||
|
|
||||||
var titleNode = new CategoryTextNode
|
var titleNode = new CategoryTextNode
|
||||||
{
|
{
|
||||||
Height = 18,
|
Height = 18,
|
||||||
@@ -132,6 +134,11 @@ internal sealed class FunctionalConfigurationNode : TabbedVerticalListNode
|
|||||||
};
|
};
|
||||||
AddNode(linkItemCheckBox);
|
AddNode(linkItemCheckBox);
|
||||||
|
|
||||||
|
AddNode(new ResNode
|
||||||
|
{
|
||||||
|
Height = 6
|
||||||
|
});
|
||||||
|
|
||||||
var searchModeDropDown = new LabeledDropdownNode
|
var searchModeDropDown = new LabeledDropdownNode
|
||||||
{
|
{
|
||||||
Size = new Vector2(300, 20),
|
Size = new Vector2(300, 20),
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ public sealed class GeneralScrollingAreaNode : ScrollingListNode
|
|||||||
|
|
||||||
new ImportExportResetNode().AttachNode(this);
|
new ImportExportResetNode().AttachNode(this);
|
||||||
|
|
||||||
ItemSpacing = 32;
|
ItemSpacing = 10;
|
||||||
|
|
||||||
AddNode(new FunctionalConfigurationNode());
|
AddNode(new FunctionalConfigurationNode());
|
||||||
|
|
||||||
|
|||||||
@@ -47,8 +47,8 @@ public sealed class InventoryFooterNode : SimpleComponentNode
|
|||||||
IReadOnlyList<CurrencyInfo> currencyInfoList = InventoryState.GetCurrencyInfoList([1, 28, 0xFFFF_FFFE, 0xFFFF_FFFD]);
|
IReadOnlyList<CurrencyInfo> currencyInfoList = InventoryState.GetCurrencyInfoList([1, 28, 0xFFFF_FFFE, 0xFFFF_FFFD]);
|
||||||
_currencyListNode.SyncWithListDataByKey<CurrencyInfo, CurrencyNode, uint>(
|
_currencyListNode.SyncWithListDataByKey<CurrencyInfo, CurrencyNode, uint>(
|
||||||
dataList: currencyInfoList,
|
dataList: currencyInfoList,
|
||||||
getKeyFromData: c => c.ItemId,
|
getKeyFromData: currencyInfo => currencyInfo.ItemId,
|
||||||
getKeyFromNode: n => n.Currency.ItemId,
|
getKeyFromNode: node => node.Currency.ItemId,
|
||||||
updateNode: (node, data) =>
|
updateNode: (node, data) =>
|
||||||
{
|
{
|
||||||
node.Currency = data;
|
node.Currency = data;
|
||||||
|
|||||||
+1
-1
Submodule KamiToolKit updated: e6ff0f781b...ef8ad50d20
Reference in New Issue
Block a user