summaryrefslogtreecommitdiff
path: root/src/gui/widgets/window.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-20 03:22:32 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-20 13:55:43 +0300
commit35efb9eba3a198b1dd2959434e82c8da45af689e (patch)
tree9eeec546069c24972ba606acb8c8bd9aeab55f47 /src/gui/widgets/window.cpp
parent4356b56d927afc83685897f0e6482f576a0ae09a (diff)
downloadManaVerse-35efb9eba3a198b1dd2959434e82c8da45af689e.tar.gz
ManaVerse-35efb9eba3a198b1dd2959434e82c8da45af689e.tar.bz2
ManaVerse-35efb9eba3a198b1dd2959434e82c8da45af689e.tar.xz
ManaVerse-35efb9eba3a198b1dd2959434e82c8da45af689e.zip
Add load theme id for windows and popups.
New theme options: palette - palette number for window or popup. childPalette - palette number for window child controls. palette and childPalette should be from 0 to 4.
Diffstat (limited to 'src/gui/widgets/window.cpp')
-rw-r--r--src/gui/widgets/window.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index fa673e420..ae47cb001 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -98,6 +98,7 @@ Window::Window(const std::string &caption, const bool modal,
if (skin == "")
skin = "window.xml";
+ int childPalette = 1;
// Loads the skin
if (Theme::instance())
{
@@ -122,6 +123,8 @@ Window::Window(const std::string &caption, const bool modal,
{
mCaptionAlign = gcn::Graphics::LEFT;
}
+ setPalette(getOption("palette"));
+ childPalette = getOption("childPalette");
}
}
@@ -140,6 +143,9 @@ Window::Window(const std::string &caption, const bool modal,
addWidgetListener(this);
mForegroundColor = getThemeColor(Theme::WINDOW);
+ logger->log("window palettes: %d, %d", mPalette, childPalette);
+ if (childPalette != mPalette)
+ setPalette(childPalette);
}
Window::~Window()