Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (VoroneTZ, 7th_zorro, AndrewAMD), 1,044 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 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