summaryrefslogtreecommitdiff
path: root/src/gui/palette.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-23 21:59:21 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-23 22:00:09 +0100
commit99e8a3fd77b63a029fe02dcf771b6af1aad252ed (patch)
tree03c296d1f89859aae35336dfe2f58df09d256fd3 /src/gui/palette.h
parentfa8a4bf49100c0a1d5b96e00803f43bbbb861100 (diff)
parent347452b9b69ef3af29c577b7751082822e900c01 (diff)
downloadmana-99e8a3fd77b63a029fe02dcf771b6af1aad252ed.tar.gz
mana-99e8a3fd77b63a029fe02dcf771b6af1aad252ed.tar.bz2
mana-99e8a3fd77b63a029fe02dcf771b6af1aad252ed.tar.xz
mana-99e8a3fd77b63a029fe02dcf771b6af1aad252ed.zip
Merge branch 'aethyra/master'
Conflicts: Many files.
Diffstat (limited to 'src/gui/palette.h')
-rw-r--r--src/gui/palette.h44
1 files changed, 43 insertions, 1 deletions
diff --git a/src/gui/palette.h b/src/gui/palette.h
index e56bf9c5..1a466ed4 100644
--- a/src/gui/palette.h
+++ b/src/gui/palette.h
@@ -1,6 +1,7 @@
/*
* Configurable text colors
* Copyright (C) 2008 Douglas Boffey <dougaboffey@netscape.net>
+ * Copyright (C) 2009 The Mana World Development Team
*
* This file is part of The Mana World.
*
@@ -50,8 +51,10 @@ class Palette : public gcn::ListModel
ENTRY(TEXT)\
ENTRY(SHADOW)\
ENTRY(OUTLINE)\
+ ENTRY(PROGRESS_BAR)\
ENTRY(BACKGROUND)\
ENTRY(HIGHLIGHT)\
+ ENTRY(TAB_HIGHLIGHT)\
ENTRY(SHOP_WARNING)\
ENTRY(CHAT)\
ENTRY(GM)\
@@ -68,6 +71,19 @@ class Palette : public gcn::ListModel
ENTRY(GM_NAME)\
ENTRY(NPC)\
ENTRY(MONSTER)\
+ ENTRY(UNKNOWN_ITEM)\
+ ENTRY(GENERIC)\
+ ENTRY(HEAD)\
+ ENTRY(USABLE)\
+ ENTRY(TORSO)\
+ ENTRY(ONEHAND)\
+ ENTRY(LEGS)\
+ ENTRY(FEET)\
+ ENTRY(TWOHAND)\
+ ENTRY(SHIELD)\
+ ENTRY(RING)\
+ ENTRY(ARMS)\
+ ENTRY(AMMO)\
ENTRY(PARTICLE)\
ENTRY(EXP_INFO)\
ENTRY(PICKUP_INFO)\
@@ -82,6 +98,7 @@ class Palette : public gcn::ListModel
/** Colors can be static or can alter over time. */
enum GradientType {
STATIC,
+ PULSE,
SPECTRUM,
RAINBOW
};
@@ -136,6 +153,29 @@ class Palette : public gcn::ListModel
}
/**
+ * Gets the test color associated with the specified type.
+ *
+ * @param type the color type requested
+ *
+ * @return the requested test color
+ */
+ inline const gcn::Color& getTestColor(ColorType type)
+ {
+ return mColVector[type].testColor;
+ }
+
+ /**
+ * Sets the test color associated with the specified type.
+ *
+ * @param type the color type requested
+ * @param color the color that should be tested
+ */
+ inline void setTestColor(ColorType type, gcn::Color color)
+ {
+ mColVector[type].testColor = color;
+ }
+
+ /**
* Gets the GradientType associated with the specified type.
*
* @param type the color type of the color
@@ -252,6 +292,7 @@ class Palette : public gcn::ListModel
{
ColorType type;
gcn::Color color;
+ gcn::Color testColor;
gcn::Color committedColor;
std::string text;
char ch;
@@ -270,7 +311,8 @@ class Palette : public gcn::ListModel
ColorElem::gradientIndex = rand();
}
- inline int getRGB() {
+ inline int getRGB()
+ {
return (committedColor.r << 16) | (committedColor.g << 8) |
committedColor.b;
}