ManaPlus
|
#include <spellshortcut.h>
Public Member Functions | |
SpellShortcut () | |
~SpellShortcut () | |
void | load () |
void | setItemSelected (const int itemId) |
bool | isItemSelected () const |
int | getSelectedItem () const |
int | getItem (const size_t index) const |
Static Public Member Functions | |
static unsigned int | getSpellsCount () |
Private Attributes | |
int | mItems [SPELLS_SIZE] |
int | mItemSelected |
The class which keeps track of the item shortcuts.
Definition at line 31 of file spellshortcut.h.
SpellShortcut::SpellShortcut | ( | ) |
SpellShortcut::~SpellShortcut | ( | ) |
|
inline |
Returns the shortcut item ID specified by the index.
index | Index of the shortcut item. |
Definition at line 78 of file spellshortcut.h.
References mItems.
Referenced by SpellShortcutContainer::getItemByIndex().
|
inline |
Returns selected shortcut item ID.
Definition at line 70 of file spellshortcut.h.
References mItemSelected.
Referenced by SpellShortcutContainer::draw(), SpellShortcutContainer::mouseReleased(), and SpellShortcutContainer::safeDraw().
|
static |
Definition at line 60 of file spellshortcut.cpp.
References SPELL_SHORTCUT_ITEMS.
Referenced by SpellShortcutContainer::SpellShortcutContainer().
|
inline |
A flag to check if the item is selected.
Definition at line 64 of file spellshortcut.h.
References mItemSelected.
void SpellShortcut::load | ( | ) |
Load the configuration information.
Definition at line 42 of file spellshortcut.cpp.
References SpellManager::getAll(), mItems, spellManager, and SPELLS_SIZE.
Referenced by SpellShortcut().
|
inline |
Set the item that is selected.
itemId | The ID of the item that is to be assigned. |
Definition at line 58 of file spellshortcut.h.
References mItemSelected.
Referenced by ItemShortcutContainer::mousePressed(), and SpellShortcutContainer::mouseReleased().
|
private |
Definition at line 82 of file spellshortcut.h.
|
private |
The item held by cursor.
Definition at line 83 of file spellshortcut.h.
Referenced by getSelectedItem(), isItemSelected(), and setItemSelected().