diff options
Diffstat (limited to 'src/gui')
-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 |