develop
kaetemi 4 years ago
parent 560a19e6f7
commit 9ff5eee1e8

@ -2206,7 +2206,7 @@ namespace NLGUI
if (_ClampRight) if (_ClampRight)
{ {
CUtfStringView sv(_Text); CUtfStringView sv(_Text);
::u32string ucStrLetter = u32string(1, (u32char)' '); ::u32string ucStrLetter = ::u32string(1, (u32char)' ');
for (CUtfStringView::iterator it(sv.begin()), end(sv.end()); it != end; ++it) for (CUtfStringView::iterator it(sv.begin()), end(sv.end()); it != end; ++it)
{ {
ucStrLetter[0] = *it; ucStrLetter[0] = *it;
@ -2233,7 +2233,7 @@ namespace NLGUI
{ {
// FIXME: Optimize reverse UTF iteration // FIXME: Optimize reverse UTF iteration
::u32string uctext = CUtfStringView(_Text).toUtf32(); ::u32string uctext = CUtfStringView(_Text).toUtf32();
::u32string ucStrLetter = u32string(1, (u32char)' '); ::u32string ucStrLetter = ::u32string(1, (u32char)' ');
for (sint i = (sint)uctext.size() - 1; i >= 0; --i) for (sint i = (sint)uctext.size() - 1; i >= 0; --i)
{ {
ucStrLetter[0] = uctext[i]; ucStrLetter[0] = uctext[i];

@ -228,8 +228,12 @@ namespace NLGUI
while(NLMISC::strFindReplace(result, "{ros_exit}", "")); while(NLMISC::strFindReplace(result, "{ros_exit}", ""));
// Modify the text? // Modify the text?
if(_StringModifier) if (_StringModifier)
_StringModifier->onReceiveTextId(ucstring::makeFromUtf8(result)); {
ucstring tmp = ucstring::makeFromUtf8(result);
_StringModifier->onReceiveTextId(tmp); // FIXME: UTF-8
result = tmp.toUtf8();
}
// Set the Text // Set the Text
if(_IsTextFormatTaged) if(_IsTextFormatTaged)

Loading…
Cancel
Save