diff options
Diffstat (limited to 'src/itemshortcut.h')
-rw-r--r-- | src/itemshortcut.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/itemshortcut.h b/src/itemshortcut.h index ee59a27ac..b735e899c 100644 --- a/src/itemshortcut.h +++ b/src/itemshortcut.h @@ -63,6 +63,9 @@ class ItemShortcut int getItem(int index) const { return mItems[index]; } + unsigned char getItemColor(int index) const + { return mItemColors[index]; } + /** * Returns the amount of shortcut items. */ @@ -80,8 +83,7 @@ class ItemShortcut * * @param index Index of the items. */ - void setItem(int index) - { mItems[index] = mItemSelected; save(); } + void setItem(int index); /** * Adds an item to the items store specified by the index. @@ -89,8 +91,8 @@ class ItemShortcut * @param index Index of the item. * @param itemId ID of the item. */ - void setItems(int index, int itemId) - { mItems[index] = itemId; save(); } + void setItems(int index, int itemId, unsigned char color) + { mItems[index] = itemId; mItemColors[index] = color; save(); } /** * Set the item that is selected. @@ -100,6 +102,8 @@ class ItemShortcut void setItemSelected(int itemId) { mItemSelected = itemId; } + void setItemSelected(Item *item); + /** * Returns selected shortcut item ID. */ @@ -137,8 +141,10 @@ class ItemShortcut private: - int mItems[SHORTCUT_ITEMS]; /**< The items stored. */ - int mItemSelected; /**< The item held by cursor. */ + int mItems[SHORTCUT_ITEMS]; /**< The items. */ + unsigned char mItemColors[SHORTCUT_ITEMS]; /**< The item colors. */ + int mItemSelected; + int mItemColorSelected; int mNumber; }; |