Added: add an prefiex "u:" to ask tooltip and hardcode_text to use utf8 strings

--HG--
branch : compatibility-develop
hg/compatibility-develop
ulukyn 6 years ago
parent 8ab4221593
commit 0b41daaaa2

@ -123,8 +123,11 @@ namespace NLGUI
if (prop) if (prop)
{ {
const char *propPtr = prop; const char *propPtr = prop;
if (strlen(propPtr) > 2 && propPtr[0] == 'u' && propPtr[1] == ':')
_ContextHelp = ucstring::makeFromUtf8(std::string(propPtr).substr(2));
else
_ContextHelp = ucstring(propPtr);
_ContextHelp = ucstring(propPtr);
if( !editorMode && ( strlen(propPtr) > 2 ) ) if( !editorMode && ( strlen(propPtr) > 2 ) )
{ {

@ -866,7 +866,10 @@ namespace NLGUI
if (_MultiLine) if (_MultiLine)
{ {
setTextFormatTaged(CI18N::get(propPtr)); if (strlen(propPtr) > 2 && propPtr[0] == 'u' && propPtr[1] == ':')
setTextFormatTaged(ucstring::makeFromUtf8(std::string(propPtr).substr(2)));
else
setTextFormatTaged(CI18N::get(propPtr));
} }
else else
{ {

Loading…
Cancel
Save