Author Topic: Sprite and Text layering  (Read 4636 times)

tgraupmann

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 15
    • View Profile
Sprite and Text layering
« on: November 12, 2012, 03:50:34 PM »
Okay I'm using a couple components. I have some UISprites and some UILabels.

So I have 4 layers.

Layer 1: UISprite for an overall background
Layer 2: UILabel for some various text
Layer 3: UISprite for a sprite layer over some of the text, not all
Layer 4: More text that always needs to be on top.

My problem is that all the text either wants to be on top of everything. Or the text wants to be behind the background layer.

I've tried messing with the back and front ordering. And I've played with the z-order, z-depth.

Is there some workaround where I can draw some text, independent from the other text to put it onto its own z-depth?

Thanks,

~Tim

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Sprite and Text layering
« Reply #1 on: November 12, 2012, 07:12:03 PM »

tgraupmann

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 15
    • View Profile
Re: Sprite and Text layering
« Reply #2 on: January 03, 2013, 01:55:17 PM »
Let me expand on my first post to add that all the layers are using the same atlas.

Re-Reading the sticky and posts.

tgraupmann

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 15
    • View Profile
Re: Sprite and Text layering
« Reply #3 on: January 03, 2013, 01:58:14 PM »
I think I understand now Yoda.

If I want to sandwich text, the individual layers need to be on individual UIPanels and controlled via their transform z-depths.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Sprite and Text layering
« Reply #4 on: January 03, 2013, 06:15:42 PM »
Yup.