summaryrefslogtreecommitdiff
path: root/src/gui/palette.h
diff options
context:
space:
mode:
authorMajin Sniper <majinsniper@gmx.de>2009-03-12 16:48:03 +0100
committerIra Rice <irarice@gmail.com>2009-03-12 21:38:36 -0600
commit5207b4cbb462cfa962a6f566897a6affd92eef94 (patch)
treec9129fbf894b7756f5c4c5e1180492433ca11ee2 /src/gui/palette.h
parent7d20381b7b9abdf0934ee0fbbb196c788ea93a0d (diff)
downloadmana-client-5207b4cbb462cfa962a6f566897a6affd92eef94.tar.gz
mana-client-5207b4cbb462cfa962a6f566897a6affd92eef94.tar.bz2
mana-client-5207b4cbb462cfa962a6f566897a6affd92eef94.tar.xz
mana-client-5207b4cbb462cfa962a6f566897a6affd92eef94.zip
Extend color config gui to support the new colors
The new color palette supports many more colors that the browserbox can display. So a change to the color config gui was needed.
Diffstat (limited to 'src/gui/palette.h')
-rw-r--r--src/gui/palette.h26
1 files changed, 19 insertions, 7 deletions
diff --git a/src/gui/palette.h b/src/gui/palette.h
index a372d6cd..02489686 100644
--- a/src/gui/palette.h
+++ b/src/gui/palette.h
@@ -109,7 +109,7 @@ class Palette : public gcn::ListModel
const gcn::Color& getColor(char c, bool &valid);
/**
- * Gets the color with the associated type. Sets the alpha channel
+ * Gets the color associated with the type. Sets the alpha channel
* before returning.
*
* @param type the color type requested
@@ -125,12 +125,24 @@ class Palette : public gcn::ListModel
}
/**
- * Gets the GradientType used by the specified color.
- *
- * @param type the color type of the color
- *
- * @return the gradient type of the color with the given index
- */
+ * Gets the committed color associated with the specified type.
+ *
+ * @param type the color type requested
+ *
+ * @return the requested committed color
+ */
+ inline const gcn::Color& getCommittedColor(ColorType type)
+ {
+ return mColVector[type].committedColor;
+ }
+
+ /**
+ * Gets the GradientType associated with the specified type.
+ *
+ * @param type the color type of the color
+ *
+ * @return the gradient type of the color with the given index
+ */
inline GradientType getGradientType(ColorType type)
{
return mColVector[type].grad;