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 - stacktrace

Pages: [1]
1
Misc Archive / Re: Shattered Throne, made with NGUI
« on: June 10, 2016, 12:49:32 PM »
Thanks for the great advice, I plan to do exactly that, and try to keep the EA period as short as possible.

2
Misc Archive / Shattered Throne, made with NGUI
« on: June 07, 2016, 11:12:14 AM »
Just released Shattered Throne today on Steam Early Access

http://store.steampowered.com/app/469710

NGUI was a major part of this project.  Many thanks to the entire Tasharen team, your support for this product is incredible and the documentation and sample scripts were referenced often and always helpful.

Thank you!

3
I have a project I recently updated to the latest version of NGUI (last week) and now my NGUI buttons keep forgetting their delegates.  So I have set them over again and sometimes they will work for one or two runs, but then I find it unset again (this is all within the same session).

I didn't see any other such complaints on this forum, so perhaps I am just doing something wrong.  The buttons I am setting with the issues are on Prefabs.  I have set the delegates both directly on the Prefab, as well as dragging the prefab into the scene, setting this instance and hitting the "apply" button in the inspector.  The problem continues regardless.

I think I will just end up setting the delegates in code, but wanted to post just in case their is an easy/obvious answer.


I almost didn't want to post at all, as I see how busy these boards are, and how responsive you are.  This is an amazing product, and I am amazed at the amount of energy you continue to put into it.  Thank you for this awesome tool!

4
NGUI 3 Documentation / Re: UIToggle
« on: December 23, 2013, 03:40:15 PM »
Excellent, thank you for the quick reply!

5
NGUI 3 Documentation / Re: UIToggle
« on: December 23, 2013, 02:34:20 PM »
Sorry that I was not clear, looks like I interchanged "list" for "toggle group".  Let me try again.

I have a group of UIToggle components each attached to a separate UIWidget.  There is also a separate UISprite which is set as the "State Transition Sprite" property of a UIToggle.  These are arranged from top to bottom on a window with a UILabel with a description that overlaps the UIWidget areas, but is not parented to them.  The UISprite mentioned above is just a little bullet, so that whichever UIWidge the player clicks on, the bullet sprite appears next to the label, showing which item is currently selected.

I believe this is a relatively simple and standard setup, and it works just fine (just to be totally clear, all of the UIToggle components have the same Group ID set).

Here is the issue.

What happens by default, is that each time the window is shown, the bullet appears next to the last item clicked on.  The window is not recreated each time, just being hidden and made visible.  I understand this behavior and totally expect it.  But I want to change it.

The behavior I want, is that each time the window is shown, I want the bullet to appear next to the top label.  As I understand it, because the bullet sprite is set as the "State Transition Sprite" of a UIToggle component, its visibility is controlled by that UIToggle's value property.


My code logic was to call a custom function each time the window was opened that looped through all the UIToggle components in the toggle group, and set their value property to "false" except for the top most UIToggle, which would be set to "true".  I thought that this would give the desired result of only showing the Bullet sprite associated with the top most UIToggle only.

What is happening however is that when the window is opened for a second time, two bullet sprites are visible, the one associated with the top UIToggle (as desired) and the one which was visible when the window was closed the last time (unexpected).  (Note: by "top" I mean Y position on the screen as the UIWidgets the UIToggles are attached to are arranged vertically).


What I hope to find out:

- Should my logic work (and I have a problem elsewhere, perhaps with the notify handler used by the UIToggles in the group)?
- And if not, can you suggest an alternate solution/workaround?


Hopefully this is clearer, and not muddled up worse. 

I thank you for your time and help.

6
NGUI 3 Documentation / Re: UIToggle
« on: December 22, 2013, 08:03:33 PM »
I have a popup window with a set of 6 Grouped UIToggle controls.  I want the currently selected UIToggle to be the first on the list everytime the window is opened, rather than the last control that was selected when the window was last closed.

I am currently using the following code snippet when the window is opened:

  1. _selectToggles[0].value = true;
  2.  
  3. for (_indx = 1; _indx < _selectToggles.Count; _indx++)
  4. {
  5.        _selectToggles[_indx].value = false;
  6. }
  7.  

Where _selectToggles is a List<UIToggle> of all the controls in the group. 

However, when the window is reopened, it shows the Sprite specified as the State Transition sprite (of the UIToggle script) visible for both the first item and the last item that was selected when the window was last closed.  (I do not have an Animation attached)

Is there a way to reset the UIToggle state to its start state, or somehow force it to hide its attached "on" sprite?

Pages: [1]