Double Click Item Actions

Bernkastel

Member
How would one implement double click item actions, and is this a potential future release? Many games have special functions when you double click on an item view, such as unequipping an item rather than selecting it to move.
 
That is not possible currently I'm afraid... Some other users have also requested for right-click or middle-click support.

I'm not quite sure how I go about implementing that though, it would be a pretty big change for the ItemViewSlots.
I've added double click in my list of TODOs but it will probably take a few releases before I am able to implement it.

if you need this functionality soon I could recommend a work around. You could remove the use on click option.
1610701432392.png

And instead you may call the action in code. You could detect the click event on the ItemViewSlot by registering the the event or ignore it completely and create a new component next to it that inherits the Unity Intefaces for clicks (IPointerClick I think, there are a few others)

I made some changes the the action set binding to make it easier to call atcions through code, that will be available in the next update.

I hope that helps
 
Yeah I think double click and right click are very standard options that players typically expect. I haven't gotten to attempting to implement it yet but is it possible to listen for other input besides the interact button to activate specific item actions. For example pressing Q or dragging an item off an inventory panel are the go-to ways to drop an item in most games.
 
You can use keys to use Item Action by code just like I mentioned above. It's fairly simple all you need is a reference to the Item Action Set Binding component. In the update coming up I added some new public function that make it easier to call the item actions you want by code on the selected Item View Slot.

As dragging the the item outside the panel to drop it, that will also be possible in the next update. I posted a gif about it yesterday in the work in progress post:
 
Top