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

Touch to Scroll #519

Open
FrostKiwi opened this issue Nov 27, 2022 · 0 comments
Open

Touch to Scroll #519

FrostKiwi opened this issue Nov 27, 2022 · 0 comments

Comments

@FrostKiwi
Copy link
Contributor

FrostKiwi commented Nov 27, 2022

I would like to have touch to scroll working, for usage on touch screens. You know, how you can effortlessly just scroll up and down on a webpage with a phone. So for a flawless experience, with an enlarged scrollbar being used for scrolling though. As a workaround it is trivial to remap to fingers moving to -> nk_input_scroll() But it just isn't the same as proper one finger touch to scroll.

The logic needed for this is rather simple I imagine. The logic for this is "If mouse is not hovering over something that can be interacted with, then click + drag distance affects ctx.input.scroll_delta". However, whilst there are a bunch of functions to test whether the mouse is over an intractable rectangle, I don't know how to test for the opposite. There is a nk_window_is_any_hovered() but no nk_window_is_any_clickable_thingy_hovered().

Anyone have an idea how to test for "Is the current mouse click over something that can be interacted with?"

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

No branches or pull requests

1 participant