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

Move mouse cursor while scrolling option #3406

Closed
DorpsGek opened this issue Dec 22, 2009 · 17 comments
Closed

Move mouse cursor while scrolling option #3406

DorpsGek opened this issue Dec 22, 2009 · 17 comments
Labels
component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay

Comments

@DorpsGek
Copy link
Member

gogglesguy opened the ticket and wrote:

The right-button mouse scrolling (panning) feels somewhat unnatural to me. For me to make it more natural I already turn on the "Reverse Scroll Direction" which already really helps alot. But in addition I would like to see an option that makes the mouse cursor move while you scroll.

Right now when you do a right click scroll, the mouse cursor will stay in a fixed position on screen, while the rest of the scene moves as you move the mouse. I like to make the mouse cursor move as well. The intended effect is that the mouse cursor keep pointing at same the location in the scene.

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/3406
@DorpsGek
Copy link
Member Author

systemparadox wrote:

I wouldn't want this behaviour to replace the existing way of doing things. I can't see it working when you scroll long distances (which I often do).

I don't know why you've got reverse scrolling on, but each to his own. Think of it as moving the camera and it'll make more sense I think.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3406#comment7345

@DorpsGek
Copy link
Member Author

Markavian wrote:

The way I usually use mouse pan/scroll is I see something just off screen, I drag it closer to me, then I click on it --- which means I expect the thing I want to be directly under my cursor.

I searched to find this after encountering the same issue trying to play the game. Locking the mouse cursor means I have to lift up and reposition my mouse on my mousepad, which I haven't had to do since I was 6 years old. This is a really terrible user interface issue.

People on IRC tell me:
Edit:
src/window.cpp
_cursor.fix_at = true

to fix it. Would be nice if there was an option in the interface options panel.

BRB downloading libraries and compilers.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3406#comment9179

@DorpsGek
Copy link
Member Author

systemparadox wrote:

It's getting a little confusing to work out what everyone wants. When talking about locking the cursor, please state what it is locked to (it is always locked to something, you can't have an unlocked cursor).

Current behaviour:
Mouse cursor stays fixed to the camera(/screen). Camera moves in the direction of the mouse (scene moves in the opposite direction). With reverse scroll direction on, the scene moves in the direction of the mouse.

Maybe we should make this more obvious in the option, i.e. change it to "Mouse scrolls: [scene|camera]" or something.

gogglesguy wants:
Reversed scroll direction, with the mouse cursor fixed to the scene. So what we want is to add an option like "Lock scrolling cursor to: [scene|camera]".

John Beech wants:
The same as gogglesguy I think. I'm not sure what you mean about having the thing you want directly under the cursor- I thought it was off-screen?


This comment was imported from FlySpray: https://bugs.openttd.org/task/3406#comment9184

@DorpsGek
Copy link
Member Author

gogglesguy wrote:

I think John and I want the same thing. I guess the idea can be best described as clicking the mouse somewhere in the scene and then pulling it towards the location you want to have it (usually the center of the screen). Like moving a table cloth with your finger, you move the whole scene with the mouse cursor. Both finger and mouse cursor move in this case. Hence the cursor will keep pointing to the same location in the scene (as opposed to the same screen location).

To illustrate, you click on a tile in the upper right corner of the screen, and then drag your mouse to the lower left corner of the screen. Both the tile you clicked on and the mouse cursor will now be in the lower left corner of the screen.

When John talks about locking the cursor, he means the cursor will stay on a fixed position on screen while the camera/scene is scrolling.

Hope this makes it more clearer.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3406#comment9185

@DorpsGek
Copy link
Member Author

systemparadox wrote:

That makes sense. So the 2 options I described should make everyone happy. Unfortunately I don't have time to implement it at the moment.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3406#comment9186

@DorpsGek
Copy link
Member Author

DorpsGek commented Dec 6, 2010

systemparadox wrote:

Ok this should fix it. I did originally add an option for "Scroll with mouse unlocked", but after testing the available combinations between that and "reverse scroll direction" I decided there was no point.

I cannot see anyone wanting the mouse unlocked when scrolling is not reversed, since the cursor is moving in the opposite direction to the scene. Likewise, I can now see why this bug report came about. Reversed scrolling with a locked cursor (the existing behaviour) doesn't make sense either.

So the attached patch makes the cursor unlocked when using reversed scrolling, but keeps it locked when using the regular scrolling direction.

