Author Topic: Newbie Questions  (Read 2119 times)

Flasheart

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 4
    • View Profile
Newbie Questions
« on: September 14, 2014, 01:26:10 PM »
Hi all,

I have had NGUI for a while now and finally taking time to learn it. I have however found some confusion and need a little help.

1. Can someone steer me to examples of making a player HUD that sits at the bottom of the screen all the time. I can't seem to find how to do this or not understanding... I set up the UI root, and it shows, but it only show the character on a blue screen, no terrain etc. Obviously I have missed something. I want the player basic stats and such to be visible while playing.

2. Is it possible, to build a dynamic table for items. For example item bag has several items in it and wish to check the bag for an item count, then build a table showing all items in the bag in the inventory window. Can't seem to find any way of doing this within NGUI. The table contents will vary depending on the number of items in the bag.

3. Would also like a pop-up moveable window to show when an Item is picked up. The window of course has options of what to do with the item such as drop, keep, use, equip etc.

Any help is appreciated

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Newbie Questions
« Reply #1 on: September 14, 2014, 05:24:38 PM »
Take a look at the scenes inside the Example folder of NGUI. There's examples of the things you're asking about. Much easier that way, then to explain it here in mere words. :)

nzen

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 30
    • View Profile
Re: Newbie Questions
« Reply #2 on: September 16, 2014, 07:47:16 AM »
  • You should have UI Root > Camera > Panel. They have to be on NGUILayer, and make sure the Camera's Culling Mask is only NGUILayer.
  • Select Panel and go to NGUI > Create > Widget. Rename it BottomBar. Anchors > Unified. Reset everything to zero (Left > Target's Left > 0, and Right > Target's Right > 0, etc).
  • Change anchor Top to Target's Bottom > 100. Now it's 100 from the bottom of the screen always.
  • Select BottomBar then go to NGUI > Create > Sprite. Then go to Anchors > Unified. Reset them all again and it will be the same shape as the BottomBar box.