diff options
author | Fate <fate-tmw@googlemail.com> | 2008-11-28 21:49:25 -0700 |
---|---|---|
committer | Fate <fate-tmw@googlemail.com> | 2008-11-28 21:49:25 -0700 |
commit | b08958152524cb5c26bab8b8a9943f71acfbded3 (patch) | |
tree | 5de0b5e7cfaa1e7c4fc1351289e469d7e792565d /src/gui/itemcontainer.h | |
parent | 4aeedb10f22d0dc307c9f733d0f1c79b70b9c200 (diff) | |
download | mana-b08958152524cb5c26bab8b8a9943f71acfbded3.tar.gz mana-b08958152524cb5c26bab8b8a9943f71acfbded3.tar.bz2 mana-b08958152524cb5c26bab8b8a9943f71acfbded3.tar.xz mana-b08958152524cb5c26bab8b8a9943f71acfbded3.zip |
Changed inventory container protocol to guarantee that we have no stale item references lying around
Diffstat (limited to 'src/gui/itemcontainer.h')
-rw-r--r-- | src/gui/itemcontainer.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/itemcontainer.h b/src/gui/itemcontainer.h index 60b62f08..fd77fea2 100644 --- a/src/gui/itemcontainer.h +++ b/src/gui/itemcontainer.h @@ -105,9 +105,9 @@ class ItemContainer : public gcn::Widget, public gcn::MouseListener, private: /** - * Sets the currently selected item. + * Sets the currently selected item. Invalid (e.g., negative) indices set `no item'. */ - void setSelectedItem(Item *item); + void setSelectedItemIndex(int index); /** * Determine and set the height of the container. @@ -121,7 +121,7 @@ class ItemContainer : public gcn::Widget, public gcn::MouseListener, Inventory *mInventory; Image *mSelImg; - Item *mSelectedItem; + int mSelectedItemIndex; int mMaxItems; |