Button object run-time positioning

  • 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.
  • have you tried to put them on another layer that has parallax = 0,0?

  • Yes, they are in a text layer with parallax = 0,0 and scale rate=100 placed at top.

  • �Could layer have changed in runtime?

  • 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

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I don't know if you simply typed it wrong here or not but:

    ...Abutton SET X TO (WindowWidth)/2-(AButton.Width)/2

    Will not place it in the middle. "(WindowWidth/2)-(AButton.Width/2)" will.

  • This happens in browsers when you don't run in 100% zoom.

  • arcalaus, can you share your .capx?

    The shaking buttons bug is fixed in r99 - I guess you're still using r95.

  • 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...

  • It seems that the buttons do stay still once the browser is at the default zoom. I tested this using r99.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)