Author Topic: Scaling to fill the screen with the new UI Anchor>  (Read 5998 times)

sintua

  • Jr. Member
  • **
  • Thank You
  • -Given: 7
  • -Receive: 0
  • Posts: 63
    • View Profile
Scaling to fill the screen with the new UI Anchor>
« on: August 28, 2012, 03:33:57 PM »
This is more of a design question, I think.

The program is set on portrait only. I have a "Landscape" (a 16:9 image) that I want to scale out to the width of the phone screen, taking the full width, and the height being whatever the scaling brings it to. Then, I'd like to create a panel attached to the bottom of that Landscape, width also filling the screen, and extending all the way to the bottom of the screen (i.e. height - height of the Landscape).
In theory these two elements should then always fill the screen, with no dead space around them.

With the GUI scaling function only "scaling to height", how would I set it up to scale to screen width?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Scaling to fill the screen with the new UI Anchor>
« Reply #1 on: August 28, 2012, 03:40:26 PM »
Don't scale the width, skewing your UI will just look plain weird. Instead make your UI out of modular components attached via different UIAnchors. For example, chat window anchored to bottom left, skill bar anchored to bottom, minimap anchored to top right, etc.

sintua

  • Jr. Member
  • **
  • Thank You
  • -Given: 7
  • -Receive: 0
  • Posts: 63
    • View Profile
Re: Scaling to fill the screen with the new UI Anchor>
« Reply #2 on: August 28, 2012, 03:45:57 PM »
That style of UI placement only tends to work if the UI is complementing a central scene (for example, the WoW UI elements around the 3d world view).
I don't have such a central scene; the entire game view is composed of the UI elements. the only thing behind them is dead screen space.

For reference:

Note the dead space on the top and bottom... and this only fits on this particular set up. on other screens it could have dead space on the sides, or even be cut off on the sides.
« Last Edit: August 28, 2012, 03:50:59 PM by sintua »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Scaling to fill the screen with the new UI Anchor>
« Reply #3 on: August 29, 2012, 09:06:56 AM »
You could try using UIStretch to automatically resize components based on the screen resolution.