summaryrefslogtreecommitdiff
path: root/src/gui/widgets/emoteshortcutcontainer.h
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-02-15 14:15:27 +0100
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-02-15 14:15:34 +0100
commit278d9aa7eb084bd6f93e6ac1fd84033dc316ab5e (patch)
treee1a095b48e34b844405801f7240501fe89579b38 /src/gui/widgets/emoteshortcutcontainer.h
parent2779eb792a04667958feab9b433c1c82392c0bc3 (diff)
downloadmana-278d9aa7eb084bd6f93e6ac1fd84033dc316ab5e.tar.gz
mana-278d9aa7eb084bd6f93e6ac1fd84033dc316ab5e.tar.bz2
mana-278d9aa7eb084bd6f93e6ac1fd84033dc316ab5e.tar.xz
mana-278d9aa7eb084bd6f93e6ac1fd84033dc316ab5e.zip
Fix handling of non-consecutive emote IDs
Previous code was assuming there would be no gaps in the emote IDs. Also cleaned up some confusion where the "emote ID" being passed around in the code was often offset by 1. Now it is only offset in communication with tmwAthena and when saving the shortcuts.
Diffstat (limited to 'src/gui/widgets/emoteshortcutcontainer.h')
-rw-r--r--src/gui/widgets/emoteshortcutcontainer.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/gui/widgets/emoteshortcutcontainer.h b/src/gui/widgets/emoteshortcutcontainer.h
index 209a3725..ecd41736 100644
--- a/src/gui/widgets/emoteshortcutcontainer.h
+++ b/src/gui/widgets/emoteshortcutcontainer.h
@@ -24,10 +24,6 @@
#include "gui/widgets/shortcutcontainer.h"
-#include <vector>
-
-class ImageSprite;
-
/**
* An emote shortcut container. Used to quickly use emoticons.
*
@@ -61,10 +57,8 @@ class EmoteShortcutContainer : public ShortcutContainer
void mouseReleased(gcn::MouseEvent &event) override;
private:
- std::vector<const ImageSprite*> mEmoteImg;
-
bool mEmoteClicked = false;
- int mEmoteMoved = 0;
+ int mEmoteMoved = -1;
};
#endif