ItemViewSlotContainer is not updated when using item action from Hotbar.

thanawat

New member
Hi,

ItemHotbar has an Equip ItemAction that I can use when pressing 1. It will move a weapon to the Item Equipment ItemSlotCollection.

The problem is when I open the inventory screen, the Equipment ItemViewSlotContainer is not updated. But when I call ItemAction in the inventory screen It is updated.
(I have checked the ItemSlotCollection the weapon was moved to the correct collection and nothing is wrong with it except the ItemViewSlotContainer UI is not updated at that time.)

For example In the Demo, when assigned a Wooden Sword into the Hotbar slot 1 then press 1 to equip. It is equipped and ItemViewSlotContainer in the inventory screen is also updated correctly.

I try to find a function to update the UI but could not find it.
I am not so sure what I am doing wrong so please suggest. Thank you in advance.

3.jpg
 
I'm not quite sure...
Are you drwaing the UI when it is opened? The DisplayPanelBinding component should have an option to draw when it is opened.

You are using the "ItemSlotCollectioView" ItemViewSlotContainer (a.k.a equipment panel) correct? I believe that it draws automatically when the item collection changes while it is opened. It stops listening to change events while it is closed for performance reasons.

If nothing else works there is also the choice to manually tell the ItemViewSlotContainer to draw... but really it should work automatically if set correctly.
 
I'm not quite sure...
Are you drwaing the UI when it is opened? The DisplayPanelBinding component should have an option to draw when it is opened.

You are using the "ItemSlotCollectioView" ItemViewSlotContainer (a.k.a equipment panel) correct? I believe that it draws automatically when the item collection changes while it is opened. It stops listening to change events while it is closed for performance reasons.

If nothing else works there is also the choice to manually tell the ItemViewSlotContainer to draw... but really it should work automatically if set correctly.
I think I have added it manually or something that causes or makes the ItemViewSlotContainerPanelBinding missing.
I have fixed it. Your answer is awesome. (y)

Thank you again.
 
Top