Pinch zoom
airone747
Member, PRO Posts: 13
Hi(sorry for my english), I have a problem. I created my first game and I inserted one scene with instructions.
In this scene I would like to insert the pinch zoom (or one simple zoom) because my text is small for devices like iphone 5... my game is optimized for ipad.
I found a free template with pinch zoom e rotate (this I don't need), but this template doesn't commented and I don't understand.
Can help me please?
Thanks to all who help me.
Comments
I thought to this solution:
1) I insert a new attribute of game ... for example "Scale" (integer)
2) I create a new actor (a button "Zoom") and I insert a new rule: if actor is pressed, change attribute of game "Scale" to attribute of game "Scale" + 1.
I insert this actor in the scene.
3) I open the actor with the text that I must increase. I insert a new rule: when my button "Zoom" is pressed, it increases the my text... in fact I put: when attribute of game "Scale" is equal to 1, change attribute self.size.width to self.size.width2 and change attribute self.size.height to self.size.height2.
Then I insert a new rule for the stop cicle: if attribute "Scale" is >1 reset scene and change attribute of game "Scale" to 0. In this mode you can press the button "Zoom" only one time ... then the scene reset.
I insert a new rule for the movement of image with big text ... I insert this rule so I can center my big text in the device. When the actor is pressed (touch) constrain attribute self.position.x to game.touches.touch1.x and constrain attribute self.position.y to game.touches.touch1.y.
This it works, but is it correct?
DeepBlueApps has a free template. You can download it here: https://www.dropbox.com/s/5ubzi27jhkb0nmq/FR051_PinchZoomRotate.zip?dl=0
Hope this helps!
thanks but I saw this template, but there are no comments so I don't understand... then I do not want to zoom in on all the scenes but over a single scene