summaryrefslogtreecommitdiff
path: root/src/gui/palette.h
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-03-14 20:20:04 -0600
committerIra Rice <irarice@gmail.com>2009-03-14 20:20:04 -0600
commit8fb5276dcc5c527a3daf99c18826d6d9bf9802be (patch)
treef1a18874fc863d78c992b63f0ce1521607251ac8 /src/gui/palette.h
parent79fa5a629426888f51241914d90ca8599373f2d0 (diff)
downloadmana-client-8fb5276dcc5c527a3daf99c18826d6d9bf9802be.tar.gz
mana-client-8fb5276dcc5c527a3daf99c18826d6d9bf9802be.tar.bz2
mana-client-8fb5276dcc5c527a3daf99c18826d6d9bf9802be.tar.xz
mana-client-8fb5276dcc5c527a3daf99c18826d6d9bf9802be.zip
Added a pulse effect into the palette class, which uses the set color
and pulsates back and forth between it and black. Added directly after the spectrum effect. Also modified the gradient delay to be a lot farther out, so that we don't end up with a Pokemon seizure causing disaster (the speed was the same, as well as the colors. The new speed should be a lot more considerate of people who are prone to having issues from that speed of color changing). TODO: Modify the palette class to allow for updating the color for the pulse gradient without needing to have it applied first. Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/palette.h')
-rw-r--r--src/gui/palette.h22
1 files changed, 7 insertions, 15 deletions
diff --git a/src/gui/palette.h b/src/gui/palette.h
index f0a3d541..0947aa58 100644
--- a/src/gui/palette.h
+++ b/src/gui/palette.h
@@ -98,6 +98,7 @@ class Palette : public gcn::ListModel
/** Colors can be static or can alter over time. */
enum GradientType {
STATIC,
+ PULSE,
SPECTRUM,
RAINBOW
};
@@ -147,9 +148,7 @@ class Palette : public gcn::ListModel
* @return the requested committed color
*/
inline const gcn::Color& getCommittedColor(ColorType type)
- {
- return mColVector[type].committedColor;
- }
+ { return mColVector[type].committedColor; }
/**
* Gets the GradientType associated with the specified type.
@@ -159,9 +158,7 @@ class Palette : public gcn::ListModel
* @return the gradient type of the color with the given index
*/
inline GradientType getGradientType(ColorType type)
- {
- return mColVector[type].grad;
- }
+ { return mColVector[type].grad; }
/**
* Get the character used by the specified color.
@@ -170,10 +167,7 @@ class Palette : public gcn::ListModel
*
* @return the color char of the color with the given index
*/
- inline char getColorChar(ColorType type)
- {
- return mColVector[type].ch;
- }
+ inline char getColorChar(ColorType type) { return mColVector[type].ch; }
/**
* Sets the color for the specified type.
@@ -221,10 +215,7 @@ class Palette : public gcn::ListModel
/**
* Commit the colors
*/
- inline void commit()
- {
- commit(false);
- }
+ inline void commit() { commit(false); }
/**
* Rollback the colors
@@ -286,7 +277,8 @@ class Palette : public gcn::ListModel
ColorElem::gradientIndex = rand();
}
- inline int getRGB() {
+ inline int getRGB()
+ {
return (committedColor.r << 16) | (committedColor.g << 8) |
committedColor.b;
}