FEATURE: Allow BitmapTexts to on-the-fly change color mid-text depending on the text

This feature can be used by enabling the coloration by using the .SetDynamicColor( true )
function.  Once this is done, the syntax for color changing is: |c0RRGGBB where RR = red
in hex, GG = green in hex and BB = blue in hex.  |c0 is the token to note the
beginning of a text change.  This was discussed on the StepMania development
list.
This commit is contained in:
Charles Lohr
2005-05-03 03:37:52 +00:00
parent b6944ab340
commit 348c6f6f5a
3 changed files with 76 additions and 0 deletions
+10
View File
@@ -59,6 +59,8 @@ public:
void GetLines( vector<wstring> &wTextLines ) { wTextLines = m_wTextLines; }
void SetDynamicColor( bool coloration ) { m_bColored = coloration; }
CString GetText() const { return m_sText; }
/* Return true if the string 's' will use an alternate string, if available. */
bool StringWillUseAlternate(const CString& sText, const CString& sAlternateText) const;
@@ -83,6 +85,14 @@ protected:
bool m_bRainbow;
bool m_bColored;
struct ColorChange
{
RageColor c; //Color to change to
int l; //Change Location
};
vector<ColorChange> m_vColors;
vector<RageSpriteVertex> verts;
vector<RageTexture *> tex;