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

Pages: 1 2 [3] 4 5
31
NGUI 3 Support / Re: Pickers - anyone interested?
« on: June 30, 2013, 02:43:57 PM »
Hi,

Sorry for the late reply, busy year and no interest for the full first month after my initial post...

I had time in february, now very little of the precious intangible is left until mid August.

Anyway, here's a build of the date picker, don't expect anything nice graphically!

Demonstrates recycling 5 labels whilst displaying 3, as well as displaying 5 wilst recycling 7.

Very much WIP, needs an option to tween to center label instead of snapping, as well as some Clamps to avoid problems when swipes are too fast.

It's probably pretty useless to show something that I can't polish before 90 days from now, but anyway, here it is...

Cheers,

Gregzo

[EDIT] silly me, doing things too quickly, linked to a .app... One mourning to give it a bit of work, will post later.

Apoligies to those of you who downloaded.

G


32
Hi,

Labels don't display one of my fonts properly anymore, all I get is a jumble of shapes seemingly taken at random from the atlas.
I've checked the atlas, the font is still there. Tried rebooting, nope.

Only one of the fonts is screwed up. Weird thing : it still displays fine on iOS.
Last thing I did before it happened was to import FingerGestures.

Any clues? I could re-import the font but am scared it'll mess up all my labels.

Thanks in advance for your help,

Gregzo

Edit : Solved. When selecting the font prefab, the Import Font field always displays "None ( Text Asset ) ". Dragging the font's text asset there solved it. Still no clue as to what happened, though...

33
So it's just a fluke that my workaround works?

It is quite handy to start a press on one collider, and to have the drag affecting another.

In my use case, long press on an icon instantiates a hollow version of it which I then drag around...

34
Hi,

It seems that setting UIDragObject's target at runtime doesn't work properly. Strangely, if it is never allowed to be null, and never disabled/enabled, everything's fine.
In the following example, I'm trying to start dragging a transform after a long press on another. The hacky workaround I'm using involves setting up a decoy transform, hmm...
Surely I'm missing something? Setting the target in OnPress(true) works fine too, problems arise when press and setting the target are seperate.

Many thanks for your help,

Gregzo

  1. public Transform targetTransform; // not the receiving collider's transform
  2. public Transform decoyTransform; // assign an empty go in the inspector
  3.  
  4. UIDragObject uiDragObject;
  5.  
  6. void Awake ()
  7. {
  8.       uiDragObject = gameObject.AddComponent ( typeof ( UIDragObject ) ) as UIDragObject;
  9.       //uiDragObject.target = decoyTransform; //Uncomment this line, and it works fine.
  10. }
  11.  
  12. void OnLongPress () // custom long press
  13. {
  14.      uiDragObject.target = targetTransform;
  15. }
  16.  

35
NGUI 3 Support / Re: Serious question -- NGUI 3.0?
« on: March 24, 2013, 05:01:13 AM »
I agree that timing is the main factor here. If NGUI 3.0 is out much earlier (4+ months) than Unity GUI, I'd definitely buy on day 1.

If it's just a month or two early, I don't really see the point. Though I'd be extremely interested in seeing NGUI 3.0's code, as I've learnt so much from digging into previous releases.

36
Hi,
I've recently coded a picker that could suit your needs. http://www.tasharen.com/forum/index.php?topic=2911.0.
Recycling objects in the picker, one at a time, only 2 more objects than displayed needed.

37
NGUI 3 Support / Pickers - anyone interested?
« on: January 29, 2013, 03:44:34 PM »
Hi to all,

I've just made a few pickers for NGUI after seeing that no usable NGUI picker existed in the Asset Store. If there's enough interest, I'd polish and sell them for a very decent price.
They're modelled after iOS pickers - swipe to pick, next and previous element visible.

