Hacker News new | past | comments | ask | show | jobs | submit login

> Game developers, with simple UI toolkits, tend to get this right more often

In almost all games I play there is an inventory and a hotbar and the way you assign items to the hotbar is by dragging it. To use the item from the inventory you release the button without dragging. How else could this be done?




I don't think I have ever seen auch a system. Seems incredibly weird, as you can't reliably distinguish between the two. A user moving his mouse during a click is it a drag? Or is an activation? That is very hard to distinguish.

In my experience games with auch an inventory system have e.g. a double click for use.

(Also, this is irrelevant to his point I think.)


The problem you're describing is only a problem with Act on Press, which is why it's normally Act on Release, so I don't understand how it's irrelevant to his point.

I'm not sure I've ever seen a game which requires a double click for use. Do you have any examples?


>The problem you're describing is only a problem with Act on Press, which is why it's normally Act on Release, so I don't understand how it's irrelevant to his point.

No, it is also a problem with act on release. How do you distinguish a drag and a click?


If you release while still inside the button it's a click. Try dragging a random clickable element in the browser (like dragging a link into this comment box) and you will see the same behaviour.


In practice, you probably just use a threshold?


World of Warcraft action bars are this way by default, and I imagine other MMOs do as well. Drag a spell onto the bar to be able to use it more easily. Click it (or, ideally, press an associated hotkey), and it casts the spell or uses the item. Drag the button, and it will make it so that you are again moving the spell around to put it on a different action bar slot (or remove it).

Some of them make it so that you have to hold shift when dragging, and that would play nicely with act-on-press, since you already know that the shift-click indicates the start of a drag.


Dragging items to a hotbar is very common. Pretty sure Minecraft does it. Black Desert does it. I think Barotrauma does it. Space Engineers, Terraria... I could keep scrolling through my Steam library but I think I made my point.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: