Button object run-time positioning

Discussion and feedback on Construct 2

Post » Tue Jul 17, 2012 10:47 am

Hi!

I use run-time positioning to take care of window resizing.

Everything uses to work OK, but Button positioning does not work when I preview with Chrome (Internet Explorer uses to run OK).

Try this in chrome:

-Put three buttons (say Abutton, Bbutton and Cbutton) at
(292, 297), (292, 327) and (292, 357). Size:127,24.
- On Start of layout, I move each button using this action:
Abutton SET X TO (WindowWidth)/2-(AButton.Width)/2
Bbutton SET X TO (WindowWidth)/2-(BButton.Width)/2
...

- ON CHROME, each button appears on a different X position (they should be centered) and shakes slightly. On Explorer, It runs right but the buttons shake also (they shake even afterputting the SET X TO into a "Run Once" event).

- I tried disabling/enabling pixel rounding, webgl and linear sampling.



arcalaus2012-07-17 10:49:07
B
39
S
11
G
5
Posts: 132
Reputation: 8,228

Post » Tue Jul 17, 2012 10:52 am

have you tried to put them on another layer that has parallax = 0,0?
B
45
S
15
G
6
Posts: 795
Reputation: 11,935

Post » Tue Jul 17, 2012 11:29 am

Yes, they are in a text layer with parallax = 0,0 and scale rate=100 placed at top.
B
39
S
11
G
5
Posts: 132
Reputation: 8,228

Post » Tue Jul 17, 2012 11:43 am

Could layer have changed in runtime?
B
39
S
11
G
5
Posts: 132
Reputation: 8,228

Post » Tue Jul 17, 2012 12:03 pm

hmm you can change object layer like changing him from layer1 to layer2 with move layer action , about chrome and IE put some pictures how they looks on each of them and if you can upload capx it would be easier to help you
B
45
S
15
G
6
Posts: 795
Reputation: 11,935

Post » Tue Jul 17, 2012 12:28 pm

I don't know if you simply typed it wrong here or not but:
[QUOTE=arcalaus]...Abutton SET X TO (WindowWidth)/2-(AButton.Width)/2
[/quote]
Will not place it in the middle. "(WindowWidth/2)-(AButton.Width/2)" will.
B
73
S
20
G
10
Posts: 524
Reputation: 9,896

Post » Tue Jul 17, 2012 2:34 pm

This happens in browsers when you don't run in 100% zoom.
B
16
S
6
G
6
Posts: 100
Reputation: 4,840

Post » Tue Jul 17, 2012 2:42 pm

@arcalaus, can you share your .capx?

The shaking buttons bug is fixed in r99 - I guess you're still using r95.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Wed Jul 18, 2012 11:18 am

I was using r99. I think this could be caused by zooming, as julmust says.
Here is my last discovery:
Everything is allright in an exported website (where everithing is smaller), while problem persists at preview. That's funny since I'm using the same browser for preview...

B
39
S
11
G
5
Posts: 132
Reputation: 8,228

Post » Wed Jul 25, 2012 5:21 pm

It seems that the buttons do stay still once the browser is at the default zoom. I tested this using r99.
B
26
S
5
G
1
Posts: 10
Reputation: 2,836

Next

Return to Construct 2 General

Who is online

Users browsing this forum: bilgekaan, chadorireborn, digitalsoapbox, nedzad and 11 guests