56 Event event(eventName);
57 event.setItem(
"item",
this);
63 Event event(eventName);
64 event.setItem(
"item",
this);
65 event.setInt(
"amount", amount);
std::string getValue(const std::string &key, const std::string &deflt) const
Gets a value as string.
std::string getStringValue(const std::string &key) const
SpriteDisplay display
Display info (like icon)
bool equippable
Whether this item can be equipped.
void doEvent(Event::Type eventType)
ResourceRef< Image > mImage
Item image.
void setId(int id)
Sets the item id, identifying the item type.
bool isEquippable() const
Returns whether this item is equippable.
const ItemInfo & getInfo() const
Returns information about this item type.
Item(int id=-1, int quantity=0, bool equipped=false)
A class for loading and managing resources.
static ResourceManager * getInstance()
Returns an instance of the class, creating one if it does not already exist.
ResourceRef< Image > getImage(const std::string &idPath)
Loads the Image resource found at the given identifier path.
static ResourceRef< Image > getImageFromTheme(const std::string &path)
Configuration paths
XML default paths information reader.