Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add BoxSelection callin and logic #667

Closed
wants to merge 1 commit into from

Conversation

badosu
Copy link
Collaborator

@badosu badosu commented Mar 1, 2023

No description provided.

@badosu badosu marked this pull request as draft March 1, 2023 16:21
@sprunk
Copy link
Collaborator

sprunk commented Mar 1, 2023

Does this happen continuously as you drag? If yes, is there a way to distinguish "this is not yet the final box and is part of a drag, more events might come later" vs "this is the final box, the user released the mouse"? (Checking the state of the mouse button might be a decent workaround for now but I'm not sure whether that's 100% reliable.)

@badosu
Copy link
Collaborator Author

badosu commented Mar 1, 2023

This is intended only for the event for mouserelease, but I think it would make sense to have a continuous callin for certain features. SmartSelect in particular would benefit from it. The aforementioned PR in particular is less ambitious in this regard, as I'm addressing the most egregious issue (being able to minimally handle external box selection, without having to deal with engine propagated events we want to ignore and not needing to take over mouseowner for such).

But I think it would make sense for a more complete design to have something such as BoxSelectionMove(anchorx, anchory, pivotx, pivoty, dx, dy), BoxSelection(anchorx, anchory, pivotx, pivoty).

At the moment, being able to handle dynamic selection (logic without release) requires using Update calls, which is very much non-ideal, and would still be present without BoxSelectionMove.

@badosu
Copy link
Collaborator Author

badosu commented Mar 1, 2023

@sprunk We can discuss design here. This PR is just a very raw poc.

@badosu
Copy link
Collaborator Author

badosu commented Mar 4, 2023

Closed for now to prioritize proper SelectionChanged callin as a replacement for LayoutButtons. I might revisit this in the future.

@badosu badosu closed this Mar 4, 2023
@badosu badosu deleted the badosu/external-box-selection-logic branch March 12, 2023 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants