GUIFormSpecMenu: Remove field_close_on_enter warning (#9501)
parent
30d795b4b2
commit
7da4f9ef20
|
@ -1318,8 +1318,8 @@ void GUIFormSpecMenu::parsePwdField(parserData* data, const std::string &element
|
||||||
{
|
{
|
||||||
std::vector<std::string> parts = split(element,';');
|
std::vector<std::string> parts = split(element,';');
|
||||||
|
|
||||||
if ((parts.size() == 4) || (parts.size() == 5) ||
|
if ((parts.size() == 4) ||
|
||||||
((parts.size() > 5) && (m_formspec_version > FORMSPEC_API_VERSION)))
|
((parts.size() > 4) && (m_formspec_version > FORMSPEC_API_VERSION)))
|
||||||
{
|
{
|
||||||
std::vector<std::string> v_pos = split(parts[0],',');
|
std::vector<std::string> v_pos = split(parts[0],',');
|
||||||
std::vector<std::string> v_geom = split(parts[1],',');
|
std::vector<std::string> v_geom = split(parts[1],',');
|
||||||
|
@ -1390,12 +1390,8 @@ void GUIFormSpecMenu::parsePwdField(parserData* data, const std::string &element
|
||||||
evt.KeyInput.PressedDown = true;
|
evt.KeyInput.PressedDown = true;
|
||||||
e->OnEvent(evt);
|
e->OnEvent(evt);
|
||||||
|
|
||||||
if (parts.size() >= 5) {
|
// Note: Before 5.2.0 "parts.size() >= 5" resulted in a
|
||||||
// TODO: remove after 2016-11-03
|
// warning referring to field_close_on_enter[]!
|
||||||
warningstream << "pwdfield: use field_close_on_enter[name, enabled]" <<
|
|
||||||
" instead of the 5th param" << std::endl;
|
|
||||||
field_close_on_enter[name] = is_yes(parts[4]);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_fields.push_back(spec);
|
m_fields.push_back(spec);
|
||||||
return;
|
return;
|
||||||
|
@ -1586,12 +1582,8 @@ void GUIFormSpecMenu::parseTextArea(parserData* data, std::vector<std::string>&
|
||||||
|
|
||||||
createTextField(data, spec, rect, type == "textarea");
|
createTextField(data, spec, rect, type == "textarea");
|
||||||
|
|
||||||
if (parts.size() >= 6) {
|
// Note: Before 5.2.0 "parts.size() >= 6" resulted in a
|
||||||
// TODO: remove after 2016-11-03
|
// warning referring to field_close_on_enter[]!
|
||||||
warningstream << "field/textarea: use field_close_on_enter[name, enabled]" <<
|
|
||||||
" instead of the 6th param" << std::endl;
|
|
||||||
field_close_on_enter[name] = is_yes(parts[5]);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_fields.push_back(spec);
|
m_fields.push_back(spec);
|
||||||
}
|
}
|
||||||
|
@ -1606,8 +1598,8 @@ void GUIFormSpecMenu::parseField(parserData* data, const std::string &element,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((parts.size() == 5) || (parts.size() == 6) ||
|
if ((parts.size() == 5) ||
|
||||||
((parts.size() > 6) && (m_formspec_version > FORMSPEC_API_VERSION)))
|
((parts.size() > 5) && (m_formspec_version > FORMSPEC_API_VERSION)))
|
||||||
{
|
{
|
||||||
parseTextArea(data,parts,type);
|
parseTextArea(data,parts,type);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue