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

More cursor features #1373

Open
kkoreilly opened this issue Dec 15, 2024 · 3 comments
Open

More cursor features #1373

kkoreilly opened this issue Dec 15, 2024 · 3 comments
Assignees
Labels
approved This feature request will be implemented enhancement A new feature request low priority Lower priority; do eventually but not urgent

Comments

@kkoreilly
Copy link
Member

Describe the feature

#1372 gets cursors in a pretty good place overall, but there are still some less urgent features we can add at some point:

  • A user setting to control cursor size, which could be helpful for accessibility
  • Support for animated cursors, which is needed for Progress and Wait to work correctly
  • Fix the Cannot process svg element mask error to make the progress cursor render correctly
  • Potentially use our custom cursor rendering on web instead of the default cursors; it would be nice to have cursors be consistent across all platforms for Cogent Core, although it would come at a nonzero performance cost, and consistency with other websites may be more important on the web

Relevant code

No response

@kkoreilly kkoreilly added enhancement A new feature request approved This feature request will be implemented labels Dec 15, 2024
@kkoreilly kkoreilly self-assigned this Dec 15, 2024
@kkoreilly kkoreilly added the low priority Lower priority; do eventually but not urgent label Dec 15, 2024
@DapperMongoose
Copy link

It would also be nice to be able to disable the cursor entirely in some cases.

@kkoreilly
Copy link
Member Author

kkoreilly commented Dec 15, 2024

Yes, we have a SetCursorEnabled function on system.Window that you can use to disable the cursor and also to enable raw mouse motion. We will probably add a nicer API for that to the core.Scene soon, in addition to documenting that functionality and implementing it on web.

kkoreilly added a commit that referenced this issue Dec 15, 2024
…or size a multiple of 2 and making colors be solid black/white (also helps it stand out more); shadow and extra buffer space for it appear to have minimal effect on blurriness, so we are now back to where we were before this PR on that; still need to fix underlying issue (see comment on #1373)
@kkoreilly
Copy link
Member Author

kkoreilly commented Dec 15, 2024

The other issue is that macOS automatically rescales the cursor image we pass it on Retina displays to be twice as large (rescaled by DevicePixelRatio), thereby making it look somewhat blurry. We want to just pass it the larger image from the start, but then it makes that twice as large, making the cursor too big and still blurry. I made some key fixes in 092c901 that make the cursors look much less blurry on Retina displays, so it isn't a major issue, but it would be nice to fix if possible; my initial research didn't find any answers in glfw. As such, we might fix that if/when we fold glfw into Cogent Core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved This feature request will be implemented enhancement A new feature request low priority Lower priority; do eventually but not urgent
Projects
None yet
Development

No branches or pull requests

2 participants