Author Topic: UIPlaySound doesn't support controllers (fix)  (Read 2622 times)

AeornFlippout

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 46
    • View Profile
UIPlaySound doesn't support controllers (fix)
« on: January 28, 2014, 04:08:37 PM »
It seems UIPlaySound with the "OnMouseOver" doesn't trigger when the button is selected - and there doesn't appear to be an option to enable this that I can see.

Here's the fix I employed, which mirrors the functionality in UIButtonColor:

protected virtual void OnSelect (bool isSelected)
   {
      if (enabled && (!isSelected || UICamera.currentScheme == UICamera.ControlScheme.Controller))
         OnHover(isSelected);
   }

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIPlaySound doesn't support controllers (fix)
« Reply #1 on: January 29, 2014, 08:45:27 AM »
Makes sense to me, thanks.