if (selected == "true")
fselected = true;
- std::wstring wlabel = utf8_to_wide(unescape_string(label));
+ std::wstring wlabel = translate_string(utf8_to_wide(unescape_string(label)));
core::rect<s32> rect = core::rect<s32>(
pos.X, pos.Y + ((imgsize.Y/2) - m_btn_height),
if(!data->explicit_size)
warningstream<<"invalid use of button without a size[] element"<<std::endl;
- std::wstring wlabel = utf8_to_wide(unescape_string(label));
+ std::wstring wlabel = translate_string(utf8_to_wide(unescape_string(label)));
FieldSpec spec(
name,
spec.ftype = f_Table;
for (std::string &item : items) {
- item = unescape_enriched(unescape_string(item));
+ item = wide_to_utf8(unescape_translate(utf8_to_wide(unescape_string(item))));
}
//now really show table
spec.ftype = f_Table;
for (std::string &item : items) {
- item = unescape_enriched(unescape_string(item));
+ item = wide_to_utf8(unescape_translate(utf8_to_wide(unescape_string(item))));
}
//now really show list
}
for (const std::string &item : items) {
- e->addItem(unescape_enriched(unescape_string(
+ e->addItem(unescape_translate(unescape_string(
utf8_to_wide(item))).c_str());
}
core::rect<s32> rect = core::rect<s32>(pos.X, pos.Y, pos.X+geom.X, pos.Y+geom.Y);
- std::wstring wlabel = utf8_to_wide(unescape_string(label));
+ std::wstring wlabel = translate_string(utf8_to_wide(unescape_string(label)));
FieldSpec spec(
name,
default_val = m_form_src->resolveText(default_val);
- std::wstring wlabel = utf8_to_wide(unescape_string(label));
+ std::wstring wlabel = translate_string(utf8_to_wide(unescape_string(label)));
FieldSpec spec(
name,
default_val = m_form_src->resolveText(default_val);
- std::wstring wlabel = utf8_to_wide(unescape_string(label));
+ std::wstring wlabel = translate_string(utf8_to_wide(unescape_string(label)));
FieldSpec spec(
name,
((parts.size() > 2) && (m_formspec_version > FORMSPEC_API_VERSION)))
{
std::vector<std::string> v_pos = split(parts[0],',');
- std::wstring text = unescape_enriched(
+ std::wstring text = unescape_translate(
unescape_string(utf8_to_wide(parts[1])));
MY_CHECKPOS("vertlabel",1);
e->setNotClipped(true);
for (const std::string &button : buttons) {
- e->addTab(unescape_enriched(unescape_string(
+ e->addTab(unescape_translate(unescape_string(
utf8_to_wide(button))).c_str(), -1);
}
item.deSerialize(item_name, idef);
m_tooltips[name] =
- TooltipSpec(item.getDefinition(idef).description,
+ TooltipSpec(utf8_to_wide(item.getDefinition(idef).description),
m_default_tooltip_bgcolor,
m_default_tooltip_color);
std::vector<std::string> parts = split(element,';');
if (parts.size() == 2) {
std::string name = parts[0];
- m_tooltips[name] = TooltipSpec(unescape_string(parts[1]),
+ m_tooltips[name] = TooltipSpec(utf8_to_wide(unescape_string(parts[1])),
m_default_tooltip_bgcolor, m_default_tooltip_color);
return;
}
std::string name = parts[0];
video::SColor tmp_color1, tmp_color2;
if ( parseColorString(parts[2], tmp_color1, false) && parseColorString(parts[3], tmp_color2, false) ) {
- m_tooltips[name] = TooltipSpec(unescape_string(parts[1]),
+ m_tooltips[name] = TooltipSpec(utf8_to_wide(unescape_string(parts[1])),
tmp_color1, tmp_color2);
return;
}
void GUIFormSpecMenu::showTooltip(const std::wstring &text,
const irr::video::SColor &color, const irr::video::SColor &bgcolor)
{
+ const std::wstring ntext = translate_string(text);
m_tooltip_element->setOverrideColor(color);
m_tooltip_element->setBackgroundColor(bgcolor);
- setStaticText(m_tooltip_element, text.c_str());
+ setStaticText(m_tooltip_element, ntext.c_str());
// Tooltip size and offset
s32 tooltip_width = m_tooltip_element->getTextWidth() + m_btn_height;
#if (IRRLICHT_VERSION_MAJOR <= 1 && IRRLICHT_VERSION_MINOR <= 8 && IRRLICHT_VERSION_REVISION < 2) || USE_FREETYPE == 1
- std::vector<std::wstring> text_rows = str_split(text, L'\n');
+ std::vector<std::wstring> text_rows = str_split(ntext, L'\n');
s32 tooltip_height = m_tooltip_element->getTextHeight() * text_rows.size() + 5;
#else
s32 tooltip_height = m_tooltip_element->getTextHeight() + 5;
IGUIElement * element = getElementFromId(s.fid);
gui::IGUIComboBox *e = NULL;
if ((element) && (element->getType() == gui::EGUIET_COMBO_BOX)) {
- e = dynamic_cast<gui::IGUIComboBox*>(element);
+ e = static_cast<gui::IGUIComboBox*>(element);
}
s32 selected = e->getSelected();
if (selected >= 0) {
}
else if (s.ftype == f_TabHeader) {
// no dynamic cast possible due to some distributions shipped
- // without rtti support in irrlicht
+ // without rttzi support in irrlicht
IGUIElement * element = getElementFromId(s.fid);
gui::IGUITabControl *e = NULL;
if ((element) && (element->getType() == gui::EGUIET_TAB_CONTROL)) {
- e = dynamic_cast<gui::IGUITabControl*>(element);
+ e = static_cast<gui::IGUITabControl *>(element);
}
if (e != 0) {
IGUIElement * element = getElementFromId(s.fid);
gui::IGUICheckBox *e = NULL;
if ((element) && (element->getType() == gui::EGUIET_CHECK_BOX)) {
- e = dynamic_cast<gui::IGUICheckBox*>(element);
+ e = static_cast<gui::IGUICheckBox*>(element);
}
if (e != 0) {
IGUIElement * element = getElementFromId(s.fid);
gui::IGUIScrollBar *e = NULL;
if ((element) && (element->getType() == gui::EGUIET_SCROLL_BAR)) {
- e = dynamic_cast<gui::IGUIScrollBar*>(element);
+ e = static_cast<gui::IGUIScrollBar*>(element);
}
if (e != 0) {