Replaced wstrings with String internal class.

Removed all the unnecessary wide-strings.
Removed some wstring functions.
This commit is contained in:
spartanj
2011-03-06 02:37:54 -03:00
parent cebcb3b2c2
commit 0250c98ff8
46 changed files with 1855 additions and 1978 deletions

View File

@@ -14,7 +14,7 @@ cTextCache::cTextCache() :
{
}
cTextCache::cTextCache( cFont * font, const std::wstring& text, eeColorA FontColor, eeColorA FontShadowColor ) :
cTextCache::cTextCache( cFont * font, const String& text, eeColorA FontColor, eeColorA FontShadowColor ) :
mText( text ),
mFont( font ),
mCachedWidth(0.f),
@@ -29,7 +29,7 @@ cTextCache::cTextCache( cFont * font, const std::wstring& text, eeColorA FontCol
cTextCache::~cTextCache() {
}
void cTextCache::Create( cFont * font, const std::wstring& text, eeColorA FontColor, eeColorA FontShadowColor ) {
void cTextCache::Create( cFont * font, const String& text, eeColorA FontColor, eeColorA FontShadowColor ) {
mFont = font;
mText = text;
UpdateCoords();
@@ -47,7 +47,7 @@ void cTextCache::Font( cFont * font ) {
Cache();
}
std::wstring& cTextCache::Text() {
String& cTextCache::Text() {
return mText;
}
@@ -58,7 +58,7 @@ void cTextCache::UpdateCoords() {
mColors.resize( size, mFontColor );
}
void cTextCache::Text( const std::wstring& text ) {
void cTextCache::Text( const String& text ) {
bool needUpdate = false;
if ( mText.size() != text.size() )
@@ -100,10 +100,6 @@ std::vector<eeColorA>& cTextCache::Colors() {
return mColors;
}
void cTextCache::Text( const std::string& text ) {
Text( stringTowstring( text ) );
}
void cTextCache::Cache() {
if ( NULL != mFont && mText.size() ) {
mFont->CacheWidth( mText, mLinesWidth, mCachedWidth, mNumLines );