ManaPlus
|
#include <emoteshortcut.h>
Public Member Functions | |
EmoteShortcut () | |
~EmoteShortcut () | |
void | load () |
unsigned char | getEmote (const size_t index) const |
unsigned char | getEmoteSelected () const |
void | setEmote (const size_t index) |
void | setEmotes (const size_t index, const unsigned char emoteId) |
void | setEmoteSelected (const unsigned char emoteId) |
bool | isEmoteSelected () const |
void | removeEmote (const size_t index) |
void | useEmote (const size_t index) const |
void | useEmotePlayer (const size_t index) const |
Static Public Member Functions | |
static unsigned int | getEmoteCount () |
Private Member Functions | |
void | save () const |
Private Attributes | |
unsigned char | mEmotes [SHORTCUT_EMOTES] |
unsigned char | mEmoteSelected |
The class which keeps track of the emote shortcuts.
Definition at line 35 of file emoteshortcut.h.
EmoteShortcut::EmoteShortcut | ( | ) |
Constructor.
Definition at line 40 of file emoteshortcut.cpp.
References mEmotes, and SHORTCUT_EMOTES.
EmoteShortcut::~EmoteShortcut | ( | ) |
|
inline |
Returns the shortcut Emote ID specified by the index.
index | Index of the shortcut Emote. |
Definition at line 60 of file emoteshortcut.h.
References mEmotes.
Referenced by EmoteShortcutContainer::mousePressed(), and EmoteShortcutContainer::mouseReleased().
|
inlinestatic |
Returns the amount of shortcut Emotes.
Definition at line 66 of file emoteshortcut.h.
References SHORTCUT_EMOTES.
|
inline |
Returns the emote ID that is currently selected.
Definition at line 72 of file emoteshortcut.h.
References mEmoteSelected.
|
inline |
A flag to check if the Emote is selected.
Definition at line 104 of file emoteshortcut.h.
References mEmoteSelected.
Referenced by EmoteShortcutContainer::mousePressed(), and EmoteShortcutContainer::mouseReleased().
void EmoteShortcut::load | ( | ) |
Load the configuration information.
Definition at line 52 of file emoteshortcut.cpp.
References CAST_U8, EmoteDB::getLast(), EmoteDB::getSprite(), mEmotes, and SHORTCUT_EMOTES.
Referenced by createGuiWindows().
|
inline |
Remove a Emote from the shortcut.
Definition at line 110 of file emoteshortcut.h.
References CAST_SIZE, mEmotes, and SHORTCUT_EMOTES.
|
private |
Save the configuration information.
Definition at line 68 of file emoteshortcut.cpp.
References CAST_U32, CAST_U8, mEmotes, serverConfig, Configuration::setValue(), SHORTCUT_EMOTES, and Catch::toString().
Referenced by ~EmoteShortcut().
|
inline |
Adds the selected emote ID to the emotes specified by the index.
index | Index of the emotes. |
Definition at line 80 of file emoteshortcut.h.
References mEmotes, and mEmoteSelected.
Referenced by EmoteShortcutContainer::mousePressed().
|
inline |
Adds a emoticon to the emotes store specified by the index.
index | Index of the emote. |
emoteId | ID of the emote. |
Definition at line 89 of file emoteshortcut.h.
References mEmotes.
Referenced by EmoteShortcutContainer::mouseReleased().
|
inline |
Set the Emote that is selected.
emoteId | The ID of the emote that is to be assigned. |
Definition at line 98 of file emoteshortcut.h.
References mEmoteSelected.
Referenced by EmoteShortcutContainer::mousePressed(), and EmoteShortcutContainer::mouseReleased().
void EmoteShortcut::useEmote | ( | const size_t | index | ) | const |
Try to use the Emote specified by the index.
index | Index of the emote shortcut. |
Definition at line 88 of file emoteshortcut.cpp.
References CAST_SIZE, Net::HomunculusHandler::emote(), Net::MercenaryHandler::emote(), Net::PetHandler::emote(), LocalPlayer::emote(), Actions::emote(), Settings::emoteType, EmoteType::Homunculus, homunculusHandler, localPlayer, mEmotes, EmoteType::Mercenary, mercenaryHandler, EmoteType::Pet, petHandler, EmoteType::Player, settings, and SHORTCUT_EMOTES.
Referenced by EmoteShortcutContainer::mouseReleased().
void EmoteShortcut::useEmotePlayer | ( | const size_t | index | ) | const |
Definition at line 79 of file emoteshortcut.cpp.
References CAST_SIZE, LocalPlayer::emote(), mEmotes, and SHORTCUT_EMOTES.
|
private |
Definition at line 128 of file emoteshortcut.h.
Referenced by EmoteShortcut(), getEmote(), load(), removeEmote(), save(), setEmote(), setEmotes(), useEmote(), and useEmotePlayer().
|
private |
Definition at line 129 of file emoteshortcut.h.
Referenced by getEmoteSelected(), isEmoteSelected(), setEmote(), and setEmoteSelected().