mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 11:19:10 +00:00
Nuke std::wstring from plDynamicTextMsg
This commit is contained in:
@ -298,11 +298,11 @@ void pyDynamicText::DrawTextW( int16_t x, int16_t y, std::wstring text )
|
||||
// 2) clip
|
||||
// 3) just draw
|
||||
if ( fWrap )
|
||||
pMsg->DrawWrappedString(x,y,fWrapWidth,fWrapHeight,text.c_str());
|
||||
pMsg->DrawWrappedString(x,y,fWrapWidth,fWrapHeight,plString::FromWchar(text.c_str()));
|
||||
else if ( fClip )
|
||||
pMsg->DrawClippedString(x,y,fClipLeft,fClipTop,fClipRight,fClipBottom,text.c_str());
|
||||
pMsg->DrawClippedString(x,y,fClipLeft,fClipTop,fClipRight,fClipBottom,plString::FromWchar(text.c_str()));
|
||||
else
|
||||
pMsg->DrawString(x,y,text.c_str());
|
||||
pMsg->DrawString(x,y,plString::FromWchar(text.c_str()));
|
||||
|
||||
plgDispatch::MsgSend( pMsg ); // whoosh... off it goes
|
||||
}
|
||||
|
@ -112,38 +112,24 @@ void plDynamicTextMsg::FrameRect( uint16_t left, uint16_t top, uint16_t right
|
||||
fColor = c;
|
||||
}
|
||||
|
||||
void plDynamicTextMsg::DrawString( int16_t x, int16_t y, const char *text )
|
||||
{
|
||||
wchar_t *wString = hsStringToWString(text);
|
||||
DrawString(x,y,wString);
|
||||
delete [] wString;
|
||||
}
|
||||
|
||||
void plDynamicTextMsg::DrawString( int16_t x, int16_t y, const wchar_t *text )
|
||||
void plDynamicTextMsg::DrawString( int16_t x, int16_t y, const plString& text )
|
||||
{
|
||||
hsAssert( ( fCmd & ( kStringCmds | kPosCmds ) ) == 0, "Attempting to issue conflicting drawText commands" );
|
||||
fCmd &= ~( kStringCmds | kPosCmds );
|
||||
fCmd |= kDrawString;
|
||||
|
||||
fString = plString::FromWchar(text);
|
||||
fString = text;
|
||||
fX = x;
|
||||
fY = y;
|
||||
}
|
||||
|
||||
void plDynamicTextMsg::DrawClippedString( int16_t x, int16_t y, uint16_t clipLeft, uint16_t clipTop, uint16_t clipRight, uint16_t clipBottom, const char *text )
|
||||
{
|
||||
wchar_t *wString = hsStringToWString(text);
|
||||
DrawClippedString(x,y,clipLeft,clipTop,clipRight,clipBottom,wString);
|
||||
delete [] wString;
|
||||
}
|
||||
|
||||
void plDynamicTextMsg::DrawClippedString( int16_t x, int16_t y, uint16_t clipLeft, uint16_t clipTop, uint16_t clipRight, uint16_t clipBottom, const wchar_t *text )
|
||||
void plDynamicTextMsg::DrawClippedString( int16_t x, int16_t y, uint16_t clipLeft, uint16_t clipTop, uint16_t clipRight, uint16_t clipBottom, const plString& text )
|
||||
{
|
||||
hsAssert( ( fCmd & ( kStringCmds | kPosCmds | kRectCmds ) ) == 0, "Attempting to issue conflicting drawText commands" );
|
||||
fCmd &= ~( kStringCmds | kPosCmds | kRectCmds );
|
||||
fCmd |= kDrawClippedString;
|
||||
|
||||
fString = plString::FromWchar(text);
|
||||
fString = text;
|
||||
fX = x;
|
||||
fY = y;
|
||||
|
||||
@ -153,20 +139,13 @@ void plDynamicTextMsg::DrawClippedString( int16_t x, int16_t y, uint16_t clip
|
||||
fBottom = clipBottom;
|
||||
}
|
||||
|
||||
void plDynamicTextMsg::DrawWrappedString( int16_t x, int16_t y, uint16_t wrapWidth, uint16_t wrapHeight, const char *text )
|
||||
{
|
||||
wchar_t *wString = hsStringToWString(text);
|
||||
DrawWrappedString(x,y,wrapWidth,wrapHeight,wString);
|
||||
delete [] wString;
|
||||
}
|
||||
|
||||
void plDynamicTextMsg::DrawWrappedString( int16_t x, int16_t y, uint16_t wrapWidth, uint16_t wrapHeight, const wchar_t *text )
|
||||
void plDynamicTextMsg::DrawWrappedString( int16_t x, int16_t y, uint16_t wrapWidth, uint16_t wrapHeight, const plString& text )
|
||||
{
|
||||
hsAssert( ( fCmd & ( kStringCmds | kPosCmds | kRectCmds ) ) == 0, "Attempting to issue conflicting drawText commands" );
|
||||
fCmd &= ~( kStringCmds | kPosCmds | kRectCmds );
|
||||
fCmd |= kDrawWrappedString;
|
||||
|
||||
fString = plString::FromWchar(text);
|
||||
fString = text;
|
||||
fX = x;
|
||||
fY = y;
|
||||
|
||||
|
@ -128,12 +128,9 @@ public:
|
||||
void SetLineSpacing( int16_t spacing );
|
||||
void FillRect( uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, hsColorRGBA &c );
|
||||
void FrameRect( uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, hsColorRGBA &c );
|
||||
void DrawString( int16_t x, int16_t y, const char *text );
|
||||
void DrawString( int16_t x, int16_t y, const wchar_t *text );
|
||||
void DrawClippedString( int16_t x, int16_t y, uint16_t clipLeft, uint16_t clipTop, uint16_t clipRight, uint16_t clipBottom, const char *text );
|
||||
void DrawClippedString( int16_t x, int16_t y, uint16_t clipLeft, uint16_t clipTop, uint16_t clipRight, uint16_t clipBottom, const wchar_t *text );
|
||||
void DrawWrappedString( int16_t x, int16_t y, uint16_t wrapWidth, uint16_t wrapHeight, const char *text );
|
||||
void DrawWrappedString( int16_t x, int16_t y, uint16_t wrapWidth, uint16_t wrapHeight, const wchar_t *text );
|
||||
void DrawString( int16_t x, int16_t y, const plString& text );
|
||||
void DrawClippedString( int16_t x, int16_t y, uint16_t clipLeft, uint16_t clipTop, uint16_t clipRight, uint16_t clipBottom, const plString& text );
|
||||
void DrawWrappedString( int16_t x, int16_t y, uint16_t wrapWidth, uint16_t wrapHeight, const plString& text );
|
||||
void DrawImage( int16_t x, int16_t y, plKey &image, bool respectAlpha = false );
|
||||
void DrawClippedImage( int16_t x, int16_t y, plKey &image, uint16_t clipX, uint16_t clipY, uint16_t clipWidth, uint16_t clipHeight, bool respectAlpha = false );
|
||||
void SetJustify( uint8_t justifyFlags );
|
||||
|
Reference in New Issue
Block a user