00001 /* 00002 * Extended support for activating emotes 00003 * Copyright (C) 2009 Aethyra Development Team 00004 * 00005 * This file is part of The Mana World. 00006 * 00007 * This program is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 2 of the License, or 00010 * any later version. 00011 * 00012 * This program is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, write to the Free Software 00019 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00020 */ 00021 00022 #ifndef EMOTESHORTCUT_H 00023 #define EMOTESHORTCUT_H 00024 00025 #define SHORTCUT_EMOTES 12 00026 00030 class EmoteShortcut 00031 { 00032 public: 00036 EmoteShortcut(); 00037 00041 ~EmoteShortcut(); 00042 00046 void load(); 00047 00053 int getEmote(int index) const 00054 { return mEmotes[index]; } 00055 00059 int getEmoteCount() const 00060 { return SHORTCUT_EMOTES; } 00061 00065 int getEmoteSelected() const 00066 { return mEmoteSelected; } 00067 00073 void setEmote(int index) 00074 { mEmotes[index] = mEmoteSelected; } 00075 00082 void setEmotes(int index, int emoteId) 00083 { mEmotes[index] = emoteId; } 00084 00090 void setEmoteSelected(int emoteId) 00091 { mEmoteSelected = emoteId; } 00092 00096 bool isEmoteSelected() 00097 { return mEmoteSelected; } 00098 00102 void removeEmote(int index) 00103 { mEmotes[index] = 0; } 00104 00110 void useEmote(int index); 00111 00112 private: 00116 void save(); 00117 00118 int mEmotes[SHORTCUT_EMOTES]; 00119 int mEmoteSelected; 00121 }; 00122 00123 extern EmoteShortcut *emoteShortcut; 00124 00125 #endif