summaryrefslogtreecommitdiff
path: root/src/gui/smileycontainer.cpp
diff options
context:
space:
mode:
authorForge <jgrimbert@free.fr>2009-01-09 00:03:53 +0100
committerForge <jgrimbert@free.fr>2009-01-09 00:03:53 +0100
commit611210b1e0fd9cbaed38b229462e109d8f4be385 (patch)
treed2fc4f7465ccd611e918a8905d7478aacd458acb /src/gui/smileycontainer.cpp
parent0b2e6c53a158b820a3e3610372c98185a4dce30a (diff)
downloadmana-611210b1e0fd9cbaed38b229462e109d8f4be385.tar.gz
mana-611210b1e0fd9cbaed38b229462e109d8f4be385.tar.bz2
mana-611210b1e0fd9cbaed38b229462e109d8f4be385.tar.xz
mana-611210b1e0fd9cbaed38b229462e109d8f4be385.zip
Now, the real stage 2.0 of smiley window.
All is done, and all files are now in the tree. (ok, copyright of new files is still opened... do as you want, if you care) Signed-off-by: Forge <jgrimbert@free.fr>
Diffstat (limited to 'src/gui/smileycontainer.cpp')
-rw-r--r--src/gui/smileycontainer.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/smileycontainer.cpp b/src/gui/smileycontainer.cpp
index 5eb99723..55f8f11b 100644
--- a/src/gui/smileycontainer.cpp
+++ b/src/gui/smileycontainer.cpp
@@ -31,6 +31,8 @@
#include "../resources/iteminfo.h"
#include "../resources/resourcemanager.h"
+#include "../smileyshortcut.h"
+
#include "../utils/tostring.h"
const int SmileyContainer::gridWidth = 34; // item icon width + 4
@@ -158,7 +160,10 @@ void SmileyContainer::mousePressed(gcn::MouseEvent &event)
int mx = event.getX();
int my = event.getY();
int index = mx / gridWidth + ((my / gridHeight) * columns);
-
- setSelectedItemIndex(index);
+ if (index <mMaxSmiley)
+ {
+ setSelectedItemIndex(index);
+ smileyShortcut->setSmileySelected(index+1);
+ }
}
}