EDIT: Simplified patch slightly. Annoyingly, flyspray won't let me overwrite or delete the old one, but it will let me upload 2 with the same name :S

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/3406#comment9218

@DorpsGek
Copy link
Member Author

DorpsGek commented Dec 6, 2010

gogglesguy wrote:

I just tried your (first) patch and it works really well. Thanks.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3406#comment9219

@DorpsGek
Copy link
Member Author

DorpsGek commented Dec 7, 2010

Markavian wrote:

Looks great simon, just compiling to the second patch to test now.

Works as intended, thanks.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3406#comment9220

@DorpsGek
Copy link
Member Author

DorpsGek commented Dec 7, 2010

Rubidium wrote:

What's the point of this patch when it simply duplicates the left-click scrolling behaviour? The current (without patch) behaviour was requested a long time ago. Changing its behaviour doesn't seem the right thing to do, especially when left-click scrolling does exactly the same.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3406#comment9221

@DorpsGek
Copy link
Member Author

DorpsGek commented Dec 7, 2010

systemparadox wrote:

Left-click scrolling is horrible and should only be used by people who don't have enough buttons on their mouse (or a touchscreen).

This patch makes reversed-direction right-click scrolling work correctly, without breaking normal right-click scrolling. I suspect the behaviour request you refer to was in relation to the normal scrolling direction, which this patch does not change. Got a task number for that request?


This comment was imported from FlySpray: https://bugs.openttd.org/task/3406#comment9222

@DorpsGek
Copy link
Member Author

DorpsGek commented Dec 7, 2010

systemparadox wrote:

See also: task 3285.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3406#comment9224

@DorpsGek
Copy link
Member Author

DorpsGek commented Dec 7, 2010

Rubidium wrote:

It's sadly enough from the era before this tracker existed (r3222). Given it wasn't requested on the forum it must have been requested via IRC, of which I don't have a log from back then.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3406#comment9226

@DorpsGek
Copy link
Member Author

DorpsGek commented Dec 7, 2010

Rubidium wrote:

In any case, in my opinion, this patch does destroy the current behaviour of that setting. With that patch I can't scroll the whole map without having to let go of the mouse button, but without patch I can. In other words, you're effectively removing a useful feature for quickly scrolling the map by limiting the amount of map scroll to the window you can actually see. Even then, you need to release the mouse go to the other side of the window click and drag to continue.

So maybe this change "fixes" OpenTTD to behave like you want it to behave, but it removes the scroll-all-map-without-releasing-the-mouse-button feature. As such it is by no way a simple fix as it's basically (drastically) changing the behaviour of something without a way back.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3406#comment9228

@DorpsGek
Copy link
Member Author

DorpsGek commented Dec 7, 2010

systemparadox wrote:

Scrolling the map without releasing the button is something I do a lot too. But I'm not using reversed scrolling. With reversed scrolling, locking the cursor to the screen simply doesn't make sense.

I can put in another option if you'd prefer, that is what I was originally going to do. But if you try it I'm sure you'll see what I mean: locked reversed scrolling makes no sense, and unlocked normal scrolling makes even less sense.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3406#comment9230

@DorpsGek
Copy link
Member Author

systemparadox wrote:

Alternative patch which adds the option "Lock cursor while scrolling" (defaults to true, the current behaviour).

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/3406#comment9254

@DorpsGek
Copy link
Member Author

ObeyKun wrote:

I wouldn't want this behaviour to replace the existing way of doing things. I can't see it working when you scroll long distances (which I often do).

That's easy. All is needed for smart hand scrolling is wrapping cursor to opposite bound when it reaches any screen bound. Of course it needs some margin (I use 5px in one of my projects). Something like that: http://paste.kde.org/772040/.

As example you can look at Okular documents viewer or at my project: http://www.qfrost.net/download/0.17.7/qfrost-release-win32.zip, just press Ok in first window and then use right click and drag in main area.

Maybe it will work better with check like this: http://paste.kde.org/772046/


This comment was imported from FlySpray: https://bugs.openttd.org/task/3406#comment12303

@DorpsGek
Copy link
Member Author

andythenorth closed the ticket.

Reason for closing: Won't implement

Flyspray clean up: more than 5 years old, and not obvious what should be done with this next, so closing. If this offends, discuss with andythenorth in irc. Thanks.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3406

@DorpsGek DorpsGek added component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) wontfix patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay
Projects
None yet
Development

No branches or pull requests

1 participant