Move ColorBitmapText to SNetSelectBase since this is very specific to the SMO code. This should probably be done in a general way in BitmapText and the string parsing to color code should be kept where it is used instead of part of the bitmap text class.

This commit is contained in:
Steve Checkoway
2007-06-09 07:56:34 +00:00
parent acb030f229
commit 32a9724841
4 changed files with 264 additions and 267 deletions
+20 -2
View File
@@ -8,6 +8,24 @@
#include "Quad.h"
#include "BitmapText.h"
class ColorBitmapText : public BitmapText
{
public:
void SetText( const RString &sText, const RString &sAlternateText = "", int iWrapWidthPixels = -1 );
void DrawPrimitives();
void SetMaxLines( int iLines, bool bCutBottom = true ); //if bCutBottom = false then, it will crop the top
void SimpleAddLine( const RString &sAddition, int iWidthPixels );
void SetMaxLines( int iNumLines, int iDirection );
protected:
struct ColorChange
{
RageColor c; //Color to change to
int l; //Change Location
};
vector<ColorChange> m_vColors;
};
class ScreenNetSelectBase : public ScreenWithMenuElements
{
public:
@@ -21,8 +39,8 @@ public:
void UpdateTextInput();
private:
//Chatting
ColorBitmapText m_textChatInput;
ColorBitmapText m_textChatOutput;
ColorBitmapText m_textChatInput;
ColorBitmapText m_textChatOutput;
Sprite m_sprChatInputBox;
Sprite m_sprChatOutputBox;
RString m_sTextInput;