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

Pages: [1] 2
1
NGUI 3 Support / Re: Preventing click events to go through a UIPopupList
« on: November 06, 2013, 04:11:21 AM »
No Pro, just a normal Asset Store-bought license.
Thanks anyway, I'll see if I can switch to 3...

2
NGUI 3 Support / Re: Preventing click events to go through a UIPopupList
« on: November 04, 2013, 12:46:00 PM »
What version of NGUI are you using? The current latest version doesn't allow the click to propagate after clicking on a popup list item.

I'm using 2.7.something, and if I switch to 3.0 everything is broken, so this is not an option for me. For next game, yes! :)

Is it possible nobody encountered the problem before, and nobody posted a fix/solution?

3
NGUI 3 Support / Re: Preventing click events to go through a UIPopupList
« on: November 04, 2013, 08:09:34 AM »
Nobody has a hint?

4
NGUI 3 Support / Preventing click events to go through a UIPopupList
« on: November 01, 2013, 03:00:29 PM »
Hi guys,
how can i prevent click events to be propagated to checkboxes located below an UI Popup List? I have this situation:



1. initial situation
2. I click on the number 4, the list opens and covers the checkbox
3. I click on the item 1, the list closes, but the checkbox underneath has been unselected!

I'm using NGUI default events, specifically I assigned an handler for the Popup list in the UI Popup Script, and I'm generally using UI Button Message to specify custom handlers for the buttons that get accidentally pressed.

If I was in Flash, I would put something like event.stopPropagation in the click event for the list. Is there something similar for NGUI?

I'm using 2.7.0 and I can't switch to 3.0, sorry. I know it's not ideal, but I'd like to know if you have a solution for this. Thanks

5
Cool, the world needs to know!

6
Awesome. Thank you so much.

After loads of testing, I found out it works just fine. I did some testing because at first I wasn't seeing the avatars at all: the shader seemed not to work! The reason is, your version of the shader doesn't work if the panel that's rendering the avatars is not clipped, so when I imported it and substituted it to mine, the avatars disappeared completely.
(this is the line that was making them disappear: if (val < 0.0) col.a = 0.0; )

Now, I just need to use my version of the shader for non-clipped avatars, and yours for AlphaClip ones.

Thanks again Nicki!

7
Sorry, I haven't had time to look into this properly yet. I'm hoping to mess with it tonight when I get home from work. :)

Hi Nicki, have you had time to look into this shader? I'm really struggling with it!
Thank you!

8
Thanks a lot, Nicki, that'd be lovely.

9
Hi everyone, I'm having some issues with a clipped panel. As the title says, I have a panel that's draggable and clipped, which displays a list of GameObjects, each one composed of usernames, avatars, and some other text.

The avatars are not square, they have an hexagonal mask. To achieve this, they are Texture widgets with a special shader I found here. The shader works fine in general (you can see the avatars - all with the FB icon - are hex-shaped), but when they get clipped by the panel, they keep showing even outside the boundaries. Only when completely out of sight, they get hidden (probably the GameObject is disabled?).

Check the screen:


In my understanding the problem is the shader that doesn't support clipping, but I can't really write shaders, so I'm asking if any of you would be so nice to help me with this. As I said, the shader I'm using for those avatars is this. I think I just need a modified version of it, maybe mixed with NGUI's default "Unlit - Transparent Colored (AlphaClip)" for alpha clipping.

Thanks a lot!

10
NGUI 3 Support / Re: What's the usual way people deal with Atlas/Scene?
« on: August 15, 2013, 09:06:40 AM »
What do you mean exactly by "game's pics"? The textures?

11
NGUI 3 Support / Re: Clipping of Premultiplied Colored
« on: August 15, 2013, 01:42:20 AM »
When adding the background image to your atlas, uncheck the "PMA shader" option.

Just to be precise, this looks like the solution I wanted before... too bad that I switched to the Additive shader in the end, but it's good to know!
Basically you have to import a very low alpha image, uncheck the checkmark as you said, and when you bring the alpha of the panel to 0 the widget will turn white! Neat.

12
NGUI 3 Support / Re: Clipping of Premultiplied Colored
« on: August 13, 2013, 08:37:17 AM »
Hey Michael, nevermind my request... I decided to go with an Additive shader instead, gives more sense to the holographic panels!
Thanks anyway!

13
NGUI 3 Support / Re: Clipping of Premultiplied Colored
« on: August 12, 2013, 04:54:56 PM »
When adding the background image to your atlas, uncheck the "PMA shader" option.

Thanks, but that's not really what I wanted... if I uncheck the option you said and import a very low alpha image, I will get a very bright result but color is lost forever!

Look at the image I posted before. Both the white rectangle and the ones in the back (bluish, with thin lines) are the same sprite.
When alpha of the panel is 0, I got the white, solid one.
When alpha was 1, I got the (normal) semitransparent ones in the back.

This way I can tween the alpha from 0 to 1 and get a panel that appears in a flash of white!
Is it possible to do something like that? It's basically the effect the open poster described as a bug!

14
NGUI 3 Support / Re: Close A UI problem
« on: August 12, 2013, 03:00:31 PM »
I can close it but i cannot reopen it after that... :(

Why? If you SetActive(false), you cannot find it after that, but if you saved a reference to the panel before deactivating it, you can operate on it even if it's deactivated.

15
NGUI 3 Support / Re: Clipping of Premultiplied Colored
« on: August 12, 2013, 02:27:17 PM »
Hey guys. Here's my incredible request:

This morning I was happily working with NGUI, and I think I stumbled in the issue described above. The reason I say I think, is because at first I thought it was actually a feature of the Premultiplied Colored shader, to never go completely transparent, but to become white if the alpha went to 0.
In fact, I liked it. I have a game with an holographic interface, so the effect I tried to create was to fade in panels from full white, to their normal color, as if they were an hologram being projected (imagine the projector lights up and shoots a flash, then adjusts to normal color).

I was so happy with the result I even made screenshots:


In the image, the white projection is in the process of appearing: it is the same atlas as the others, just its UIPanel has the alpha to 0.3 or something, tweening to 1.

Now all of a sudden, the shader works fine, and when I tween the panel alpha to 0, it becomes transparent instead of going white. ALL OF A SUDDEN.

So, do you know of a way to obtain this effect again? I'm using the latest version of NGUI, 2.6.4 I think.
Also, I'm not using any panel clipping (Soft or Hard). I'm using the plain Premutliplied Colored shader.

Thanks!

Pages: [1] 2