develop
kaetemi 4 years ago
parent 560a19e6f7
commit 9ff5eee1e8

@ -2206,7 +2206,7 @@ namespace NLGUI
if (_ClampRight)
{
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)
{
ucStrLetter[0] = *it;
@ -2233,7 +2233,7 @@ namespace NLGUI
{
// FIXME: Optimize reverse UTF iteration
::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)
{
ucStrLetter[0] = uctext[i];

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

Loading…
Cancel
Save