Gamestudio Links
Zorro Links
Newest Posts
Max Number of Strategies in /Strategy folder
by Martin_HH. 06/17/26 07:16
Z9 getting Error 058
by jcl. 06/16/26 09:51
How to select between IB accounts by script?
by AndrewAMD. 06/13/26 15:44
Zorro tutorial ideas?
by AndrewAMD. 06/13/26 15:01
Zorro 3.01 recoded MMI function issue
by 11honza11. 06/13/26 11:40
Stooq now requires an API key
by AndrewAMD. 06/11/26 17:55
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (vince, Grant), 3,724 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Student_64151, Koti, curry, DeepxKalsi, Samed
19219 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