summaryrefslogtreecommitdiff
path: root/src/gui/itemcontainer.h
diff options
context:
space:
mode:
authorChuck Miller <shadowmil@gmail.com>2009-05-12 05:24:26 -0400
committerChuck Miller <shadowmil@gmail.com>2009-05-12 06:07:59 -0400
commit5d1c423648bc138fe4a67908a0f16247a80e5967 (patch)
treeda883e1f0c57613e441d579cb786a58462711c31 /src/gui/itemcontainer.h
parent260e22a429311e597e91e2d9a149c8fdbf5df5b3 (diff)
downloadmana-5d1c423648bc138fe4a67908a0f16247a80e5967.tar.gz
mana-5d1c423648bc138fe4a67908a0f16247a80e5967.tar.bz2
mana-5d1c423648bc138fe4a67908a0f16247a80e5967.tar.xz
mana-5d1c423648bc138fe4a67908a0f16247a80e5967.zip
Makes ItemContainer use indexes for selected and highlighted items, rather then Item pointers.
As suggested by Bjorn
Diffstat (limited to 'src/gui/itemcontainer.h')
-rw-r--r--src/gui/itemcontainer.h6
1 files changed, 3 insertions, 3 deletions
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;