mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-03 12:30:31 +00:00
SoundAsset Refactor
This commit is contained in:
parent
9f29bee45f
commit
da40838560
61 changed files with 1333 additions and 1828 deletions
|
|
@ -282,7 +282,6 @@ GuiMLTextCtrl::GuiMLTextCtrl()
|
|||
{
|
||||
mActive = true;
|
||||
//mInitialText = StringTable->EmptyString();
|
||||
INIT_ASSET(DeniedSound);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
|
@ -344,8 +343,6 @@ bool GuiMLTextCtrl::onAdd()
|
|||
if (!mTextBuffer.length() && mInitialText[0] != 0)
|
||||
setText(mInitialText, dStrlen(mInitialText)+1);
|
||||
|
||||
_setDeniedSound(getDeniedSound());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -964,8 +961,8 @@ void GuiMLTextCtrl::insertChars(const char* inputChars,
|
|||
if (numCharsToInsert <= 0)
|
||||
{
|
||||
// Play the "Denied" sound:
|
||||
if ( numInputChars > 0 && getDeniedSoundProfile())
|
||||
SFX->playOnce(getDeniedSoundProfile());
|
||||
if ( numInputChars > 0)
|
||||
SFX->playOnce(getDeniedSoundSFXTrack());
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -265,7 +265,6 @@ class GuiMLTextCtrl : public GuiControl
|
|||
|
||||
// Too many chars sound:
|
||||
DECLARE_SOUNDASSET(GuiMLTextCtrl, DeniedSound);
|
||||
DECLARE_ASSET_SETGET(GuiMLTextCtrl, DeniedSound);
|
||||
// Typeout over time
|
||||
bool mUseTypeOverTime;
|
||||
U32 mTypeOverTimeStartMS;
|
||||
|
|
|
|||
|
|
@ -205,8 +205,7 @@ void GuiSliderCtrl::onMouseDown(const GuiEvent &event)
|
|||
setFirstResponder();
|
||||
mDepressed = true;
|
||||
|
||||
if (mProfile->isSoundButtonDownValid())
|
||||
SFX->playOnce(mProfile->getSoundButtonDownProfile());
|
||||
SFX->playOnce(mProfile->getSoundButtonDownSFXTrack());
|
||||
|
||||
Point2I curMousePos = globalToLocalCoord( event.mousePoint );
|
||||
F32 value;
|
||||
|
|
@ -262,11 +261,9 @@ void GuiSliderCtrl::onMouseEnter(const GuiEvent &event)
|
|||
}
|
||||
else
|
||||
{
|
||||
if( mActive && mProfile->mSoundButtonOver )
|
||||
if( mActive )
|
||||
{
|
||||
//F32 pan = (F32(event.mousePoint.x)/F32(getRoot()->getWidth())*2.0f-1.0f)*0.8f;
|
||||
if (mProfile->isSoundButtonOverValid())
|
||||
SFX->playOnce(mProfile->getSoundButtonOverProfile());
|
||||
SFX->playOnce(mProfile->getSoundButtonOverSFXTrack());
|
||||
}
|
||||
|
||||
mMouseOver = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue