Author Topic: NGUI Popup list on click instead of on press?  (Read 404 times)

Wumpee

  • Jr. Member
  • **
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 53
    • View Profile
NGUI Popup list on click instead of on press?
« on: March 19, 2017, 07:42:35 PM »
Would it be possible for you to add a mode to popup lists so that the item is selected on click rather than on press?

This functionality is desirable in many cases where you don't want mouse release events to fall through.

A simple toggle to select the mode of operation would be fantastic.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 336
  • -Receive: 1160
  • Posts: 22,121
  • Toronto, Canada
    • View Profile
Re: NGUI Popup list on click instead of on press?
« Reply #1 on: March 21, 2017, 04:20:52 PM »
You have the source code for the popup script. Just modify it to suit your needs.

Wumpee

  • Jr. Member
  • **
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 53
    • View Profile
Re: NGUI Popup list on click instead of on press?
« Reply #2 on: March 21, 2017, 05:41:38 PM »
You have the source code for the popup script. Just modify it to suit your needs.

I already have. I was suggesting that it might be nice for you to add for others so that everyone doesn't have to re-write the same solution.

Also, that was a bit of a rude response since it's pretty obvious that anyone can just modify the script themselves.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 336
  • -Receive: 1160
  • Posts: 22,121
  • Toronto, Canada
    • View Profile
Re: NGUI Popup list on click instead of on press?
« Reply #3 on: March 26, 2017, 07:30:27 AM »
I did actually :P -- I added a drop-down that lets you choose whether it will react to a press or a click.

I was just saying it's a super trivial change to swap OnPress to OnClick. Only two lines have to change.

Wumpee

  • Jr. Member
  • **
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 53
    • View Profile
Re: NGUI Popup list on click instead of on press?
« Reply #4 on: March 26, 2017, 07:45:26 PM »
I did actually :P -- I added a drop-down that lets you choose whether it will react to a press or a click.

I was just saying it's a super trivial change to swap OnPress to OnClick. Only two lines have to change.

That's really good to hear, and thank you for being so responsive to everyone.