Mac OS X Trackpad zooming gesture
Moderator: OpenTTD Developers
Mac OS X Trackpad zooming gesture
Hello Mac friends,
after I found out I could scroll the map without having to press the trackpad all the way down to simulate the right click (Advanced Settings > Interaction > Function of scrollwheel = Scroll map) but using just two fingers touch, another question came up: how to zoom the map in this mode? First, I used + and - on the keyboard, but today I felt being fed up with such an inconvinience and created the following patch:
It allows users of recent MacBooks / MacBook Pros / Magic Trackpads to use the zooming two-finger gesture to zoom in/out the map in OpenTTD. Originally I made it for myself but may be somebody was looking for this feature as well.
Warning: this patch was tested to be applied to the 1.0.4 Tag, not the Trunk. But as far as affected files remain unchanged, it should be possible to do this on trunk as well.
Have fun!
after I found out I could scroll the map without having to press the trackpad all the way down to simulate the right click (Advanced Settings > Interaction > Function of scrollwheel = Scroll map) but using just two fingers touch, another question came up: how to zoom the map in this mode? First, I used + and - on the keyboard, but today I felt being fed up with such an inconvinience and created the following patch:
It allows users of recent MacBooks / MacBook Pros / Magic Trackpads to use the zooming two-finger gesture to zoom in/out the map in OpenTTD. Originally I made it for myself but may be somebody was looking for this feature as well.
Warning: this patch was tested to be applied to the 1.0.4 Tag, not the Trunk. But as far as affected files remain unchanged, it should be possible to do this on trunk as well.
Have fun!
Re: Mac OS X Trackpad zooming gesture
Will this work for other (non-mac) multiple-touch/multiple gesture trackpads?
Re: Mac OS X Trackpad zooming gesture
Can you port this patch to the trunk
Stable is not the place to be if you want new features
(except if you like it to give that job to the users doing them self)
Stable is not the place to be if you want new features
(except if you like it to give that job to the users doing them self)
#openttdcoop - building at the new revolution
Do you know a smarter moment then discovering that you where doing something wrong?
Do you know a smarter moment then discovering that you where doing something wrong?
Re: Mac OS X Trackpad zooming gesture
No, not with this patch. This patch adds some code to mac specific files to get input data from the trackpath. However, if you could add some way to retrieve the actions from the trackpath on windows (which I am afraid thats the hardest part), it should be possible.Class 165 wrote:Will this work for other (non-mac) multiple-touch/multiple gesture trackpads?
Edit: looks like windows 7 has a multitouch api, so it shouldn't be very hard to implement it ( http://code.msdn.microsoft.com/WindowsTouch and http://msdn.microsoft.com/en-us/library ... S.85).aspx)
#openttdcoop - building at the new revolution
Do you know a smarter moment then discovering that you where doing something wrong?
Do you know a smarter moment then discovering that you where doing something wrong?
Re: Mac OS X Trackpad zooming gesture
You're right.avdg wrote:Can you port this patch to the trunk
Stable is not the place to be if you want new features
(except if you like it to give that job to the users doing them self)
This one is for the trunk / r20829.
BTW, there are some other gestures that Mac trackpad can provide:
* Two fingers moving in opposite semicircles is a gesture meaning rotate.
* Three fingers brushing across the trackpad surface in a common direction is a swipe gesture.
Any ideas what would be they nice for? Rotate movement needs some finger exercise to master it, so eg. Firefox decided not to use it. But three-finger swipe is genial, Firefox uses it for back/forward (swipe left/right) and scroll to top/bottom (swipe up/down). I think community should decide or vote how to utilise these shortcuts. I see no clear decision like with zoom/pinch.
Re: Mac OS X Trackpad zooming gesture
I have tested the patch and my first impression was that the scroll was fast.
I think the best solution would be to add an option called "set zoomspeed", which would be comparable with the "map scrollwheel speed".
I also noticed that the zoom does more then only zooming, it allow you also to scroll through the content of the small windows in openttd.
tested OS: osx 10.6.4
I think the best solution would be to add an option called "set zoomspeed", which would be comparable with the "map scrollwheel speed".
I also noticed that the zoom does more then only zooming, it allow you also to scroll through the content of the small windows in openttd.
tested OS: osx 10.6.4
#openttdcoop - building at the new revolution
Do you know a smarter moment then discovering that you where doing something wrong?
Do you know a smarter moment then discovering that you where doing something wrong?
Re: Mac OS X Trackpad zooming gesture
Or even an option to switch it off completely, because some wouldn't like that zooming triggers sometimes when the user is not so careful with two-finger scrolling.avdg wrote:I have tested the patch and my first impression was that the scroll was fast.
I think the best solution would be to add an option called "set zoomspeed", which would be comparable with the "map scrollwheel speed".
Seen that as well. Minimap zooming works indeed.avdg wrote:I also noticed that the zoom does more then only zooming, it allow you also to scroll through the content of the small windows in openttd.
Re: Mac OS X Trackpad zooming gesture
Not only minimaps, but also everything with a scroll event like scrolling trough lists and hiding windows (by scrolling on the "shade window" button or the captionbar)avdg wrote:I also noticed that the zoom does more then only zooming, it allow you also to scroll through the content of the small windows in openttd.
#openttdcoop - building at the new revolution
Do you know a smarter moment then discovering that you where doing something wrong?
Do you know a smarter moment then discovering that you where doing something wrong?
-
- Engineer
- Posts: 36
- Joined: 06 Jan 2010 18:06
Re: Mac OS X Trackpad zooming gesture
Scrolling the map up/down and left/right works perfectly using the magic mouse when setting the "scrolling wheel" function to scroll map.
Is there a way to use the magic mouse as well as a gesture-input device in openttd? So that the zooming gesture can be performed on the magic mouse?
Is there a way to use the magic mouse as well as a gesture-input device in openttd? So that the zooming gesture can be performed on the magic mouse?
Who is online
Users browsing this forum: No registered users and 1 guest