Set scaling mode during runtime?

Get help using Construct 2

Post » Tue Dec 22, 2015 4:30 pm

I want to configure a key (say, S) to cycle between Scale Inner, Scale Outer, Letterbox Scale and Letterbox Interger Scale. Is there any plugin or behavior I can use that would allow for this?
B
41
S
12
G
14
Posts: 1,122
Reputation: 11,282

Post » Wed Dec 23, 2015 11:43 pm

Image this doesnt work in NW.JS
B
41
S
12
G
14
Posts: 1,122
Reputation: 11,282

Post » Sat Dec 26, 2015 4:50 pm

Is there anything this request works in?
B
41
S
12
G
14
Posts: 1,122
Reputation: 11,282

Post » Mon Dec 28, 2015 9:18 am

Is there a plugin that can live switch the scaling in node?
B
41
S
12
G
14
Posts: 1,122
Reputation: 11,282

Post » Mon Dec 28, 2015 10:04 am

You have to cancel the fullscreen-mode before you switch to another scaling mode.
Use Browser| Cancel fullscreen before you switch.
B
24
S
3
G
1
Posts: 454
Reputation: 2,171

Post » Mon Dec 28, 2015 10:18 pm

Asmodean wrote:You have to cancel the fullscreen-mode before you switch to another scaling mode.
Use Browser| Cancel fullscreen before you switch.

Thanks, that's working now, but it's really hit and miss if it switches. I'm trying to cycle the scales like so: Image
Is there a more robust way of doing this that forces a good, clean switch of scale?
B
41
S
12
G
14
Posts: 1,122
Reputation: 11,282

Post » Mon Dec 28, 2015 10:51 pm

I'm pretty sure you need to wait at least one tick before requesting fullscreen again to make sure fullscreen gets cancelled in time.
B
40
S
16
G
6
Posts: 543
Reputation: 7,649

Post » Mon Dec 28, 2015 11:18 pm

ErekT wrote:I'm pretty sure you need to wait at least one tick before requesting fullscreen again to make sure fullscreen gets cancelled in time.

Trying that by putting a wait 0.2 seconds between the cancel and the change variable, but it's still not always changing properly to the right scale mode, it seems to do one pass of all 5 scales okay, but on the second pass it stops doing certain ones properly.

EDIT: Works now! Image
B
41
S
12
G
14
Posts: 1,122
Reputation: 11,282

Post » Tue Dec 29, 2015 11:17 am

It's still a mess, I'm trying to use local storage to keep a record of the last set scale size, and it isn't loading properly at all on the start of the layout, the switcher isn't rock-solid and sometimes skips a scale size. Can anyone give me a nice sturdy example of how to cycle the fullscreen scale modes with a keypress AND restore the last used one on start of layout? I'm tearing my hair out here trying to figure out how to make this look good.
B
41
S
12
G
14
Posts: 1,122
Reputation: 11,282

Post » Tue Dec 29, 2015 2:24 pm

Look if this example works for you:
https://drive.google.com/file/d/0B5FlDY ... sp=sharing
B
24
S
3
G
1
Posts: 454
Reputation: 2,171

Next

Return to How do I....?

Who is online

Users browsing this forum: Cubeeo and 7 guests