What I have :
1)Text picker : pass it a string[], swipe to pick. Access textPicker.selectedIndex to access the user selected index in the array you passed, or textPicker.selectedString to directly access the string.
2)Date picker - pass it a System.DateTime, swipe to pick. Example : datePicker.Init(System.DateTime.Now) will set the picker to the current date. Access datePicker.selectedDate to get the user selected date as a DateTime object.
3)Number picker : pass it a min number, a max number and a step value. Example : picker with even numbers from 26 to 88 : numberPicker.Init(26,88,2);

For the moment, the pickers use 5 UILabels which are recycled for best performance (no Instantiate). 3 of the 5 labels are always visible, and the picker is "infinite" (loops).

Features I could add, do give feedback if you're interested!
A)Choose how many items you want visible at once.
B)Sprite picker (pass it an array of UISprite or UIScaledSprite)
C)Sprite+String picker (useful if you need an icon and some text in the picker)
D)Horizontal pickers (rarely used afaik)

Cheers,

Gregzo


38
NGUI 3 Support / OnTouchEnter - suggestion
« on: January 29, 2013, 03:24:15 PM »
Hi to all,

I've recently modified UICamera.cs so that objects on specified layers receive OnTouchEnter(bool enter) events. Very handy when one needs to be able to slide from one object to an other (slide on the keys of a keyboard, for example).
Is there a chance of seeing that feature in a future update?

I've seen stickyPress has made its entrance, but don't really understand what it does. Forum search hasn't helped much... If it achieves what I'm proposing, apoligies.

Cheers,

Gregzo

39
NGUI 3 Support / Fed up with res problems on apple devices
« on: September 01, 2012, 12:06:34 PM »
Just kidding!

NGUI is amazing, I just realized that without doing anything, UI's get rescaled according to Screen.height and Screen.width (ratio maintained), even if UIRoot.automatic is false and manual height is set to 1536 (iPad3).

Very convenient to test out things before making a seperate atlas.

Congrats to Aren. NGUI is by far the best buy I've made on the asset store.

Gregzo

40
NGUI 3 Support / Re: [SOLVED] Problem with colliders' depth...
« on: August 29, 2012, 03:30:24 AM »
Solved :

I was confused because adjusting the z of panels follows the "greater the z, further away" rule, but adjusting the z's of colliders in a panel follow the opposite rule (just like sprites' depth property).

I'm sure there's a good reason, but I doubt I'm the only one to have lost some time on that one...

41
1) Use the Atlas Maker tool to make your own atlas

2) Widget Tool -> when you create a widget, select your atlas and your sprite

3) Be careful not to mix 2 atlases in the same UIPanel.


42
NGUI 3 Support / [SOLVED] Problem with colliders' depth...
« on: August 29, 2012, 02:25:58 AM »
Hi!

Here's my problem : I need to sort the depth of overlapping colliders in the same panel. Trouble is, the colliders aren't attached to sprites, so no way to change the depth property. Tried all sorts of Z-eding around, nope.

Anyone can help?

Cheers,

Gregzo

P.S. : Because of nesting, I can't add the collider to the sprite itself (structure : parentObjWithCollider->childrenSprites)

43
Hi Aren,

Thanks. I haven't updated since mid june, so it wasn't wher you mentioned, but I was able to add a yOffset property quite easily thanks to your scripts clarity.

Will you add that as well as a pivot public var in the next update?

Cheers,

Gregzo

44



Hi!

So, I'm customizing popupLists (menu in this case, as the label isn't updated).

The original label is "Options". The bottom image shows a popped list above, and is what I'm aiming for. The top image shows the same, but with a downwards popping list: not quite right... My background sprite is exactly the mirror image of the working one.

It just seems the instantiated drop-down list is not positioned at the same distance in the above and below cases.

Also, even if my label's pivot is Center, the labels in the instantiated Drop-Down list all have left for pivot.

It would be great to be able to control : a> y distance of drop down list to object - b> pivot of drop-down list's labels

Cheers,

Gregzo

45
NGUI 3 Support / Re: Selecting UIInput widget by code?
« on: August 15, 2012, 04:34:54 AM »
Ha! That simple... Thanks,

Gregzo

Pages: 1 2 [3] 4 5