summaryrefslogtreecommitdiff
path: root/src/gui/colour.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-02-07 12:18:52 -0700
committerIra Rice <irarice@gmail.com>2009-02-07 12:18:52 -0700
commit1b8c088a48822641b53c2a304372471a128c2841 (patch)
tree4f2fbb68a2fb011a572bb5d0d69deb3a16780d92 /src/gui/colour.cpp
parent074ca287804a56f776d641826b1ecfc1454b6c72 (diff)
downloadmana-1b8c088a48822641b53c2a304372471a128c2841.tar.gz
mana-1b8c088a48822641b53c2a304372471a128c2841.tar.bz2
mana-1b8c088a48822641b53c2a304372471a128c2841.tar.xz
mana-1b8c088a48822641b53c2a304372471a128c2841.zip
Added a text color preview to the setup color tab.
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/colour.cpp')
-rw-r--r--src/gui/colour.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/colour.cpp b/src/gui/colour.cpp
index 58d9d1c6..c4505c2f 100644
--- a/src/gui/colour.cpp
+++ b/src/gui/colour.cpp
@@ -93,6 +93,15 @@ std::string Colour::getElementAt(int i)
return mColVector[i].text;
}
+char Colour::getColourCharAt(int i)
+{
+ if (i < 0 || i >= getNumberOfElements())
+ {
+ return 'C';
+ }
+ return mColVector[i].ch;
+}
+
void Colour::addColour(const char c, const int rgb, const std::string &text)
{
int trueRgb = config.getValue("Colour" + text, rgb);