Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Quakeulf on May 26, 2013, 09:24:21 AM
-
Hi,
Thank you so much to those who helped so far. :3 I have google'd around a lot but not yet found anything to answer my questions, so I found I must ask here.
Question 1:
How do I make a pop-up block the buttons behind it so that they cannot be clicked? I want it so that the buttons on the pop-up message are the only clickable buttons and the ones below it are not clickable. I am using a "fill" object with an UIStretch that fills the whole screen on top of the other buttons you are not supposed to click together with Z-indexing it way in front of them, but it does not work. I have checked the button collision detectors and they are behind on Z.
Question 2:
How do I add input delay to a button? I want it so that you can only click a button once every X seconds. (This should be easy, but I am new to this...)
Thank you all very much in advance for helping out. :3
-
1. Add a big collider covering them. This generally goes onto the window's background.
2. In OnClick disable the collider, then enable it again X seconds later.
-
Great! I'll try that. Thank you for your help. :3
-
1. Add a big collider covering them. This generally goes onto the window's background.
And if this didn't work ? There are some logic sequence about how ngui decides which colliders are in front and which ones are behind ?
-
It's depth-based. Create a widget (ALT+SHIFT+W) and give it a collider. Its depth controls the order.
-
It's depth-based. Create a widget (ALT+SHIFT+W) and give it a collider. Its depth controls the order.
[Solved]
Looks like the problem was on UIButton didn't have any UISprite on it. I've been forced to put an empty sprite to set the appropriate depth.