Zoom Problem (.cap added)

For questions about using Classic.

Post » Sat Feb 26, 2011 4:16 am

Here's a .cap I quickly put together to demonstrate the problem: Download Here

The white cursor is for placing tiles, and is on the layer that zooms. The red cursor is for selecting tiles, and is on the layer that doesn't zoom.

Use the mouse wheel to zoom in or out.

Notice how the red cursor becomes offset when zoomed in. (The mouse has to be over the panel on the right to see this)
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Sat Feb 26, 2011 5:52 am

B
14
S
7
G
6
Posts: 146
Reputation: 3,235

Post » Sat Feb 26, 2011 6:04 am

[quote="buddy40":hiz3iw1h]http://www.mediafire.com/?n7byjd8l174399o

Does this work for you?[/quote:hiz3iw1h]

Well, it keeps the tile cursor from getting offset when zooming, but now the map editor cursor becomes offset :T

That said, I can now select the correct tile when zoomed in, but can't place it in the correct spot.

I'm starting to wonder if the zoom is just broken..
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Sat Feb 26, 2011 6:37 am

No, it isn't. It's just that the zooming takes place centered, and (at least I) didn't take that into account.

[code:37rfkk1v]+ MouseKeyboard: Mouse is over Box
-> Cursor_MapEditor2: Set position to int((116 - ((ScrollXRight - MouseX) * (ZoomX / 100))) / 8) * 8 + Box.Left, int((480 - ((ScrollYBottom - MouseY) * (ZoomY / 100))) / 8) * 8 + Box.Top[/code:37rfkk1v]

This works. The visible width of the box is 116, although the total width is 120. If you change the position or size of the box, you need to adjust this value, too. And of course the same has to be done to the (visible) height value 480.

EDIT: It works on the original cap you posted (Just wanted to make sure about it ;) )
Image
B
24
S
8
G
10
Posts: 1,821
Reputation: 8,279

Post » Sat Feb 26, 2011 7:06 am

Aha! Works perfectly. Thanks :mrgreen:
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Previous

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests