kotcrab/vis-ui

VisUI Draggable on Grid

tehnewb opened this issue · 3 comments

When using the Draggable on the GridGroup, it would be nice to be able to switch the Actor that you drag the dragging Actor to instead of just shifting the Actors forward. Is this possible?

If I could find what specific class handled the action of moving the actor between the grid, then I would like to do it myself!

Check out this application - it's a showcase of LML + VisUI. I think the Vis: fixedGroup example is what you're trying to achieve. I'm not sure if it's available in vanilla VisUI, but you can find the specialized GridGroup here.

Creating a FixedSizeGridGroup(itemAmount, itemSize) only creates a gridGroup of half of the itemAmount.

If I specify 36 itemAmount and any itemSize, it'll create a gridGroup 18 items
If I specify 70 itemAmount and any itemSize, it'll create a gridGroup of 35 items
If I specify 100 itemAmount and any itemSize, it'll create a gridGroup of 50 items.

I've changed table size to be over 300 width and height as well as the grid group size. Added to a table by itself, added to stage by itself. All same outcomes.

@tehnewb Unfortunately, you might have to try to copy the sources and fix the error. I'm not entirely sure why that happens, as these lines suggest that the correct amount of placeholders is added and it seems to work in the web version. You can start by checking how many children there are in the group. Anyway, LML is no longer maintained and it's been a while since its VisUI version was updated, so it's possible that GridGroup was changed in the meanwhile.