mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-14 08:55:22 +00:00
Change GuiProfile to use Sound Asset
-Added SoundAssetInspector to bypass circular issue -Added SoundAsset to GuiTypes
This commit is contained in:
parent
ebbf0947b3
commit
5d85664b40
10 changed files with 91 additions and 106 deletions
|
|
@ -252,8 +252,8 @@ void GuiButtonBaseCtrl::onMouseDown(const GuiEvent &event)
|
|||
if (mProfile->mCanKeyFocus)
|
||||
setFirstResponder();
|
||||
|
||||
if (mProfile->mSoundButtonDown)
|
||||
SFX->playOnce(mProfile->mSoundButtonDown);
|
||||
if (mProfile->getSoundButtonDown())
|
||||
SFX->playOnce(mProfile->getSoundButtonDownProfile());
|
||||
|
||||
mMouseDownPoint = event.mousePoint;
|
||||
mMouseDragged = false;
|
||||
|
|
@ -292,8 +292,8 @@ void GuiButtonBaseCtrl::onMouseEnter(const GuiEvent &event)
|
|||
}
|
||||
else
|
||||
{
|
||||
if ( mActive && mProfile->mSoundButtonOver )
|
||||
SFX->playOnce(mProfile->mSoundButtonOver);
|
||||
if (mProfile->getSoundButtonOver())
|
||||
SFX->playOnce(mProfile->getSoundButtonOverProfile());
|
||||
|
||||
mHighlighted = true;
|
||||
}
|
||||
|
|
@ -377,8 +377,8 @@ bool GuiButtonBaseCtrl::onKeyDown(const GuiEvent &event)
|
|||
if ((event.keyCode == KEY_RETURN || event.keyCode == KEY_SPACE)
|
||||
&& event.modifier == 0)
|
||||
{
|
||||
if ( mProfile->mSoundButtonDown )
|
||||
SFX->playOnce( mProfile->mSoundButtonDown);
|
||||
if (mProfile->getSoundButtonDown())
|
||||
SFX->playOnce(mProfile->getSoundButtonDownProfile());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue