Gamestudio Links
Zorro Links
Newest Posts
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, juanex), 1,247 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19056 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 | chip programmers | 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