mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-14 04:03:46 +00:00
fill in the validated variables
This commit is contained in:
parent
fa760fa746
commit
f633ef3a3d
184 changed files with 1359 additions and 1216 deletions
|
|
@ -26,6 +26,7 @@
|
|||
#include "sfx/sfxTrack.h"
|
||||
#include "sfx/sfxSource.h"
|
||||
#include "sfx/sfxTypes.h"
|
||||
#include "console/typeValidators.h"
|
||||
|
||||
#define TickMs 32
|
||||
|
||||
|
|
@ -116,7 +117,7 @@ void GuiAudioCtrl::initPersistFields()
|
|||
{
|
||||
addGroup("Sounds");
|
||||
INITPERSISTFIELD_SOUNDASSET(Sound, GuiAudioCtrl, "Looping SoundAsset to play while GuiAudioCtrl is active.");
|
||||
addField("tickPeriodMS", TypeS32, Offset(mTickPeriodMS, GuiAudioCtrl),
|
||||
addFieldV("tickPeriodMS", TypeRangedS32, Offset(mTickPeriodMS, GuiAudioCtrl), &CommonValidators::MSTickRange,
|
||||
"@brief Time in milliseconds between calls to onTick().\n\n"
|
||||
"@see onTickTrigger()\n");
|
||||
addField("playIf", TypeCommand, Offset(mPlayIf, GuiAudioCtrl), "evaluation condition to trip playback (true/false)");
|
||||
|
|
@ -127,19 +128,19 @@ void GuiAudioCtrl::initPersistFields()
|
|||
"The SFXSource to which to assign the sound of this emitter as a child.\n"
|
||||
"@note This field is ignored if #useTrackDescriptionOnly is true.\n\n"
|
||||
"@see SFXDescription::sourceGroup");
|
||||
addField("volume", TypeF32, Offset(mVolume, GuiAudioCtrl),
|
||||
addFieldV("volume", TypeRangedF32, Offset(mVolume, GuiAudioCtrl), &CommonValidators::PositiveFloat,
|
||||
"Volume level to apply to the sound.\n"
|
||||
"@note This field is ignored if #useTrackDescriptionOnly is true.\n\n"
|
||||
"@see SFXDescription::volume");
|
||||
addField("pitch", TypeF32, Offset(mPitch, GuiAudioCtrl),
|
||||
addFieldV("pitch", TypeRangedF32, Offset(mPitch, GuiAudioCtrl), &CommonValidators::PositiveFloat,
|
||||
"Pitch shift to apply to the sound. Default is 1 = play at normal speed.\n"
|
||||
"@note This field is ignored if #useTrackDescriptionOnly is true.\n\n"
|
||||
"@see SFXDescription::pitch");
|
||||
addField("fadeInTime", TypeF32, Offset(mFadeInTime, GuiAudioCtrl),
|
||||
addFieldV("fadeInTime", TypeRangedF32, Offset(mFadeInTime, GuiAudioCtrl), &CommonValidators::PositiveFloat,
|
||||
"Number of seconds to gradually fade in volume from zero when playback starts.\n"
|
||||
"@note This field is ignored if #useTrackDescriptionOnly is true.\n\n"
|
||||
"@see SFXDescription::fadeInTime");
|
||||
addField("fadeOutTime", TypeF32, Offset(mFadeOutTime, GuiAudioCtrl),
|
||||
addFieldV("fadeOutTime", TypeRangedF32, Offset(mFadeOutTime, GuiAudioCtrl), &CommonValidators::PositiveFloat,
|
||||
"Number of seconds to gradually fade out volume down to zero when playback is stopped or paused.\n"
|
||||
"@note This field is ignored if #useTrackDescriptionOnly is true.\n\n"
|
||||
"@see SFXDescription::fadeOutTime");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue