summaryrefslogtreecommitdiff
path: root/src/gui/emoteshortcutcontainer.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-01-30 10:56:54 -0700
committerIra Rice <irarice@gmail.com>2009-01-30 10:56:54 -0700
commitd57be9d49c55bc0b85eb8f539ff2029518cfafc0 (patch)
treedf3726aab3d3a4227330496e3b54803a713b1e7d /src/gui/emoteshortcutcontainer.cpp
parentcc37b4a9153379d5c5529ba85305d36efba2cd85 (diff)
downloadmana-d57be9d49c55bc0b85eb8f539ff2029518cfafc0.tar.gz
mana-d57be9d49c55bc0b85eb8f539ff2029518cfafc0.tar.bz2
mana-d57be9d49c55bc0b85eb8f539ff2029518cfafc0.tar.xz
mana-d57be9d49c55bc0b85eb8f539ff2029518cfafc0.zip
Exposed most gui elements to take alpha values. There are still a few
spots that could also be fixed up as well, but require other methods to fix them (the filled color rectangles on the progress bars, as well as the text on them as well, as an example). Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/emoteshortcutcontainer.cpp')
-rw-r--r--src/gui/emoteshortcutcontainer.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gui/emoteshortcutcontainer.cpp b/src/gui/emoteshortcutcontainer.cpp
index f5ee9843..e35d037f 100644
--- a/src/gui/emoteshortcutcontainer.cpp
+++ b/src/gui/emoteshortcutcontainer.cpp
@@ -22,6 +22,7 @@
#include "emoteshortcutcontainer.h"
#include "../animatedsprite.h"
+#include "../configuration.h"
#include "../emoteshortcut.h"
#include "../graphics.h"
#include "../inventory.h"
@@ -42,11 +43,10 @@
static const int MAX_ITEMS = 12;
EmoteShortcutContainer::EmoteShortcutContainer():
+ ShortcutContainer(),
mEmoteClicked(false),
mEmoteMoved(0)
{
- mGridWidth = 1,
- mGridHeight = 1,
addMouseListener(this);
addWidgetListener(this);
@@ -54,6 +54,8 @@ EmoteShortcutContainer::EmoteShortcutContainer():
mBackgroundImg = resman->getImage("graphics/gui/item_shortcut_bgr.png");
+ mBackgroundImg->setAlpha(config.getValue("guialpha", 0.8));
+
// Setup emote sprites
for (int i = 0; i <= EmoteDB::getLast(); i++)
{
@@ -96,6 +98,7 @@ void EmoteShortcutContainer::draw(gcn::Graphics *graphics)
}
}
+
if (mEmoteMoved)
{
// Draw the emote image being dragged by the cursor.
@@ -108,6 +111,12 @@ void EmoteShortcutContainer::draw(gcn::Graphics *graphics)
sprite->draw(g, tPosX, tPosY);
}
}
+
+ if (config.getValue("guialpha", 0.8) != mAlpha)
+ {
+ mAlpha = config.getValue("guialpha", 0.8);
+ mBackgroundImg->setAlpha(mAlpha);
+ }
}
void EmoteShortcutContainer::mouseDragged(gcn::MouseEvent &event)