diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-03-19 13:47:35 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-03-19 13:47:35 +0000 |
commit | d8bb10d04c8b0d42dd774bef8531564413267276 (patch) | |
tree | 6545b8d2fb771f1cc45a6b308054acbcb069b51d /src/gui | |
parent | 0f7927ab8aadc2c6f42c70d2809b357efc4ddb2f (diff) | |
download | mana-d8bb10d04c8b0d42dd774bef8531564413267276.tar.gz mana-d8bb10d04c8b0d42dd774bef8531564413267276.tar.bz2 mana-d8bb10d04c8b0d42dd774bef8531564413267276.tar.xz mana-d8bb10d04c8b0d42dd774bef8531564413267276.zip |
Added config option for GUI alpha.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/window.cpp | 8 | ||||
-rw-r--r-- | src/gui/window.h | 1 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/window.cpp b/src/gui/window.cpp index a04836a2..13f0cc9a 100644 --- a/src/gui/window.cpp +++ b/src/gui/window.cpp @@ -24,6 +24,7 @@ #include "window.h" #include "../resources/resourcemanager.h" #include "../log.h" +#include "../main.h" WindowContainer *Window::windowContainer = NULL; @@ -77,6 +78,9 @@ Window::Window(const std::string& text, bool modal, Window *parent): else { throw GCN_EXCEPTION("Window::Window. no windowContainer set"); } + + // Load GUI alpha setting + guiAlpha = config.getValue("guialpha", 0.8f); } Window::~Window() @@ -101,8 +105,8 @@ void Window::draw(gcn::Graphics* graphics) int x, y; getAbsolutePosition(x, y); - dBackground->setAlpha(0.8f); - dBorders->setAlpha(0.8f); + dBackground->setAlpha(guiAlpha); + dBorders->setAlpha(guiAlpha); ((Graphics*)graphics)->drawImageRect(x, y, getWidth(), getHeight(), border); diff --git a/src/gui/window.h b/src/gui/window.h index 143c8235..deb00583 100644 --- a/src/gui/window.h +++ b/src/gui/window.h @@ -50,6 +50,7 @@ class Window : public gcn::Container, public gcn::MouseListener gcn::Color titlebarColor; /**< Title bar color */ int titlebarHeight; /**< Height of title bar */ int padding; /**< Space between contents and border */ + float guiAlpha; /**< Opacity of GUI windows */ Image *dBackground; /**< Left side of title bar */ Image *dBorders; /**< Middle of title bar */ |