From b08958152524cb5c26bab8b8a9943f71acfbded3 Mon Sep 17 00:00:00 2001 From: Fate Date: Fri, 28 Nov 2008 21:49:25 -0700 Subject: Changed inventory container protocol to guarantee that we have no stale item references lying around --- src/gui/itemcontainer.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gui/itemcontainer.h') 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; -- cgit v1.2.3-70-g09d2