Author Topic: UIWrap Content - compass  (Read 5021 times)

Alessaint

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 67
    • View Profile
UIWrap Content - compass
« on: April 14, 2014, 12:10:42 PM »
Hi,

what would we the best way to create a compass bar with UIWrap Content? What would I need to adjust to change its position within the Scroll view based on current camera heading?

Thanks.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIWrap Content - compass
« Reply #1 on: April 15, 2014, 09:14:10 AM »
What's a compass bar? Some pics might help.

Alessaint

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 67
    • View Profile
Re: UIWrap Content - compass
« Reply #2 on: April 15, 2014, 09:21:05 AM »
What I mean is is text stripe containing "W nw N ne E se S sw" at the top of the screen which scrolls horizontally as you change where your camera is facing. If you face North, the stripe will move so that  the "N" element is in the middle etc. So what I need is to know what value I can change to change x position of the row containing the elements within the scroll view - whatever I tried moved the row but it broke the wrapping function.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIWrap Content - compass
« Reply #3 on: April 15, 2014, 10:01:25 AM »
I wouldn't use the wrap content for that as you need to be the one who controls it based on some object's angle of rotation. Look at the code inside the UIWrapContent and write something similar that will simply move the 8 labels around within a clipped panel. It shouldn't even be a scroll view.

Alessaint

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 67
    • View Profile
Re: UIWrap Content - compass
« Reply #4 on: April 15, 2014, 10:27:06 AM »
Ok, I'll have a look. Thanks.