67 Popup(
"ItemPopup",
"itempopup.xml"),
140 if (
mIcon !=
nullptr)
143 if (image !=
nullptr)
149 const bool showImage)
191 const bool showImage,
193 const int *
const cards,
196 if (
mIcon ==
nullptr)
199 std::string cardsStr;
200 std::string optionsStr;
228 if (oldImage !=
nullptr)
239 if (image !=
nullptr)
267 item.
getName(color).c_str(),
id));
306 (numRowsDesc + 2 + numRowsWeight + numRowsCards + numRowsOptions) *
311 (numRowsDesc + numRowsWeight + numRowsCards + 2) * height);
317 + numRowsWeight + numRowsCards + numRowsOptions) * height);
322 + numRowsWeight + 2) * height);
324 + numRowsWeight + numRowsCards + 2) * height);
332 if (cards ==
nullptr)
333 return std::string();
341 const int32_t charId = cards[2] + 65536 * cards[3];
350 label.append(
strprintf(
_(
"Item named: %s"), name.c_str()));
362 const int id = cards[f];
368 label.append(
info.getName());
374 return _(
"Cards: ") + label;
381 if (options ==
nullptr ||
translator ==
nullptr)
382 return std::string();
383 const size_t sz = options->
size();
385 for (
size_t f = 0; f < sz; f ++)
388 if (option.
index == 0)
395 FOR_EACH (STD_VECTOR<ItemFieldType*>::const_iterator, it, fields)
398 std::string value = valueStr;
400 effect.append(
" / ");
401 if (field->
sign && value[0] !=
'-')
402 value = std::string(
"+").append(value);
411 return _(
"Options: ") + effect;
414 #define caseSetColor(name1, name2) \
417 return label->setForegroundColorAll( \
418 getThemeColor(name2, 255U), \
419 getThemeColor(name2##_OUTLINE, 255U)); \
429 ThemeColorId::ONEHAND)
431 ThemeColorId::TWOHAND)
ActorManager * actorManager
const bool AutoRelease_false
Net::BeingHandler * beingHandler
std::string findCharById(const int32_t id)
virtual void add(Widget *const widget)
std::string getStringValue(const std::string &key) const
void setImage(Image *const image)
const std::string & getDescription() const
const std::string & getName() const
ItemDbTypeT getType() const
const SpriteDisplay & getDisplay() const
const std::string & getEffect() const
std::string getDyeIconColorsString(const ItemColor color) const
uint8_t getRefine() const
const ItemOptionsList * getOptions() const
ItemColor getColor() const
const int * getCards() const
const ItemInfo & getInfo() const
void setForegroundColorAll(const Color &color1, const Color &color2)
void setCaption(const std::string &caption)
virtual void requestNameByCharId(const int id) const =0
const std::string getStr(const std::string &str)
void setEditable(const bool editable)
unsigned int getNumberOfRows() const
void setForegroundColorAll(const Color &color1, const Color &color2)
void setTextWrapped(const std::string &text, const int minDimension)
#define FOR_EACH(type, iter, array)
const ItemColor ItemColor_one
ItemDbType ::T ItemDbTypeT
bool info(InputEvent &event)
std::string toString(T const &value)
converts any type to a string
const ItemInfo & get(const int id)
@ EQUIPMENT_TWO_HANDS_WEAPON
@ EQUIPMENT_ONE_HAND_WEAPON
const std::vector< ItemFieldType * > & getFields(const int id)
Image * getImage(const std::string &idPath)
ServerTypeT getNetworkType()
std::string formatWeight(const int value)
std::string strprintf(const char *const format,...)
std::string combineDye2(std::string file, const std::string &dye)
std::string pathJoin(std::string str1, const std::string &str2)
const std::string description
const ItemOption & get(const size_t index) const