Scroll down (pulling closer to me) zooms out

Problems and solutions for installing or running FreeOrion, including discussion of bugs if needed before posting a bug report on GitHub. For problems building from source, post in Compile.

Moderator: Oberlus

Post Reply
Message
Author
BTA
Space Floater
Posts: 16
Joined: Mon Jan 01, 2018 6:30 pm

Scroll down (pulling closer to me) zooms out

#1 Post by BTA »

To me, that is counterintuitive, how do I reverse that?
Wisdom is even more powerful than knowledge © Ari Gold

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Scroll down (pulling closer to me) zooms out

#2 Post by Dilvish »

BTA wrote:To me, that is counterintuitive, how do I reverse that?
I'm afraid it's rather hardcoded, I suggest you simply adjust your thinking, considering mouse-up to be moving forward, and mouse-down to be pulling back.

If you are a coder, or at least willing to deal with compiling FreeOrion yourself, I think you could invert the mousewheel zoom direction by changing this line to read

Code: Select all

        Zoom(-move, pt);
(And if you are a coder willing to put time into familiarizing yourself with the FreeOrion code, you could make the above be subject to a configuration option and submit a PR for it on our GitHub repo.)
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

BTA
Space Floater
Posts: 16
Joined: Mon Jan 01, 2018 6:30 pm

Re: Scroll down (pulling closer to me) zooms out

#3 Post by BTA »

I don't have a mousewheel, I have a touchpad, specifically, a Dell D630, model # PP18L... AH! Maybe this instruction is for Windows? I am using Ubuntu 17.10. What do I change and where is it?

I compiled Freeorion. Imagine, it was a bit more complicated than installing. ;)
Wisdom is even more powerful than knowledge © Ari Gold

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Scroll down (pulling closer to me) zooms out

#4 Post by Dilvish »

BTA wrote:What do I change and where is it?
Above I included a link to the particular file and line in the latest test version. The version you compiled might be a bit older, so that the line numbers don't match exactly, but with a small bit of searching you should be able to find it. If you don't have an IDE installed for coding with then you could just make the changes with Kate or Kwrite (or whatever editor your system uses if you open the file). The change was just adding that minus sign. Then recompile.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

defaultuser
Juggernaut
Posts: 854
Joined: Wed Aug 26, 2015 6:15 pm

Re: Scroll down (pulling closer to me) zooms out

#5 Post by defaultuser »

It works the same as Ctrl + Wheel works for zooming in and out of web browsers. "Up" gets bigger, "down" gets smaller like you had a zoom slider.

It seems like the right way to me.

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Scroll down (pulling closer to me) zooms out

#6 Post by MatGB »

It's also the default in Civ 5 and several other games I sometimes play.

An option to allow it to be changed would be a good feature request, but the default should be what other stuff does.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
Oberlus
Cosmic Dragon
Posts: 5713
Joined: Mon Apr 10, 2017 4:25 pm

Re: Scroll down (pulling closer to me) zooms out

#7 Post by Oberlus »

Yeah, I also find the current way the one I'm more used to, many programs do the same.

Post Reply