Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (OptimusPrime, AndrewAMD), 14,580 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Zoom in and out #342036
09/22/10 20:18
09/22/10 20:18
Joined: Sep 2010
Posts: 12
Iceland
B
bjarni Offline OP
Newbie
bjarni  Offline OP
Newbie
B

Joined: Sep 2010
Posts: 12
Iceland
Hi, making small simulator with "2d top down view" country map and sea.

How is it best to make that. I have very big picture 1X1 meter and want to scroll and zoom with 5 levels from max to min with 3 middle stages. with mouse scroll.

Re: Zoom in and out [Re: bjarni] #342047
09/22/10 21:32
09/22/10 21:32
Joined: Sep 2010
Posts: 12
Iceland
B
bjarni Offline OP
Newbie
bjarni  Offline OP
Newbie
B

Joined: Sep 2010
Posts: 12
Iceland
ok half way there found this.

Scaling the Panel

{
MainMap_pan.scale_x -= (mickey.z * 0.005 * time_step);
MainMap_pan.scale_y = MainMap_pan.scale_x;
wait(1);
}

But how to keep center of the panel on same spot

if mouse tick gives 120 in change and i use *0,005 its giving 0,6 so i need when zoom in move map new pos =(Oldimage.size - newImageSize) or how is that done?


Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1