is there a way to reassign a SDL2 source value in a program? |
is there a way to reassign a SDL2 source value in a program? |
Ryan C. Gordon
Guest
|
On 9/4/16 5:39 AM, Dominus wrote:
Not at the moment, but we could add a hint for this. That being said: a double-click radius of 1 pixel seems deeply unforgiving to me, so we should probably increase this in any case. What value works well for your app? --ryan. _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
Re: is there a way to reassign a SDL2 source value in a prog |
rtrussell
|
Should it not, ideally, be a distance rather than a number of pixels? Setting the double-click radius to a fixed number of pixels will at best only work satisfactorily over a range of DPI values. I'm not sure of the current status of SDL_GetDisplayDPI (It doesn't seem to work in Android) so if that's not available I can see there might be a problem. Richard. |
|||||||||||||
|
is there a way to reassign a SDL2 source value in a program? |
Alex Szpakowski
Guest
|
It should probably use units affected by the OS pixel density scale factor (“dp units†in Android terminology), rather than pixels or direct DPI.
That said… I think it should actually just use what the OS considers to be a double-click (when the OS provides that information), similarly to how key repeat works right now. Double-click speed on desktops is typically a user-exposed system wide setting, so I feel like SDL’s APIs should expose that information rather than doing something that a developer using SDL can do on their own.
|
|||||||||||||
|
is there a way to reassign a SDL2 source value in a program? |
Alex Szpakowski
Guest
|
iOS also provides a UITouch.tapCount property (“the number of times the user tapped their fingers on a certain point within a predefined periodâ€), which is not used by SDL at all but would be exactly what I expect to be exposed by the SDL mouse event clicks field.
|
|||||||||||||||
|
Re: is there a way to reassign a SDL2 source value in a prog |
Dominus
|
A hint would be nice. We currently use 5 but that is probably a bit excessive, 3 might be a good default. Though Alex makes a good point:
|
|||||||||||||||||
|
is there a way to reassign a SDL2 source value in a program? |
Eric Wing
Guest
|
Is this problem related to why Android always returns 1 for the click count?
On 9/6/16, Alex Szpakowski wrote:
FWIW, for Mac, NSEvent provides clickCount. Thanks, Eric _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||||
|
is there a way to reassign a SDL2 source value in a program? |
Ryan C. Gordon
Guest
|
On 9/6/16 6:45 PM, Eric Wing wrote:
Possibly; we're literally just seeing how many pixels away you were from the previous click, and I imagine fingers aren't a very precise instrument in this regard. I haven't explored this very much at all, though. --ryan. _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|