Author Topic: Mixing fonts and atlases  (Read 5023 times)

capitalj

  • Jr. Member
  • **
  • Thank You
  • -Given: 5
  • -Receive: 0
  • Posts: 88
    • View Profile
Mixing fonts and atlases
« on: June 07, 2012, 12:15:04 PM »
Hi,

Can we mix fonts and sprite atlases on one panel? ie: can I grab a font from Atlas A and a button from Atlas B? I've done it before but now I'm having the layer ordering give me problems where I can't move one of those above the other (so my text shows up underneath my button, etc..)

-JJ

ryan

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 90
    • View Profile
Re: Mixing fonts and atlases
« Reply #1 on: June 07, 2012, 01:30:58 PM »
You can mix them, but the panel can't use the widget depths to sort them if they're in different atlases.  (The panel combines everything from one atlas into one draw call, everything from the next atlas into another draw call, etc.)  You'll need to give your label a smaller Z position than the button to bring it closer to the camera, to get the font draw call to render on top of the button draw call.

capitalj

  • Jr. Member
  • **
  • Thank You
  • -Given: 5
  • -Receive: 0
  • Posts: 88
    • View Profile
Re: Mixing fonts and atlases
« Reply #2 on: June 07, 2012, 02:07:44 PM »
Ah, ok thanks for the help!