mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 06:34:36 +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
|
|
@ -244,8 +244,6 @@ GuiControlProfile::GuiControlProfile(void) :
|
|||
mTextOffset(0,0),
|
||||
mBitmapArrayRects(0)
|
||||
{
|
||||
INIT_ASSET(SoundButtonDown);
|
||||
INIT_ASSET(SoundButtonOver);
|
||||
mLoadCount = 0;
|
||||
mUseCount = 0;
|
||||
|
||||
|
|
@ -322,19 +320,8 @@ GuiControlProfile::GuiControlProfile(void) :
|
|||
mTextOffset = def->mTextOffset;
|
||||
|
||||
// default sound
|
||||
_setSoundButtonDown(def->getSoundButtonDown());
|
||||
if (getSoundButtonDown() != StringTable->EmptyString())
|
||||
{
|
||||
if (!getSoundButtonDownProfile())
|
||||
Con::errorf(ConsoleLogEntry::General, "GuiControlProfile: Can't get default button pressed sound asset.");
|
||||
}
|
||||
|
||||
_setSoundButtonOver(def->getSoundButtonOver());
|
||||
if (getSoundButtonOver() != StringTable->EmptyString())
|
||||
{
|
||||
if (!getSoundButtonOverProfile())
|
||||
Con::errorf(ConsoleLogEntry::General, "GuiControlProfile: Can't get default button hover sound asset.");
|
||||
}
|
||||
_setSoundButtonDown(def->getSoundButtonDownFile());
|
||||
_setSoundButtonOver(def->getSoundButtonOverFile());
|
||||
|
||||
//used by GuiTextCtrl
|
||||
mModal = def->mModal;
|
||||
|
|
|
|||
|
|
@ -466,11 +466,8 @@ public:
|
|||
bool mUseBitmapArray; ///< Flag to use the bitmap array or to fallback to non-array rendering
|
||||
Vector<RectI> mBitmapArrayRects; ///< Used for controls which use an array of bitmaps such as checkboxes
|
||||
|
||||
DECLARE_SOUNDASSET(GuiControlProfile, SoundButtonDown); ///< Sound played when a button is pressed.
|
||||
DECLARE_ASSET_SETGET(GuiControlProfile, SoundButtonDown);
|
||||
|
||||
DECLARE_SOUNDASSET(GuiControlProfile, SoundButtonOver); ///< Sound played when a button is hovered.
|
||||
DECLARE_ASSET_SETGET(GuiControlProfile, SoundButtonOver);
|
||||
DECLARE_SOUNDASSET(GuiControlProfile, SoundButtonDown) ///< Sound played when a button is pressed.
|
||||
DECLARE_SOUNDASSET(GuiControlProfile, SoundButtonOver) ///< Sound played when a button is hovered.
|
||||
|
||||
StringTableEntry mChildrenProfileName; ///< The name of the profile to use for the children controls
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue