Cursor Modes, Grid Placement, Auto Sort

Hey Folks! A few more bugs fixed today, as we try to reach issue-count: 0. (Or at least, issues above 6 severity: 0.)

I managed to figure out what was wrong with my cursor mode tray toggle, and got that checked-in today. As is often the case with game code, simplicity solved the problems. It was trying to do tray in/out logic in two places, and they ended up stepping on each other's toes. Consolidating that logic in one place did the trick.

Tiago's grid-placement helper code is also in. Previously, he added code to help users place an item via tapping. If the tap target overlapped something and there was space nearby, it would add to the space instead of swapping. This was good, except in cases where the user wanted to swap and/or no space was nearby.

His new code swaps if there is no space, but uses empty space when it can. And if the user is really particular about where the item goes, they can use the precision drag and it will do what you tell it.

Finally, I'm looking into ways to increase the size of the auto-sort button. Currently, it's 10x10 pixels, which can be hard to tap on a small screen.

The solution seems easy at first: just make it bigger! However, the UI doesn't have enough room in some places. (Notably, the backpack and left shoulder slots barely have enough room for these buttons as-is, especially when large containers are slotted.)

So I'm considering other options. One thought is to just add a new context button to containers to "auto sort." This seems pretty non-intrusive. However, this wouldn't work on the ground (no item to tap on for a context menu). It isn't necessarily the first place people would look, either.

Though, I guess it at least is more intuitive than the unlabeled buttons there now. Plus, there might just be enough space above ground to add a slot image for the ground. I could add an item to it, as well, similar to the open ground camp sprite, to make it clearer that the grid corresponds to the ground.

Food for thought tonight!