Open Inventory, different InventoryNotificationType

This commit is contained in:
Zeffuro
2025-12-28 13:36:41 +01:00
parent 75f278c945
commit 98742482e3
11 changed files with 230 additions and 58 deletions
+8 -3
View File
@@ -125,9 +125,6 @@ public class AddonInventoryWindow : NativeAddon
RefreshCategoriesCore(doAutosize);
}
InventoryNotificationType currentNotificationType = (InventoryNotificationType) AgentInventory.Instance()->OpenTitleId;
if(currentNotificationType != _notificationNode.NotificationType) _notificationNode.NotificationType = currentNotificationType;
base.OnUpdate(addon);
}
@@ -292,6 +289,14 @@ public class AddonInventoryWindow : NativeAddon
private void ResizeWindow(float width, float height)
=> ResizeWindow(width, height, recalcLayout: true);
public void SetNotification(InventoryNotificationInfo info)
{
Services.Framework.RunOnTick(() =>
{
if(IsOpen) _notificationNode.NotificationInfo = info;
}, delayTicks: 1);
}
protected override unsafe void OnFinalize(AtkUnitBase* addon)
{
Services.AddonLifecycle.UnregisterListener(OnInventoryUpdate);