diff options
author | Ira Rice <irarice@gmail.com> | 2009-01-28 23:41:36 -0700 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-01-28 23:41:36 -0700 |
commit | 5a3c174a53ed90224dc4fc49744c656eb9d358fa (patch) | |
tree | 2ce68b58ba1f10d9b54d9f1de168a9a9c78ad5f4 /src/resources/iteminfo.h | |
parent | 0e2a2f39a2137ea1caae96256431c7d35fc2e6ec (diff) | |
download | mana-5a3c174a53ed90224dc4fc49744c656eb9d358fa.tar.gz mana-5a3c174a53ed90224dc4fc49744c656eb9d358fa.tar.bz2 mana-5a3c174a53ed90224dc4fc49744c656eb9d358fa.tar.xz mana-5a3c174a53ed90224dc4fc49744c656eb9d358fa.zip |
Added coloring of item names by type. TODO: Allow this to be
customizable through the color interface so that if someone is
colorblind to a certain color and it doesn't show up well, they can
change it (or even people who just don't like the default color).
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/resources/iteminfo.h')
-rw-r--r-- | src/resources/iteminfo.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h index 86725ca2..c03dec28 100644 --- a/src/resources/iteminfo.h +++ b/src/resources/iteminfo.h @@ -47,7 +47,7 @@ class ItemInfo * Constructor. */ ItemInfo(): - mType(0), + mType(""), mWeight(0), mView(0), mAttackType(ACTION_DEFAULT) @@ -81,14 +81,12 @@ class ItemInfo void setEffect(const std::string &effect) { mEffect = effect; } - const std::string& - getEffect() const { return mEffect; } + const std::string& getEffect() const { return mEffect; } - void setType(short type) + void setType(const std::string& type) { mType = type; } - short getType() const - { return mType; } + const std::string& getType() const { return mType; } void setWeight(short weight) { mWeight = weight; } @@ -118,7 +116,7 @@ class ItemInfo std::string mName; std::string mDescription; /**< Short description. */ std::string mEffect; /**< Description of effects. */ - char mType; /**< Item type. */ + std::string mType; /**< Item type. */ short mWeight; /**< Weight in grams. */ int mView; /**< Item ID of how this item looks. */ int mId; /**< Item ID */ |