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

Active Cursor Tracking (#12) #17

Merged
merged 12 commits into from
Oct 28, 2023
Merged

Conversation

CardBreaker
Copy link
Contributor

This adds an optional active cursor tracking feature as part of #12. Major changes:

  • Adds an Options menu where you can toggle the feature.
  • When enabled, cursor now actively follows the mouse.
  • When enabled, left clicking places a note.
  • When enabled, left click and hold changes the note size. Left release places the note. I wanted to add right click detection during this to cancel the note placement, but XAML doesn't let you detect multiple different mouse press/release events at the same time.
  • When disabled, the old logic runs. I did not modify or fix the old behavior.
  • Regardless of the active cursor tracking setting, right hold and scroll now affects the note size.
  • Miscellaneous refactor to reduce unnecessary variables.

* Also refactored rollover flags to be a single state variable instead
* Avoid setting circle view fields directly from main view by using setter.
* Due to the limitations of XAML mouse pressed/released events, we can't actually detect a right click during a left mouse hold in order to add the ability to cancel note placement.
Copy link
Owner

@Raymonf Raymonf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good initially. Could you please move the settings to the Settings dialog?

BAKKA_Editor/UserSettings.cs Outdated Show resolved Hide resolved
BAKKA_Editor/ViewModels/MainViewModel.cs Outdated Show resolved Hide resolved
BAKKA_Editor/Views/MainView.axaml Outdated Show resolved Hide resolved
@Raymonf Raymonf linked an issue Oct 27, 2023 that may be closed by this pull request
@Raymonf
Copy link
Owner

Raymonf commented Oct 27, 2023

I'll give this a test when I get the chance and fix up the formatting probably sometime tonight. Thanks!

@Raymonf Raymonf self-assigned this Oct 27, 2023
@Raymonf Raymonf merged commit 711123a into Raymonf:main Oct 28, 2023
4 checks passed
@Raymonf
Copy link
Owner

Raymonf commented Oct 28, 2023

Merged, thanks!

@CardBreaker CardBreaker deleted the mouse-based-cursor branch October 29, 2023 05:01
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.

Mouse position based cursor/note placement
2 participants