Is there a way to stop the zoom on mobile?

Get help using Construct 2

Post » Mon Dec 02, 2013 10:47 pm

In your example, your layout doesnt seem right; it says 480,200, while your project view is 268, 480 ...

Try and making them the same .. ie set both to 268,480
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Mon Dec 02, 2013 10:54 pm

and scale inner? looks like your layout could have that..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Dec 02, 2013 11:15 pm

They are both 268 by 480 in those screenshots I had fixed that.

I haven't tried scale inner, Ill try that
B
18
S
6
Posts: 348
Reputation: 2,633

Post » Mon Dec 02, 2013 11:19 pm

This is what scale inner looks like @ 268 by 480


B
18
S
6
Posts: 348
Reputation: 2,633

Post » Tue Dec 03, 2013 7:10 am

Looks like you are almost there.
That looks like it could be solved with a simple system scrollto.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Dec 03, 2013 8:34 am

Hey there, I took your advice and this is what I got with Scale inner as full-screen in browser, and system scrollto textbox and also unbound scroll set to YES.

The result is this: It seems to leave a huge gap inside my app

GameThirsty2013-12-03 08:36:37
B
18
S
6
Posts: 348
Reputation: 2,633

Post » Tue Dec 03, 2013 8:47 am

That's because you shouldn't scrollto textbox as you can clearly see.

The textbox origin point is in the upperleft corner, so if you scroll to that the upperleftcorner will be in the middle of the screen.

So where do you scroll to? Well it seems like the x-coordinate should be in the middle of your layout.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Dec 03, 2013 5:43 pm

Im back, and I have made some progress!



I used the following routine to on clicked textbox, it checks to see what the window size changed to, and divides that by 2 to get the halfway mark. The width stays the same half way mark, because the width did not change from the keyboard. I then set a variable to set the current value of the window size (which is the window size with the keyboard up) then once the user backs out of the keyboard, the window size changes, and I compare the value when the keyboard is up to the value when the keyboard is down as you see in the second event, and scrolls accordingly.

Here is what my phone looks like with this method put into play:



As you can see, its close! but not quite perfect, there is more white space when you backed out of the keyboard on top of the textbox, then when the keyboard is up. The event also has a wait of 0.75 seconds, it seems like the events inside the clicked on textbox gets ignored, because their is a slight delay from when the keyboard pops up, so I have to compensate for that delay by delaying the rest of the events by 0.75 seconds. That seems inefficient. Is there a way I could make it happen instantaneous? Because the user can see that delay it takes to scroll.

Edit: However, I tried it on a bigger phone with a bigger screen width & height, and my current system breaks and does not work.GameThirsty2013-12-03 20:30:06
B
18
S
6
Posts: 348
Reputation: 2,633

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 10 guests