Author Topic: Anchor stretches or overlaps other ui elements  (Read 3650 times)

johnessy

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 29
    • View Profile
Anchor stretches or overlaps other ui elements
« on: December 06, 2014, 06:35:12 AM »
Hi there.

This is probably a dumb question and there is probably an answer out there but i have not found it yet.

I used to just keep using my same old ngui as i was used to it but made the switch to the new version as i seen some tuts on your from michael and it just looked sick!

I am busy creating the ui for my game and am having trouble with anchoring problems.

When i anchor my objects sometimes depending on resolution my ui either get stretched vertically so it is very thin or stretched horizontally. Another problem is that when i anchor my objects and change the resolution they seem to overlap each other and not stay where i want them too.

Again probably a dumb question and probably very obvious but have been up for 30+ hours and my brain is dying.

Cheers

John

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Anchor stretches or overlaps other ui elements
« Reply #1 on: December 07, 2014, 12:20:30 AM »
My guess is you got your anchoring all wrong. By default you only see absolute values you can set, unless you choose "Custom" instead of "Left", "Right", etc. Custom lets you choose relative values, such as 0.3 being 30% from the left. Check the documentation for the UIWidget.