diff options
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(), |