summaryrefslogtreecommitdiff
path: root/src/gui/itemshortcutcontainer.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-11-01 16:44:58 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-11-01 16:44:58 +0000
commitbabaec33e51991475ba2ab9ec06c95bbe5f220c0 (patch)
tree562b6bac909eed6154deb248e16abefeb6c643c6 /src/gui/itemshortcutcontainer.cpp
parent55e0ddd7e1d60a56ece679a4c2563bef854e892b (diff)
downloadmana-babaec33e51991475ba2ab9ec06c95bbe5f220c0.tar.gz
mana-babaec33e51991475ba2ab9ec06c95bbe5f220c0.tar.bz2
mana-babaec33e51991475ba2ab9ec06c95bbe5f220c0.tar.xz
mana-babaec33e51991475ba2ab9ec06c95bbe5f220c0.zip
Merged revisions 4207-4209,4221-4222 via svnmerge from
https://themanaworld.svn.sourceforge.net/svnroot/themanaworld/tmw/branches/0.0 ........ r4207 | b_lindeijer | 2008-04-29 11:10:43 +0200 (Tue, 29 Apr 2008) | 6 lines * Fixed issue with determining whether chat input is focused (method no longer virtual). * Fixed sometimes rendering with the wrong font. * Fixed warnings about hiding virtual method, Window now always deletes its children (the option not to do so was never used anyway). ........ r4208 | b_lindeijer | 2008-04-29 13:25:26 +0200 (Tue, 29 Apr 2008) | 3 lines Removed unused option from GCContainer to not delete a child, fixing warnings about hiding virtual method gcn::Container::add. ........ r4209 | b_lindeijer | 2008-04-29 14:58:21 +0200 (Tue, 29 Apr 2008) | 3 lines When compiling with GCC, use the printf format attribute for the log method so that the compiler checks the type of its parameters. ........ r4221 | peaveydk | 2008-05-06 21:23:49 +0200 (Tue, 06 May 2008) | 1 line Dont allow dragging of empty placeholders. ........ r4222 | peaveydk | 2008-05-08 00:49:38 +0200 (Thu, 08 May 2008) | 1 line Make F8 toggle shortcut window as suggested by And1 an fate. ........
Diffstat (limited to 'src/gui/itemshortcutcontainer.cpp')
-rw-r--r--src/gui/itemshortcutcontainer.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/itemshortcutcontainer.cpp b/src/gui/itemshortcutcontainer.cpp
index a54e3678..23b41650 100644
--- a/src/gui/itemshortcutcontainer.cpp
+++ b/src/gui/itemshortcutcontainer.cpp
@@ -76,6 +76,8 @@ ItemShortcutContainer::draw(gcn::Graphics *graphics)
{
Graphics *g = static_cast<Graphics*>(graphics);
+ graphics->setFont(getFont());
+
for (int i = 0; i < mMaxItems; i++)
{
const int itemX = (i % mGridWidth) * mBoxWidth;
@@ -149,6 +151,8 @@ ItemShortcutContainer::mouseDragged(gcn::MouseEvent &event)
if (index == -1) {
return;
}
+ if (itemShortcut->getItem(index) < 0)
+ return;
Item *item = player_node->searchForItem(itemShortcut->getItem(index));
if (item)
{