Author Topic: The button is shown top, but not clicked.  (Read 2710 times)

Arken

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
The button is shown top, but not clicked.
« on: January 27, 2016, 08:37:00 AM »
I made a simple example for this and I was remove NGUI library from my example before upload. So you must Import NGUI Library for execute this example.
(I'm using latest version ngui)

I can't write English well, so this example is more helpful for explain my condition.
You can see what I'm saying just click Play on unity.

You can download from here,
https://www.dropbox.com/s/okfm958qtmlv67c/NguiSimpleTest.zip?dl=0

Problem happen when using NGUITools.BringForward().
You can disable use NGUITools.BringForward by Project/UIMessageBox-UIPopup(script)-Check "Do Not Bring Forward".
When disable it, problem not happen.

How can I click button when this condition?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: The button is shown top, but not clicked.
« Reply #1 on: January 28, 2016, 11:00:20 PM »
To bring a panel forward all you need to do is change its depth to a higher value than other panels. NGUITools.BringForward is for bringing forward a group of widgets -- it's mainly an editor function.

That said, what's the purpose of bringing something forward anyway? You should set up your panel depths as you need them. If something should be in front, give it a higher depth. Popup list has an option to automatically get created on a high depth panel, for example.