2015/08/27 23:04:11

Today, I implemented, what I think, is a useful feature into Flare.

Previously, there were instances where the player could pick up just one item in an inventory stack (like when shift-clicking). In fact, all item movement on touchscreen/mouse-less devices was done that way. This was unacceptable for large stacks, such as those for Gold. My solution was to create a dialog menu to let the player decide how much they want to pick up.

Screenshot of Flare's quantity picker dialog

The implementation of this was a bit tricky. Flare's drag-and-drop system worked under the assumption that it was literally that: DRAG and drop. Clicking on items immediately removed them from their source slot, and there was no way to maintain what was being dragged if the player let off the mouse button. So as a result, I needed to make sure:

I'm satisfied with the end result, although the dialog menu itself may get some usability tweaks. For example, the text field with the value could be editable by keyboard. Also, the rate at which the arrows increment/decrement the value might need some adjusting.