Abstract common functionality.
This commit is contained in:
@@ -68,6 +68,25 @@ RString BackgroundChange::GetTextDescription() const
|
||||
return s;
|
||||
}
|
||||
|
||||
RString BackgroundChange::ToString() const
|
||||
{
|
||||
/* TODO: Technically we need to double-escape the filename
|
||||
* (because it might contain '=') and then unescape the value
|
||||
* returned by the MsdFile. */
|
||||
return ssprintf("%.3f=%s=%.3f=%d=%d=%d=%s=%s=%s=%s=%s",
|
||||
this->m_fStartBeat,
|
||||
SmEscape(this->m_def.m_sFile1).c_str(),
|
||||
this->m_fRate,
|
||||
this->m_sTransition == SBT_CrossFade, // backward compat
|
||||
this->m_def.m_sEffect == SBE_StretchRewind, // backward compat
|
||||
this->m_def.m_sEffect != SBE_StretchNoLoop, // backward compat
|
||||
this->m_def.m_sEffect.c_str(),
|
||||
this->m_def.m_sFile2.c_str(),
|
||||
this->m_sTransition.c_str(),
|
||||
SmEscape(RageColor::NormalizeColorString(this->m_def.m_sColor1)).c_str(),
|
||||
SmEscape(RageColor::NormalizeColorString(this->m_def.m_sColor2)).c_str());
|
||||
}
|
||||
|
||||
|
||||
const RString BACKGROUND_EFFECTS_DIR = "BackgroundEffects/";
|
||||
const RString BACKGROUND_TRANSITIONS_DIR = "BackgroundTransitions/";
|
||||
|
||||
Reference in New Issue
Block a user