diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-10-19 20:29:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-10-20 13:55:42 +0300 |
commit | c632452430cb3f886da38fa315cb27a3a3a10d2c (patch) | |
tree | bdaeac586877e77046ef38dd4ad7a97a6b4e7af0 /src/gui/palette.cpp | |
parent | dbba47eabe087d503426b5c5862aaa9263861ea5 (diff) | |
download | mv-c632452430cb3f886da38fa315cb27a3a3a10d2c.tar.gz mv-c632452430cb3f886da38fa315cb27a3a3a10d2c.tar.bz2 mv-c632452430cb3f886da38fa315cb27a3a3a10d2c.tar.xz mv-c632452430cb3f886da38fa315cb27a3a3a10d2c.zip |
Allow get colors from Widget2.
Diffstat (limited to 'src/gui/palette.cpp')
-rw-r--r-- | src/gui/palette.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/palette.cpp b/src/gui/palette.cpp index 092a0daae..b73732e29 100644 --- a/src/gui/palette.cpp +++ b/src/gui/palette.cpp @@ -77,6 +77,19 @@ const gcn::Color& Palette::getCharColor(const signed char c, bool &valid) return BLACK; } +int Palette::getIdByChar(const signed char c, bool &valid) +{ + const CharColors::const_iterator it = mCharColors.find(c); + if (it != mCharColors.end()) + { + valid = true; + return (*it).second; + } + + valid = false; + return 0; +} + void Palette::advanceGradients() { for (Palettes::const_iterator it = mInstances.begin(), |