summaryrefslogtreecommitdiff
path: root/src/gui/itemcontainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/itemcontainer.cpp')
-rw-r--r--src/gui/itemcontainer.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp
index e84c79ca..0beb5cfb 100644
--- a/src/gui/itemcontainer.cpp
+++ b/src/gui/itemcontainer.cpp
@@ -1,9 +1,8 @@
/*
- * Aethyra
+ * The Mana World
* Copyright (C) 2004 The Mana World Development Team
*
- * This file is part of Aethyra based on original code
- * from The Mana World.
+ * This file is part of The Mana World.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -20,13 +19,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <SDL_mouse.h>
+#include "itemcontainer.h"
+
+#include "itempopup.h"
#include <guichan/mouseinput.hpp>
#include <guichan/selectionlistener.hpp>
-#include "itemcontainer.h"
-#include "itempopup.h"
+#include <SDL_mouse.h>
#include "../graphics.h"
#include "../inventory.h"
@@ -125,7 +125,7 @@ void ItemContainer::draw(gcn::Graphics *graphics)
// Draw item caption
graphics->setFont(getFont());
- graphics->setColor(0x000000);
+ graphics->setColor(gcn::Color(0, 0, 0));
graphics->drawText(
(item->isEquipped() ? "Eq." : toString(item->getQuantity())),
itemX + gridWidth / 2,
@@ -172,7 +172,6 @@ void ItemContainer::refindSelectedItem()
{
if (mSelectedItemIndex != NO_ITEM)
{
-
if (mInventory->getItem(mSelectedItemIndex) &&
mInventory->getItem(mSelectedItemIndex)->getId() == mLastSelectedItemId)
return; // we're already fine
@@ -205,6 +204,7 @@ void ItemContainer::setSelectedItemIndex(int index)
newSelectedItemIndex = NO_ITEM;
else
newSelectedItemIndex = index;
+
if (mSelectedItemIndex != newSelectedItemIndex)
{
mSelectedItemIndex = newSelectedItemIndex;