Author Topic: Press event not registering when alpha is zero  (Read 2488 times)

turkeypotpie

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 10
    • View Profile
Press event not registering when alpha is zero
« on: June 22, 2014, 09:01:51 PM »
I have a background sprite with a collider attached that fills the entire screen.

If I click on it, I correctly receive the OnPress event.

However, if I set the sprite's alpha to zero, I no longer receive the press event.  What would cause this?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Press event not registering when alpha is zero
« Reply #1 on: June 22, 2014, 11:48:26 PM »
When the sprite's alpha is zero, it can no longer capture events because it's effectively hidden.

If you want an invisible area that's capable of capturing events, use a widget instead (ALT+SHIFT+W).

turkeypotpie

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 10
    • View Profile
Re: Press event not registering when alpha is zero
« Reply #2 on: June 22, 2014, 11:55:54 PM »
Cool.  Thanks for the help.