Author Topic: Quest Log Example - UISprite instead of UILabel?  (Read 1600 times)


  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Quest Log Example - UISprite instead of UILabel?
« on: May 14, 2017, 09:56:00 AM »
First off, I love what you have done with NGUI.  Very nice!  It will definitely get a great review from me in the Asset Store!

So the quest log in the example is a good starting place for what I want to do.  I am learning NGUI stuff while modifying it.  My project is not actually a "game" but more of an app.  I'm targeting desktop only.  I have a HUGE amount of text.  In order to be able to display all the text (which never changes),  I have created images of the text blocks in photoshop and built sprite atlases from them.  The sprites are all Full Rect instead of Tight.  This way, I get my text with minimal verts.  The only problem this may create is that my atlases will all be pretty large; like 40-50MB.  (Maybe you have an alternative suggestion?)  I have replaced the UILabel parented to the tween (in one of the quest items) with a UI sprite containing an example fo my text.

My current conundrum is this: (See my screen shot)

1. When I play the game everything looks fine.
2. When I click the top quest button it runs the tween and opens but the button shifts down and to the right for some reason.
3. When I click the quest button again the tween runs and closes but the button stays shifted to the right.

I can't figure out what is causing this and how to fix it.


  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Quest Log Example - UISprite instead of UILabel?
« Reply #1 on: May 19, 2017, 04:52:45 AM »
The quest example uses a table to position child UI elements. This only works if there is no anchoring involved, and for basic widgets. If you have complex objects, results may be undefined, depending on how they are set up. Check your button's set up -- make sure it's not anchored and that all of its widgets use the pivot point other quest log's widgets do.