From d57be9d49c55bc0b85eb8f539ff2029518cfafc0 Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Fri, 30 Jan 2009 10:56:54 -0700 Subject: 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 --- src/gui/scrollarea.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/gui/scrollarea.cpp') diff --git a/src/gui/scrollarea.cpp b/src/gui/scrollarea.cpp index 1d7f8472..a892f2d0 100644 --- a/src/gui/scrollarea.cpp +++ b/src/gui/scrollarea.cpp @@ -32,6 +32,7 @@ #include "../utils/dtor.h" int ScrollArea::instances = 0; +float ScrollArea::mAlpha = config.getValue("guialpha", 0.8); ImageRect ScrollArea::background; ImageRect ScrollArea::vMarker; Image *ScrollArea::buttons[4][2]; @@ -193,6 +194,16 @@ void ScrollArea::draw(gcn::Graphics *graphics) mScrollbarWidth)); } + if (config.getValue("guialpha", 0.8) != mAlpha) + { + mAlpha = config.getValue("guialpha", 0.8); + for (int a = 0; a < 9; a++) + { + background.grid[a]->setAlpha(mAlpha); + vMarker.grid[a]->setAlpha(mAlpha); + } + } + drawChildren(graphics); } -- cgit v1.2.3-70-g09d2