0 Favourites

resizable interface according to the screen size?

  • Hello everyone!

    Well, i recently saw a lot of games using this style of interface but i dont really know how to get a interface that always stays in the corners of the screen, the only interface i know how to do is a layer with parallax in 0,0 but i know that there is a way to do this:

    (red dots are the interface)

    <img src="http://i.imgur.com/cYluegp.png" border="0" />

    Does someone know how to do that?

  • Hi,

    i think its calulating the x,y positions of the interface objects according to the "WindowWidth" and "WindowHeight" system variables.

    For example:

    positioning the right top object to:

    y: YOffset

    x: WindowWidth - ObjectWidth - XOffset

    Where as the offsets define how far from the edge the object should be

    Same goes for the others:

    right bottom:

    x: WindowHeight - ObjectHeight - yOffset

    y: WindowWidth - ObjectWidth - XOffset

    left top:

    y: yOffset

    x: xOffset

    left bottom:

    y: WindowHeight - ObjectHeight - yOffset

    x: xOffset

  • Construct2 has the anchor-behaviour for this..

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • thanks! i ll try to do it by the 2 methods :)

  • it works! thanks!

  • Hi,

    i think its calulating the x,y positions of the interface objects according to the "WindowWidth" and "WindowHeight" system variables.

    For example:

    positioning the right top object to:

    y: YOffset

    x: WindowWidth - ObjectWidth - XOffset

    Where as the offsets define how far from the edge the object should be

    Same goes for the others:

    right bottom:

    x: WindowHeight - ObjectHeight - yOffset

    y: WindowWidth - ObjectWidth - XOffset

    left top:

    y: yOffset

    x: xOffset

    left bottom:

    y: WindowHeight - ObjectHeight - yOffset

    x: xOffset

    i got a question,

    what means XOffset and YOffsets?

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