The International Simutrans Forum

Development => Patches & Projects => Topic started by: krosk on August 19, 2021, 07:49:12 PM

Title: [Android] Intuitive map drag for touch interface
Post by: krosk on August 19, 2021, 07:49:12 PM
Hello,

Patch for r10029.

Playing a bit with the android apk, one of the first things I have a hard time with is the drag and drop around the map. This patch makes map panning the same behavior as seen on google maps.

Some video gif to illustrate; the crosshair is the location of my mouse.
Before https://imgur.com/v5zVMBl (https://imgur.com/v5zVMBl), my finger must have very precise micro movement to control the map scrolling.
After https://imgur.com/a/N6l657q (https://imgur.com/a/N6l657q), map behaves exactly as if I dragged it around with my finger; much more intuitive movement and navigation.


Personal opinion, on PC the mouse going back to its original location while dragging the map is incredibly awkward and unlike any map UI behavior I have seen these years. If the sole reason was to avoid the mouse pointer reaching out the edge (and possibly leaving the window when playing windowed) because a user wants to drag a very long distance, I would argue it is just as natural to zoom out, drag a bit, then zoom in again while staying in full control of where the mouse is.
Title: Re: [Android] Intuitive map drag for touch interface
Post by: prissi on August 20, 2021, 12:42:08 AM
The mouse goes back because you could not scroll long distances (smaller even in windowed or multiscreen mode) otherwise. In most programs that involved scrolling (I checked roblox in windowed mode) the mouse is caught while dragging. However, since most of those do not show the mouse pointer, it is not that obvious.

I have tested Simutrans on a touchscreen (under windows though) and scrolling worked. I mean the "mouse" on a touchscreen is where the finger is. So I guess there is some SDL1/Android problem. Thanks for finding this. In in r10030.

By the way, the default language is danish. Since SDL1 lacs language detection, can thus be set to English? (Usually there is no default.sve and no settings.xml where this is set.