Hey,
I am using the Inventory Demo as reference for a UI I am making. But I am not understanding some stuff.
I understand that you set the type in this code.
But in the demo there is an inventoryslot that ahs the value of "Shield" in the "DragEccepTypes" property. But this shieldtype is not in the previous code and I can't find it elsewhere in the code. Where is this shield type code?
My other problem is that I want to prevent that a row of inventoryslots can switch of icons. I tried to set every inventoryslot with there own type. But then I can only move the first 2 inventoryslots to an other row of inventoryslots and the other one not. Here are 2 screens to make it clear.
The goal is to have a row with nodes that I can move to the row above. But The row on the bottom may not interchange nodes.
This first one works.

The last one doesn't.

All the inventoryItems on the top row have the * value.
The bottom row have there own type.
I am using the Inventory Demo as reference for a UI I am making. But I am not understanding some stuff.
I understand that you set the type in this code.
Code:
var itemData:Object = [ {type:"armor",asset:2}, {type:"weapon",asset:3}, {type:"spell",asset:4}, {type:"spell",asset:5}, {type:"wand",asset:6}, {type:"spell",asset:7,quantity:7}, {type:"spell",asset:8}, {type:"spell",asset:9,quantity:3} ];
My other problem is that I want to prevent that a row of inventoryslots can switch of icons. I tried to set every inventoryslot with there own type. But then I can only move the first 2 inventoryslots to an other row of inventoryslots and the other one not. Here are 2 screens to make it clear.
The goal is to have a row with nodes that I can move to the row above. But The row on the bottom may not interchange nodes.
This first one works.

The last one doesn't.

All the inventoryItems on the top row have the * value.
The bottom row have there own type.
Comment