How to mirror slots in an ItemSlotCollection for a mirror hotbar?

ParanoidAndroid

New member
I'm trying to make a hotbar that mirrors slots from both the main inventory (MultistackItemCollection) and from a couple of equipment slots (ItemSlotCollection).
The InventoryMirrorHotbar class already handles the main inventory part, but is there anything I should keep in mind to implement the equipment part I need?

I made a derived class that gets a reference to my equipment ItemSlotCollectionView, and I was able to get the item info from the hotbar easy enough.
My current issue is that if I have any items in my equipment item collection, the hotbar doesn't see it when I start, and I have to open and close my inventory to get the equipment views to update.
I guess my main question with this is, how do I "initialize" the data in the ItemSlotCollectionView?
The mirrored inventory grid slots don't have this problem, but I can't figure out what it's doing differently.
 
I think that's because the InventoryMirrorHotbar fetches the InventoryGrid index even if it was not open.

For the equipment, instead of getting the index from the ItemSlotCollectionView, you could get it directly from the ItemSlotCollection since those have predefined slot integrated inside the collection.
 
Top