weatherfactory / cultistsimulator-visible

Read-only preview builds of Cultist Simulator for the convenience of modders and the curious.
https://weatherfactory.biz/cultist-simulator/
37 stars 5 forks source link

Highly specific stack grab issue #177

Closed alexiskennedy closed 2 years ago

alexiskennedy commented 2 years ago

"The ability to grab a stack is a little buggy; if you mouse over the number circle, it will highlight to indicate you will grab the entire stack even in places where clicking will select merely the top card, instead. It seems, perhaps, roughly half the area that the button "highlights" itself will not actually grab the whole stack, but instead it will only grab a single card. One has to move the mouse further down and to the right (which is also highlighted, properly) in order for the stack to be properly grabbed."

Chelnoque commented 2 years ago

This was more conceptual than it sounded. All sizes are in order, badge receives pointer events, gets correctly highlighted et all, but when you try to drag it - in a recognizably highlighted state! - if you're too close to the border, it acts as if the badge weren't highlighted. Strange, huh? Two things in play:

And when we're dragging, we're usually dragging outside of the stack, right? So when the drag is registered, we moved the mouse, and we're no longer above the number badge. Bam, split the stack, please. Wonders of the world, amirite? Coulnd't come up with this kind of stuff on purpose.

Fixed in HELLEBORE.

alexiskennedy commented 2 years ago

Gotcha! ta for the notes.

FYI I've never liked the code that determines whether the pointer is over the stack. It always struck me as an ass-backwards way to do it. But when I went in and tried to change it, I found there didn't actually seem to be a better way to do it, given the object setup and the way Unity UI works.