Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - DuaneDog

Pages: [1] 2
1
NGUI 3 Support / Re: Labels added to grid not repositioning
« on: March 05, 2014, 06:46:22 AM »
Update... I was able to get my labels left aligned with a pivot.

2
NGUI 3 Support / Calling Scrollview ResetPosition breaks scrollbars
« on: March 05, 2014, 06:45:24 AM »
After populating my scrollview I call Resetposition() to get the scrollview repositioned at the top. However when I do this the scrollbar stops working. If I go into the inspector while the game is still running and move the value slider... then the scroll bar starts working as it should. I've tried using code change the value of the scroll bar right after the resetposition() but it has no effect. Any suggestions?

DuaneDog

3
When I'm populating my scrollviews, right now I'm destroying all of them and then loading then reinitializing them to repopulate the scrollview. Once the list gets more than about 50 items you can actually see the performance hit. I'm curious if a better practice would be to use some kind of pooling so that at least after the first time they are made rather than creating and destroying them over and over they are reused?

4
NGUI 3 Support / Re: Show selected items in a scrollist
« on: March 05, 2014, 06:38:15 AM »
Excellent! Very helpful!

5
NGUI 3 Support / Show selected items in a scrollist
« on: March 05, 2014, 05:30:01 AM »
I'm getting closer to what I need. I've got a scroll list with my labels I've loaded from an array. They are centered instead of left justified but that is another issue. My next big question is how do I make it so I can select items in a scroll list. In the examples there is a lot on the paging, moving stuff around but I'm not seeing a real easy way to just make a list of items and then when one is selected it is highlighted in the list.

Thanks in advance for the help.

DuaneDog

6
NGUI 3 Support / Re: Labels added to grid not repositioning
« on: March 05, 2014, 05:05:47 AM »
Many thanks that got them in the grid... My next problem is still related to repositioning. All my labels are center aligned in the scrollview. How can I get them to align left? I've tried messing with anchors and other options and I can't find a simple "align left" or way to easily make it work with the grid control. Am I going to be better off hand positioning and ditching the grid control altogether?

7
NGUI 3 Support / Labels added to grid not repositioning
« on: March 04, 2014, 10:38:09 PM »
Greetings,

I'm using the following code:

  1.  foreach (string CurrentValue in ShowList)
  2.         {
  3.             UILabel AddLabel = (UILabel)Instantiate(_uiLabel, transform.position, transform.rotation);
  4.             AddLabel.text = CurrentValue;
  5.             GameObject ItemAdded = NGUITools.AddChild(_uiGrid.gameObject, AddLabel);
  6.            
  7.         }
  8.         _uiGrid.Reposition();

The labels get added to the screen and are populated with the right text... but they are all bunched up. Should not the grid control getting called with reposition override the transforms on the label? I know I'm missing something simple... I think!

Thanks in advance,

DuaneDog

8
NGUI 3 Support / Best control for list of states (~50 items in list)
« on: March 03, 2014, 02:20:37 AM »
I'm curious from a UI standpoint how NGUI would best implement asking for the users state from a list box? I was going to use the popup but I think doesn't work well on mobile and may not scroll properly. I'd just like to know what a best practice or idea would be to let a user pick from a list about 50 items long.

All the best,

DuaneDog

9
I ended up using the legacy message event script to handle this.

10
NGUI 3 Support / Best way to make controls active / inactive?
« on: March 02, 2014, 05:42:54 AM »
The problem I'm having is that when ever the controls get populated with data inactive text color seems to get change to white. What is the best way to toggle a set of uiinput fields from enabled to disabled and have it so the end user can tell so they are not trying to edit fields that are disabled?

11
I have a simple first, next, back, last navigation panel. So four buttons inside a panel. What is the best way to trap the click events in the parent script? Or do I need to make a script for each individual button?  I know this is probably very simple but I'm having a hard time tracking down specific documentation on the best practice.

12
NGUI 3 Support / Re: Progress bar with Minimum/Maximum range indicators
« on: February 18, 2014, 02:15:47 AM »
Many thanks for the reply. I got this working quite easily by just using labels with "<" as the text and then just using a transform.localposition vector3 kind of deal to move then as necessary. One of the cool things is having them local is the math was much easier than I anticipated.

13
NGUI 3 Support / Progress bar with Minimum/Maximum range indicators
« on: February 17, 2014, 03:01:38 AM »
I have a need to have a progress bar that shows the current value for my speed... but I want to have a visual minimum and maximum indicator on the progress bar. Like a small little triangle at the .30 mark and another small little triangle at the .70 mark. The player will only get credit when between those two values. I am handling the game logic but was hoping someone could tell me if something like this is built into NGui or how to go about creating this functionality.

14
NGUI 3 Support / Re: Compile errors after updating NGui and HudText
« on: February 01, 2014, 10:39:35 PM »
It seems that much of the problem in trying to recover this project is that even when I make a new scene... Unity can't stop throwing errors on all the scripts that have absolutely nothing to do with the new scene. Is there perhaps some utility or tool that can allow Unity to stop trying to compile scripts that are already broken so that I can get a new scene going, re-import NGui and then go on from there? It seems NGui can't get installed because all the errors.

My main mistake I believe was that the upgrade with one of my scenes rather than an empty scene. When I deleted NGui it killed the scripts out from under my UI. Even now I have never seen the NGui menu again in this project. I believe that is because Unity won't just worry about the compiler errors in the scene that is open but with any scene in the project. So I have been caught in a big vicious circle.

A screenshot shows you how my scripts in my NGui UI look now in my scenes. Deleting Ngui, re-importing, all that stuff... I think as long as my scene lives in the project with all those compile errors Ngui will never install right.

I expect no matter what it's going to be  alot of work for me to  fix this. My UIHandler script that is in the screenshot attached had a lot of objects tied to it using that drag and drop method. I can't possibly imagine how they will ever get wired back up magically. Across 5 scenes and that is painful. But I now wonder if it is recoverable at all.

Another thing I know for sure from this pain... NEVER ever EVER, use the drag and drop object on to a property thing to build up your system. It's burned me a few times before but if I had used scripts to create my objects and tie them together I probably wouldn't be so worried about how I'll get his all working again. The NGui scripts are one thing but all my custom scripts I had on these same NGui objects seem to somehow get abandoned.

15
NGUI 3 Support / Re: Compile errors after updating NGui and HudText
« on: February 01, 2014, 10:16:52 PM »
One more small thing I've noticed. It seems the Javascripts are having more of a problem. My C# scripts seem to have no problem resolving the references.

Pages: [1] 2