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

Pages: [1]
1
yep... soz :)

2
Good Day,

I am using the UIDragDropItem script ( 3.6.8 ) and I would like to receive a event when my object is moved to a new parent so I can perform some actions at this point.

The way I have done this is, in UIDragDropItem script in the method OnDragDropRelease (GameObject surface) I have added the following highlighted line

  1.             if (container != null)
  2.             {
  3.                 // Container found -- parent this object to the container
  4.                 mTrans.parent = (container.reparentTarget != null) ? container.reparentTarget : container.transform;
  5.  
  6.                 Vector3 pos = mTrans.localPosition;
  7.                 pos.z = 0f;
  8.                 mTrans.localPosition = pos;
  9.  
  10.                 SendMessage("OnSubmit", this.gameObject); <--- New line
  11.             }

Would this be something that could be added or is there a way of doing this already that I am missing?

Cheers,




3
NGUI 3 Support / Re: Scroll views issue since update to 3.5.7
« on: April 20, 2014, 06:13:04 PM »
Right that sorted the issue, really should have waited before ripping out my old version but the new one is better anyway so win win.

Also just on previous point, I have a label anchored (in editor) left aligned and top left pivoted, and when ever I execute the table the label grows along its x axis, however this only appears to occur when the label is on shrink content. I got around this by putting it on ResizeFreely.

Anyway cheers for the help and the prompt responses.

4
NGUI 3 Support / Re: Scroll views issue since update to 3.5.7
« on: April 20, 2014, 02:01:09 PM »
This is the code I was using perhaps you can see the error:

  1.         noFleetsDestroyed.leftAnchor.target = ScrollView.GetComponent<UIPanel>().transform;
  2.         noFleetsDestroyed.leftAnchor.absolute = 20;
  3.         noFleetsDestroyed.updateAnchors = UIRect.AnchorUpdate.OnEnable;

This is just the one I was attempting for my new version. (this code makes the noFleetsDestroyed x position continually increase).


Additionally you might wanna check out the tables execute (reposition method) every time i right click Execute items in the table grow in size along their X Axis. (also yep I cannot reproduce this on your quest log example. I have no idea what the differences is between the two of ours and why we are getting such random differences.)

5
NGUI 3 Support / Re: Scroll views issue since update to 3.5.7
« on: April 19, 2014, 01:21:35 PM »
Quote
Technically, that's what UITable is for. It's also what I use in the Quest Log example.

Indeed use them all over the shop including in this page, however I did not include them all inside one master table, not quite sure why... will change that.

Also yep, the right is -15 pixels from the scroll view edge, I have absolutly no idea why this would not work when setting things in code and would work when setting it in the editor. (i just tested it again to prove to myself im not going insane.)

Anyway if this is the way its supposed to work (not anchoring to the side of scroll views) and for the past month its just been working by accident, ill have to do it in another way, already got a few ideas.

6
NGUI 3 Support / Re: Scroll views issue since update to 3.5.7
« on: April 18, 2014, 05:27:37 PM »
The first item is only anchored (using advanced) to the right side of the scroll view only (that's the label I was referring to above) in code, If i do this from the editor it does not run off.

In other instances I anchor the items to the item above it to ensure everything stays in line, the top one is not linked to the top or anything like that, the first ones position is set using local position.

I was mainly wondering as this was all behaving in 3.5.6, what has changed? will it change back or will I need to find a new way of doing this, im only hesitant as it took me a fair while to get everything aligned correctly.

7
NGUI 3 Support / Scroll views issue since update to 3.5.7
« on: April 17, 2014, 01:45:07 PM »
Good evening,

I have been using the scroll view to allow the gamer to scroll through a fair amount of data containing labels, tables, grids, sprites the whole lot and all was working fine. I then updated from 3.5.6 to 3.5.7 and everything has started behaving very strangely.

And when I say strangely I mean the width decreasing to 0 and the widget running off the side of the screen until I select it in the Hierarchy (that seems to stop it moving for some reason).

To align all of my items within the ScrollView I set anchors and their appropriate absolutes, targets and updateAnchors In Code, and I have narrowed it down to this being the issue.

Basically I did what we all do and took everything out with the exception of one label with its anchors set in code, and lo and behold it exhibited the same weird issue. Take out the Anchors being set in the code and everything is stationary (not in the right place, but at least it aint running away).

Is this something that has changed? Should I not be doing it like this? Or is it a legitimate bug?

Cheers,

8
Is something like UITable of use?

9
NGUI 3 Support / Re: UI Root and stretch
« on: December 08, 2013, 12:27:30 PM »
Woke up and realized exactly that... only just got back online, was hoping no one had seen it... ahh well :)

10
NGUI 3 Support / Re: (!!!) Improving NGUI: Voice your opinion
« on: December 07, 2013, 05:35:12 PM »
Could buttons automatically have their colliders resized if the button's background size has changed, i.e. when the screen size is changed.


11
NGUI 3 Support / UI Root and stretch
« on: December 07, 2013, 05:32:06 PM »
Evenin,

First off let me just say that this is awesome gui system :-)

I think I may have noticed a bug in the 3.0.7 RC2.

I have a sliced sprite which I am using as my background, I set the sprites anchors to be Padded and then dragged in the 'UI Root (2D)' and everything appears to work fine (stretch wise). I then save the prefab (by dragging and dropping it back in to the project view) and remove it.

Now comes the bug, when I add that prefab back to my MainPanel the anchors on the sliced sprite that I intended to use as a background have disappeared.

Cheers for your assistance and keep up the good work.

Pages: [1]