summaryrefslogtreecommitdiff
path: root/src/gui/window.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-04-02 10:39:33 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-04-02 10:39:33 +0000
commite89ecd460dd2aa14aa7fd01292628fb74cb34692 (patch)
treee92c24b0677d30e81e6532b874b6afb0a363a63f /src/gui/window.cpp
parent4e668b287b3c32d4f586febdd259983f2f0504c3 (diff)
downloadmana-e89ecd460dd2aa14aa7fd01292628fb74cb34692.tar.gz
mana-e89ecd460dd2aa14aa7fd01292628fb74cb34692.tar.bz2
mana-e89ecd460dd2aa14aa7fd01292628fb74cb34692.tar.xz
mana-e89ecd460dd2aa14aa7fd01292628fb74cb34692.zip
Less Image::setAlpha calls.
Diffstat (limited to 'src/gui/window.cpp')
-rw-r--r--src/gui/window.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/window.cpp b/src/gui/window.cpp
index 7eb8643f..ab37dae8 100644
--- a/src/gui/window.cpp
+++ b/src/gui/window.cpp
@@ -69,6 +69,10 @@ Window::Window(const std::string& caption, bool modal, Window *parent):
// Load GUI alpha setting
guiAlpha = config.getValue("guialpha", 0.8f);
+
+ // Set GUI alpha level
+ dBackground->setAlpha(guiAlpha);
+ dBorders->setAlpha(guiAlpha);
}
Window::~Window()
@@ -100,9 +104,6 @@ void Window::draw(gcn::Graphics* graphics)
{
int x, y;
getAbsolutePosition(x, y);
-
- dBackground->setAlpha(guiAlpha);
- dBorders->setAlpha(guiAlpha);
((Graphics*)graphics)->drawImageRect(x, y, getWidth(), getHeight(),
border);