if (selected == "true")
fselected = true;
- std::wstring wlabel = utf8_to_wide(label);
+ std::wstring wlabel = 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(label);
+ std::wstring wlabel = utf8_to_wide(unescape_string(label));
FieldSpec spec(
name,
spec.ftype = f_Table;
for (unsigned int i = 0; i < items.size(); ++i) {
- items[i] = unescape_string(unescape_enriched(items[i]));
+ items[i] = unescape_enriched(unescape_string(items[i]));
}
//now really show table
spec.ftype = f_Table;
for (unsigned int i = 0; i < items.size(); ++i) {
- items[i] = unescape_string(unescape_enriched(items[i]));
+ items[i] = unescape_enriched(unescape_string(items[i]));
}
//now really show list
}
for (unsigned int i=0; i < items.size(); i++) {
- e->addItem(unescape_string(unescape_enriched(
+ e->addItem(unescape_enriched(unescape_string(
utf8_to_wide(items[i]))).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(label);
+ std::wstring wlabel = utf8_to_wide(unescape_string(label));
FieldSpec spec(
name,
default_val = m_form_src->resolveText(default_val);
- std::wstring wlabel = utf8_to_wide(label);
+ std::wstring wlabel = utf8_to_wide(unescape_string(label));
FieldSpec spec(
name,
wlabel,
- utf8_to_wide(default_val),
+ utf8_to_wide(unescape_string(default_val)),
258+m_fields.size()
);
default_val = m_form_src->resolveText(default_val);
- std::wstring wlabel = utf8_to_wide(label);
+ std::wstring wlabel = utf8_to_wide(unescape_string(label));
FieldSpec spec(
name,
wlabel,
- utf8_to_wide(default_val),
+ utf8_to_wide(unescape_string(default_val)),
258+m_fields.size()
);
// in the integer cases: 0.4 is not exactly
// representable in binary floating point.
s32 posy = pos.Y + ((float)i) * spacing.Y * 2.0 / 5.0;
- std::wstring wlabel = utf8_to_wide(lines[i]);
+ std::wstring wlabel = utf8_to_wide(unescape_string(lines[i]));
core::rect<s32> rect = core::rect<s32>(
pos.X, posy - m_btn_height,
pos.X + m_font->getDimension(wlabel.c_str()).Width,
((parts.size() > 2) && (m_formspec_version > FORMSPEC_API_VERSION)))
{
std::vector<std::string> v_pos = split(parts[0],',');
- std::wstring text = unescape_string(
- unescape_enriched(utf8_to_wide(parts[1])));
+ std::wstring text = unescape_enriched(
+ unescape_string(utf8_to_wide(parts[1])));
MY_CHECKPOS("vertlabel",1);
image_name = unescape_string(image_name);
pressed_image_name = unescape_string(pressed_image_name);
- std::wstring wlabel = utf8_to_wide(label);
+ std::wstring wlabel = utf8_to_wide(unescape_string(label));
FieldSpec spec(
name,
e->setNotClipped(true);
for (unsigned int i = 0; i < buttons.size(); i++) {
- e->addTab(unescape_string(unescape_enriched(
+ e->addTab(unescape_enriched(unescape_string(
utf8_to_wide(buttons[i]))).c_str(), -1);
}
std::string name = parts[3];
std::string label = parts[4];
+ label = unescape_string(label);
+ item_name = unescape_string(item_name);
+
MY_CHECKPOS("itemimagebutton",0);
MY_CHECKGEOM("itemimagebutton",1);
std::vector<std::string> parts = split(element,';');
if (parts.size() == 2) {
std::string name = parts[0];
- m_tooltips[name] = TooltipSpec(parts[1],
+ m_tooltips[name] = TooltipSpec(unescape_string(parts[1]),
m_default_tooltip_bgcolor, m_default_tooltip_color);
return;
} else if (parts.size() == 4) {
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(parts[1],
+ m_tooltips[name] = TooltipSpec(unescape_string(parts[1]),
tmp_color1, tmp_color2);
return;
}
bool scale;
};
- /* The responsibility of unescaping the strings has been shifted
- * from the formspec parsing methods to the draw methods.
- * There still are a few exceptions:
- * - Vertical label, because it modifies the string by inserting
- * '\n' between each character,
- * - Tab header, because it gives the string immediately to
- * Irrlicht and we can't unescape it later.
- */
struct FieldSpec
{
FieldSpec()
fname(name),
fid(id)
{
- flabel = unescape_string(unescape_enriched(label));
- fdefault = unescape_string(unescape_enriched(default_text));
+ flabel = unescape_enriched(label);
+ fdefault = unescape_enriched(default_text);
send = false;
ftype = f_Unknown;
is_exit = false;
bgcolor(a_bgcolor),
color(a_color)
{
- tooltip = unescape_string(unescape_enriched(utf8_to_wide(a_tooltip)));
+ tooltip = unescape_enriched(utf8_to_wide(a_tooltip));
}
std::wstring tooltip;
irr::video::SColor bgcolor;
rect(a_rect),
parent_button(NULL)
{
- text = unescape_string(unescape_enriched(a_text));
+ text = unescape_enriched(a_text);
}
StaticTextSpec(const std::wstring &a_text,
const core::rect<s32> &a_rect,
rect(a_rect),
parent_button(a_parent_button)
{
- text = unescape_string(unescape_enriched(a_text));
+ text = unescape_enriched(a_text);
}
std::wstring text;
core::rect<s32> rect;