mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-05-08 14:56:13 +00:00
Refactor of sound asset
Refactored to match image asset.
This commit is contained in:
parent
5796f0ea07
commit
71273e63c9
46 changed files with 639 additions and 775 deletions
|
|
@ -258,8 +258,7 @@ void GuiButtonBaseCtrl::onMouseDown(const GuiEvent& event)
|
|||
if (mProfile->mCanKeyFocus)
|
||||
setFirstResponder();
|
||||
|
||||
if (mProfile->isSoundButtonDownValid())
|
||||
SFX->playOnce(mProfile->getSoundButtonDownProfile());
|
||||
SFX->playOnce(mProfile->getSoundButtonDownSFXTrack());
|
||||
|
||||
mMouseDownPoint = event.mousePoint;
|
||||
mMouseDragged = false;
|
||||
|
|
@ -299,8 +298,7 @@ void GuiButtonBaseCtrl::onMouseEnter(const GuiEvent& event)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (mProfile->isSoundButtonOverValid())
|
||||
SFX->playOnce(mProfile->getSoundButtonOverProfile());
|
||||
SFX->playOnce(mProfile->getSoundButtonOverSFXTrack());
|
||||
|
||||
mHighlighted = true;
|
||||
|
||||
|
|
@ -393,9 +391,7 @@ bool GuiButtonBaseCtrl::onKeyDown(const GuiEvent& event)
|
|||
if ((event.keyCode == KEY_RETURN || event.keyCode == KEY_SPACE)
|
||||
&& event.modifier == 0)
|
||||
{
|
||||
if (mProfile->isSoundButtonDownValid())
|
||||
SFX->playOnce(mProfile->getSoundButtonDownProfile());
|
||||
|
||||
SFX->playOnce(mProfile->getSoundButtonDownSFXTrack());
|
||||
return true;
|
||||
}
|
||||
//otherwise, pass the event to it's parent
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue