News:

Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

Is it possible to disable the middle button zoom feature on demand?

Started by isidoro, August 28, 2008, 05:20:07 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

isidoro

I've read that some keys definitions can be changed.  My small problem is that I play Simutrans with a portable computer with those funny rectangular touch pads in the place of a mouse.  Whenever I am not careful enough and my finger reaches the right side of the pad, it acts as the middle wheel of some mice and the window of the game is zoomed   >:(  .  And that happens several times in a long session...

I've located the place where this is done (in simworld.cc (r1792), line 3795):

    // mouse wheel scrolled -> rezoom
    if (ev.ev_class == EVENT_CLICK) {
                if(ev.ev_code==MOUSE_WHEELUP) {
                        if(win_change_zoom_factor(true)) {
                                setze_dirty();
                        }
                }
                else if(ev.ev_code==MOUSE_WHEELDOWN) {
                        if(win_change_zoom_factor(false)) {
                                setze_dirty();
                        }
                }
        }


Do you think this to be interesting to make it configurable in a .tab file?  A simple workaround for me can be to comment out those lines (that's the magic of free software  8) )

prissi

You can as well disable the button in windows. I think this is a very special problem on your computer, thus the probably easiest way is to comment it out and use your own version.

isidoro

Ooops! I forgot it.  Linux here.  I haven't found that option in my Linux.  And I like to keep that function for other applications.  I will comment out those or some earlier lines of code.

Thanks.

villeme

And a simple "real" mouse doesn't work on Linux ?
I know it can take a long time to setup it... (2 min ?? time to unpack the beast and connect it to your usb port...)  ;)

But it's really really really... much more convenient for playing simutrans !
So... buy one !

:p
Villeme

isidoro

I do have one   :D   Not a bad one.  It came with the portable computer (Asus S1).  The gamer's style   8) 
But I usually spend hours playing sitting in a relax armchair and there is no place for it.  Follower of Epicurus I may be   ::)  The commenting out works just fine.  Regards.