align HUD, and pop out menus in full screen mode?

0 favourites
  • 5 posts
From the Asset Store
Relax and relieve stress by popping bubbles in Fidget Anti- Stress Releaser!
  • Hello

    I have been searching the forums, and tried everything I could think of with no luck.

    Is Construct 2 capable of aligning the HUD, and or pop out menus to the right, bottom, top center, or bottom center in full screen mode on all sizes of computer screens accurately?

    If so how would you go about doing this?

    If not is this planned in the future, or is this something I would have to try and write a plugin for?

    For example what I mean is when I align something like a health bar to the right side of my screen on a game layout size of 2000px X 2000px. It shows up where it is suppose to be. But when someone with a larger screen views the game it shows up in the middle of the screen, and a smaller screen you have to scroll to the right to see it.

    I don't have a .capx because I am still coding the php scripts for the game I want to make. But here is a example picture of what I am asking?

    <img src="http://i51.tinypic.com/x0vif7.jpg" border="0" />

    The game in the picture above shows up the same on any screen size.

    If this has already been discussed I apologize for not finding it but could you link me to it please?

    Any help on this matter would be greatly appreciated.

    Thank you

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Instead of hardcoding the coordinates, you should use the System expressions WindowWidth, WindowHeight, scrollx, and scrolly. Scrollx and scrolly give you the the x and y of the camera(so the position scrollx,scrolly is the center of the screen). WindowWidth/Height are self-explanatory.

    So, if you want the right edge of the screen, you'd say scrollx+WindowWidth/2... which is,the center of the screen, plus half the width of the screen. Same for the left edge except a - instead of a +, and same principles work for the top/bottom edge as well. Using these instead of specific numbers should line up everything no matter how big the screen is. <img src="smileys/smiley1.gif" border="0" align="middle" />

    NOTE: Of course, I could be wrong. But in my limited use of these expressions, it's work out for me just fine. <img src="smileys/smiley17.gif" border="0" align="middle" /> Someone smarter can correct me if I'm wrong!

  • Actually... it seems like the new release for Construct has built-in features to handle this very thing. That's probably worth looking into. <img src="smileys/smiley17.gif" border="0" align="middle" />

  • Thank you very much SullyTheStrange. <img src="smileys/smiley1.gif" border="0" align="middle" /> That makes complete sense to me. I was going about it all wrong again.   <img src="smileys/smiley6.gif" border="0" align="middle" />

    There's a new release out already. And it has built-in features to handle this you say. <img src="smileys/smiley4.gif" border="0" align="middle" />

    I don't know what I like more this incredible piece of software, The mind behind it, or the great community support. <img src="smileys/smiley1.gif" border="0" align="middle" />

    Thanks again SullyTheStrange for your help. It is much appreciated. <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Yes, the Anchor behavior (new in r64) should do this for you. If you need more advanced alignment, as SullyTheStrange said the WindowWidth and WindowHeight expressions are the way to go.

    Make sure all your UI stuff is on its own layer, and set the parallax to 0,0 or the game's scrolling will mess up the positioning of UI objects.

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