Author Topic: Make two left-bound anchors stand next to each other, not on top  (Read 2970 times)

Vicas

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 8
    • View Profile
Make two left-bound anchors stand next to each other, not on top
« on: February 14, 2013, 07:17:52 AM »
Hi.

I am trying to juxtapose two left-bound anchors next to each other instead of having them on top. The reason is that the content of the leftmost of the two is dynamic, so the width is not always the same.

The issue is a credit-counter, with the word "credits" next to it.

Label: '1000' - 'Credits'
Label: '0' - 'Credits'

I would like the 'Credits' to always be the same amount of pixels next to the number.

With regards,
Vicas

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Make two left-bound anchors stand next to each other, not on top
« Reply #1 on: February 14, 2013, 01:54:41 PM »
Use only one anchor, with a table underneath it (with the table having two cells).

Vicas

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: Make two left-bound anchors stand next to each other, not on top
« Reply #2 on: April 02, 2013, 07:25:34 AM »
What's a table? Im using Unity 3.6 - is this something in NGUI for Unity4?

EDIT: Nevermind, I found the UITable and UIGrid scripts in the package.. This was not a part of my context menu for some reason! :S
« Last Edit: April 02, 2013, 07:41:56 AM by Vicas »