News:

Simutrans Forum Archive
A complete record of the old Simutrans Forum.

Scrolling bug 123.0

Started by ronnie89b, January 14, 2022, 09:19:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ronnie89b

I tried the new stable version, 123.0, and i noticed the scrolling changed. Now when you click and move the mouse, the scrolling stops when you reach the side of the screen, and you have to click again to continue. In the previous versions you can scrolling from one corner of the map to another with only one click.
This bug (or feature?) is still in 10356 nightly.

prissi

This is due to an issue with SDL2 and mouse repositioning when using finger input. It seems one can only have on or the other.

But I will look into this again.

prissi

In r10415 I used to reposition after a threshold, which still gives infinite scrolling but is still finger friendly. Please try.

prissi

#3
The previous commit was wrong.

The problem is that there are relative devices (mouse trackpad) and absolute devices (finger stylus lightpen). Mouse cursor repositioning only works for former, of course. Unfortunately, neither windows nor SDL2 properly separates between those two. I have a touchscreen with pen support. The finger is handled as finger, but the stylus is handled as mouse.

To make matter worse for some weird reason, SDL2 returns relative coordinates for finger movements and absolute for the mouse, which does not make sense very much. So in order to have infinite mouse scrolling, one has to reposition the mouse (or get input deep inside windows, which ignores mouse speed settings.) But windows has no way to tell if this is from a relative or absolute device and SLD2 gets it wrong every second time on my device as well.

I think the only way to have infinite scrolling is when you know you have no touch devices that are handled as mouse. So I will ad a button to try to get inifite scrolling, which will be off by default.

See r10419

ronnie89b

It's working again with a mouse, thanks!

Roboron

I think you (prissi) inverted the option text and the tooltip text unintentionally. Or so it seems to me.

prissi

#6
EDIT: You mean in the translator. Indeed, I corrected them there (and your spanish as well),

captain crunch

I can not use mouse drag to build road/rail anymore, it moves the map instead.
This is probably related to these changes.
Version: Simutrans 123.0.2 Nightly svn r10426 amd64/linux/SDL2

prissi

Found out and corrected this already. You could still built the old way though with two click ...

r10428 fixes this again.