#2 Mouse Wheel Scroll Zoom

Next_Release
closed
Farrer
5
2012-07-18
2012-06-18
qubodup
No

I constantly try using the mousewheel to zoom in/out. I'd like that to be a feature.

Since the middle mouse is being used for camera rotation, using the mousewheel would seem fitting.

I hope that does not conflict with key configuration settings.

Discussion

  • Farrer
    Farrer
    2012-06-18

    The main problem to do that is the way I use SDL to get events: in fact, I read no SDL event, just get the current mouse and keyboard states, and those, unfortunally, show no state for mouse wheel;

    Using the same approach, in a camera reimplementation using Ogre and OIS (for XUT, not fot DNT), I've done that without problems, and as far as I looked, SDL2 will show that in mouse state too (instead of only on mouse events).

    So, there could be 2 solutions:

    1) Use SDL events only to read mouse wheel events (ignoring exlicitly all others);
    2) Wait for SDL2
    3) Switch to OIS for input;

    I'll try (1), and if it won't work as desired, we need to wait for SDL2 or switch to OIS (I don't like to switch to it, as it is redundant with SDL, and making both dependencies would be strange);

     
  • Farrer
    Farrer
    2012-06-18

    And yes, I don't known how to count: my 2 solutions are in fact 3.

     
  • Farrer
    Farrer
    2012-06-18

    That was easer than I thought: implemented in git now.

     


Anonymous


Cancel   Add attachments