I just noticed one other thing which we could fix w/r/t this dialog:
The Add button is enabled with BasicPiece selected in the Available
list when the dialog comes up. The Add button is disabled like it
should be if you select something else, an then come back to BasicPiece.
I’m fixing that now.
Come to think of it, is there any reason at all to show BasicPiece in the
Available list when you can’t remove it from the Current list?
Speaking of Selection highlights, since your looking at/fixing it I noticed this odd behavior with it. See the image attached.
In the first pic you see two pieces side by side with white highlighted selection borders around them. These two pieces are actually one stack that has a stack layer offsetting the vertical the exact width of the counter making them appear to be ‘side by side’, so the piece on the right is in reality the top piece.
In the second pic the stack has been deselected - notice the "yellowout’ on the underneath piece but the top piece still has its selection border. Is it really supposed to do that? I havent noticed this when stacks are not offset by a full piece width - they seem to still display underneath as per normal.
Pics 3 and 4 are of when the stack is expanded (the offset is the same) and the yellowout disappears and the selection border returns to normal behavior per piece selected
Actually, I’m still not happy with it. If you stack up about 8 counters, the top edge of the Ghost stack image is missing. It’s something in the change I’ve made, but the change is so simple I can’t see why.
Another minor issue is that the Ghost uses a default StackMetrics, not the current Map’s StackMetrics when drawing the ghosts, so the Stacking offsets in the ghosts can be different to the real counters.
Tim, I could not reproduce your problem in my small test module.
swampwallaby-merge@2863 fixes the Stackmetrics problem. The Ghosts now use the map’s metrics and show the stacking correctly.
There is one remaining issue which is not an easy fix. If you lasso a single counter and a stack and move both by dragging the single counter, then the stack is drawn as a single counter (the top one) only. I’ll have a think about that one tomorrow.
I was able to reproduce it in a clean mod - no custom code. I’ve attached the demo. Didn’t realize this till I went back and looked at my original just now, but it would seem to have to do with something of counters that are created/ built up with layers only w/ a transparent basic piece or null image
While we’re looking at this, Brent, do you know what the difference is
between makeDragImage() and makeDragCursor()? They seem very similar to
me, so much so that you’ve made the same changes in both. I wonder if
it would be possible to refactor and delete some duplicate code here?
This is in fact the programmed behaviour. Unselected counters below the top counter in unexpanded Stacks are not drawn specifically, but are drawn as a rectangle with the color as set in the Stacking Options properties.
I guess no-one expected you to push the unexpanded stack offset by that much.
Hmm, ok good to know. Would it redraw the underneath piece if we are able to
set the Stacking Options color to transparent, or would vassal just look
through the lower piece as if non existent displaying underneath map.
Anyway don’t alter it regardless. I can live with it as is.
I’ll see if I can’t find an alternate method of offsetting counters which
allows automatic ‘collapsing’ when a piece is pulled out of middle of an
expanded stack, without using stacks - but may be difficult to pull off