From 5d1c423648bc138fe4a67908a0f16247a80e5967 Mon Sep 17 00:00:00 2001 From: Chuck Miller Date: Tue, 12 May 2009 05:24:26 -0400 Subject: Makes ItemContainer use indexes for selected and highlighted items, rather then Item pointers. As suggested by Bjorn --- 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 54d7c35e..f446a647 100644 --- a/src/gui/itemcontainer.h +++ b/src/gui/itemcontainer.h @@ -86,7 +86,7 @@ class ItemContainer : public gcn::Widget, /** * Returns the selected item. */ - Item *getSelectedItem(); + Item *getSelectedItem() const; /** * Sets selected item to NULL. @@ -144,7 +144,7 @@ class ItemContainer : public gcn::Widget, /** * Sets the currently selected item. */ - void setSelectedItem(Item *item); + void setSelectedIndex(int index); /** * Find the current item index by the most recently used item ID @@ -173,7 +173,7 @@ class ItemContainer : public gcn::Widget, Inventory *mInventory; int mGridColumns, mGridRows; Image *mSelImg; - Item *mSelectedItem, *mHighlightedItem; + int mSelectedIndex, mHighlightedIndex; SelectionState mSelectionStatus; bool mForceQuantity; bool mSwapItems; -- cgit v1.2.3-70-g09d2