The International Simutrans Forum

 

Author Topic: Is it possible to disable the middle button zoom feature on demand?  (Read 3322 times)

0 Members and 1 Guest are viewing this topic.

Offline isidoro

  • Devotee
  • *
  • Posts: 1140
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) )

Online prissi

  • Developer
  • Administrator
  • *
  • Posts: 10627
  • Languages: De,EN,JP
Re: Is it possible to disable the middle button zoom feature on demand?
« Reply #1 on: August 28, 2008, 02:49:14 PM »
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.

Offline isidoro

  • Devotee
  • *
  • Posts: 1140
Re: Is it possible to disable the middle button zoom feature on demand?
« Reply #2 on: August 29, 2008, 04:21:26 AM »
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.

Offline villeme

  • *
  • Posts: 14
Re: Is it possible to disable the middle button zoom feature on demand?
« Reply #3 on: August 29, 2008, 06:35:11 AM »
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

Offline isidoro

  • Devotee
  • *
  • Posts: 1140
Re: Is it possible to disable the middle button zoom feature on demand?
« Reply #4 on: August 30, 2008, 02:22:26 AM »
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.