diff options
author | Mateusz Kaduk <mateusz.kaduk@gmail.com> | 2005-04-10 12:11:49 +0000 |
---|---|---|
committer | Mateusz Kaduk <mateusz.kaduk@gmail.com> | 2005-04-10 12:11:49 +0000 |
commit | 7eeb04e1a8bf103e3f8717af1e3ec09f58441bd4 (patch) | |
tree | 22d584cba391e68058c6a182fad94c8b87b99339 /src | |
parent | 74c3b49c1242ef7449fe17198270e1b99b9289e2 (diff) | |
download | mana-client-7eeb04e1a8bf103e3f8717af1e3ec09f58441bd4.tar.gz mana-client-7eeb04e1a8bf103e3f8717af1e3ec09f58441bd4.tar.bz2 mana-client-7eeb04e1a8bf103e3f8717af1e3ec09f58441bd4.tar.xz mana-client-7eeb04e1a8bf103e3f8717af1e3ec09f58441bd4.zip |
Added inventory transparency
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/inventory.cpp | 3 | ||||
-rw-r--r-- | src/gui/inventory.h | 3 | ||||
-rw-r--r-- | src/gui/scrollarea.cpp | 7 | ||||
-rw-r--r-- | src/gui/scrollarea.h | 2 |
4 files changed, 13 insertions, 2 deletions
diff --git a/src/gui/inventory.cpp b/src/gui/inventory.cpp index 7bf5971f..d6851347 100644 --- a/src/gui/inventory.cpp +++ b/src/gui/inventory.cpp @@ -26,6 +26,7 @@ #include "../resources/resourcemanager.h" #include "../resources/image.h" #include "button.h" +#include "scrollarea.h" #include "../being.h" #include "../engine.h" #include "item_amount.h" @@ -43,7 +44,7 @@ InventoryWindow::InventoryWindow(): items = new ItemContainer(); items->setPosition(2, 2); - invenScroll = new gcn::ScrollArea(items); + invenScroll = new ScrollArea(items); invenScroll->setPosition(4, 4); useButton->setEventId("use"); diff --git a/src/gui/inventory.h b/src/gui/inventory.h index ab65c122..f4e814f0 100644 --- a/src/gui/inventory.h +++ b/src/gui/inventory.h @@ -30,6 +30,7 @@ #include "itemcontainer.h" #include "gui.h" #include "window.h" +#include "scrollarea.h" /** * Inventory dialog. @@ -93,7 +94,7 @@ class InventoryWindow : public Window, gcn::ActionListener { private: gcn::Button *useButton, *dropButton; - gcn::ScrollArea *invenScroll; + ScrollArea *invenScroll; int useItem(int index, int id); void updateWidgets(); diff --git a/src/gui/scrollarea.cpp b/src/gui/scrollarea.cpp index ffeb9a1d..d652c94c 100644 --- a/src/gui/scrollarea.cpp +++ b/src/gui/scrollarea.cpp @@ -24,6 +24,7 @@ #include "scrollarea.h" #include "gui.h" #include "../resources/resourcemanager.h" +#include "../main.h" ScrollArea::ScrollArea(): gcn::ScrollArea() @@ -48,6 +49,12 @@ void ScrollArea::init() int bggridy[4] = {0, 4, 19, 24}; int a = 0, x, y; + // Load GUI alpha setting + guiAlpha = config.getValue("guialpha", 0.8f); + + // Set GUI alpha level + textbox->setAlpha(guiAlpha); + for (y = 0; y < 3; y++) { for (x = 0; x < 3; x++) { background.grid[a] = textbox->getSubImage( diff --git a/src/gui/scrollarea.h b/src/gui/scrollarea.h index 304e5b89..27f14372 100644 --- a/src/gui/scrollarea.h +++ b/src/gui/scrollarea.h @@ -26,6 +26,7 @@ #include <guichan.hpp> #include "../graphics.h" +#include "../configuration.h" /** * A scroll area. @@ -71,6 +72,7 @@ class ScrollArea : public gcn::ScrollArea { ImageRect background; ImageRect vMarker; + float guiAlpha; }; #endif |