summaryrefslogtreecommitdiff
path: root/src/gui/palette.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-30 16:04:27 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-30 16:04:27 +0300
commitdc8422dbac2c45a082153240138d699c1bfc3b88 (patch)
treed073286b567fe45179440e678be779c8eb8c0f0e /src/gui/palette.h
parentaa86dbe6a7c966a4bfa7aa6c81218fe58f0bf92d (diff)
downloadmv-dc8422dbac2c45a082153240138d699c1bfc3b88.tar.gz
mv-dc8422dbac2c45a082153240138d699c1bfc3b88.tar.bz2
mv-dc8422dbac2c45a082153240138d699c1bfc3b88.tar.xz
mv-dc8422dbac2c45a082153240138d699c1bfc3b88.zip
Move gradient type into separate file.
Diffstat (limited to 'src/gui/palette.h')
-rw-r--r--src/gui/palette.h23
1 files changed, 8 insertions, 15 deletions
diff --git a/src/gui/palette.h b/src/gui/palette.h
index c8bf5de47..b42ada438 100644
--- a/src/gui/palette.h
+++ b/src/gui/palette.h
@@ -26,6 +26,8 @@
#include "logger.h"
+#include "enums/gui/gradienttype.h"
+
#include "gui/color.h"
#if defined __native_client__
@@ -49,15 +51,6 @@ class Palette notfinal
/** Black Color Constant */
static const Color BLACK;
- /** Colors can be static or can alter over time. */
- enum GradientType
- {
- STATIC = 0,
- PULSE,
- SPECTRUM,
- RAINBOW
- };
-
A_DELETE_COPY(Palette)
/**
@@ -111,7 +104,7 @@ class Palette notfinal
*
* @return the gradient type of the color with the given index
*/
- inline GradientType getGradientType(const int type) const A_WARN_UNUSED
+ inline GradientTypeT getGradientType(const int type) const A_WARN_UNUSED
{ return mColors[type].grad; }
/**
@@ -171,8 +164,8 @@ class Palette notfinal
committedColor(0),
text(),
ch(0),
- grad(STATIC),
- committedGrad(STATIC),
+ grad(GradientType::STATIC),
+ committedGrad(GradientType::STATIC),
gradientIndex(0),
delay(0),
committedDelay(0)
@@ -185,14 +178,14 @@ class Palette notfinal
Color committedColor;
std::string text;
signed char ch;
- GradientType grad;
- GradientType committedGrad;
+ GradientTypeT grad;
+ GradientTypeT committedGrad;
int gradientIndex;
int delay;
int committedDelay;
void set(const int type0, const Color &color0,
- const GradientType grad0, const int delay0)
+ const GradientTypeT grad0, const int delay0)
{
type = type0;
color = color0;