Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: AeornFlippout on January 28, 2014, 04:08:37 PM

Title: UIPlaySound doesn't support controllers (fix)
Post by: AeornFlippout 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);
   }
Title: Re: UIPlaySound doesn't support controllers (fix)
Post by: ArenMook on January 29, 2014, 08:45:27 AM
Makes sense to me, thanks.