Author Topic: Simple Score  (Read 6850 times)

Cybrknight

  • Guest
Simple Score
« on: May 17, 2012, 08:48:30 PM »
Can I use NGUI without a panel for use as a score label, or is it more efficient to use something else?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Simple Score
« Reply #1 on: May 17, 2012, 10:02:49 PM »
You need to have a panel somewhere in order for the UI to work. It can be all the way down on your UIRoot if desired, but it has to be somewhere.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Simple Score
« Reply #2 on: May 18, 2012, 08:26:16 AM »
For a score panel, that usually changes every Update, you will want to put it into its own panel, so it doesn't redraw everything else in the panel as well.

Cybrknight

  • Guest
Re: Simple Score
« Reply #3 on: May 18, 2012, 12:55:03 PM »
Thanks Nicki,

So a panel is an area of the GUI that changes together? Also, would you use NGUI for a score, or something else?

Ferazel

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 150
    • View Profile
Re: Simple Score
« Reply #4 on: May 18, 2012, 02:10:01 PM »
Cybrknight - From what I understand a UIPanel is an area of UI elements that are rendered together. UIPanel allows for areas of UI to be clipped to areas and other spiffy functionality. You can definitely use a NGUI AnchorPoint/Panel/UILabel to render a score item or an item that changes frequently. Just if it is a part of an area that needs to have recalculated bounds or something with a changing value there may be overhead with that if there are a lot of other items on the same panel as the label.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Simple Score
« Reply #5 on: May 18, 2012, 08:26:54 PM »
In the latest game I worked on (http://forums.toucharcade.com/showthread.php?t=131148) all the GUI is done with NGUI. I recommend it. :D