165 mIcon->setPosition(0, 0);
166 space =
mIcon->getWidth();
176 std::string caption = item.
name;
183 const auto typeColorId = getColorIdFromItemType(
mItemType);
187 mItemName->setForegroundColor(palette.getColor(typeColorId));
197 int minWidth =
mItemName->getWidth() + space;
206 const int descHeight =
mItemDesc->getHeight();
210 int nameHeight = std::max(
mItemName->getHeight(),
mIcon->getHeight());
224 mItemWeight->setPosition(0, nameHeight + descHeight + effectHeight +
A text box, meant to be used inside a scroll area.
void setTextWrapped(const std::string &text, int minDimension)
Sets the text after wrapping it to the current width of the widget.
int getMinWidth() const
Get the minimum text width for the text box.
std::string join(const std::vector< std::string > &strings, const char *separator)
Joins a vector of strings into one string, separated by the given separator.