Skip to content

Commit

Permalink
Tweak indent levels in guiFormSpecMenu.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Wuzzy2 committed Jun 29, 2024
1 parent e211a5f commit f5c62c3
Showing 1 changed file with 20 additions and 19 deletions.
39 changes: 20 additions & 19 deletions src/gui/guiFormSpecMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1840,30 +1840,31 @@ void GUIFormSpecMenu::parseSuperTip(parserData *data, const std::string &element

e->setVisible(false);
e->drop();
} else {
std::string fieldname = parts[0];
core::rect<s32> rect;

for (const auto &f : m_fields) {
if (f.fname == fieldname) {
auto *e = getElementFromId(f.fid, true);
rect = e->getAbsoluteClippingRect();
break;
}
}
return;
}

s32 width = stof(parts[2]) * spacing.Y;
v2s32 stpos;
std::string fieldname = parts[0];
core::rect<s32> rect;

if (!floating) {
if (data->real_coordinates)
stpos = getRealCoordinateBasePos(v_stpos);
else
stpos = getElementBasePos(&v_stpos);
for (const auto &f : m_fields) {
if (f.fname == fieldname) {
auto *e = getElementFromId(f.fid, true);
rect = e->getAbsoluteClippingRect();
break;
}
}

s32 width = stof(parts[2]) * spacing.Y;
v2s32 stpos;

m_supertip_map[fieldname] = SuperTipSpec(name, fieldname, text, rect, stpos, width, floating);
if (!floating) {
if (data->real_coordinates)
stpos = getRealCoordinateBasePos(v_stpos);
else
stpos = getElementBasePos(&v_stpos);
}

m_supertip_map[fieldname] = SuperTipSpec(name, fieldname, text, rect, stpos, width, floating);
}

void GUIFormSpecMenu::parseLabel(parserData* data, const std::string &element)
Expand Down

0 comments on commit f5c62c3

Please sign in to comment.