27#include <guichan/listmodel.hpp>
71 return mColors[type].committedColor;
94 mColors[type].testColor = color;
105 void setColor(
int type,
int r,
int g,
int b);
118 {
mColors[type].delay = delay; }
174 void commit(
bool commitNonStatic);
Class controlling the game's color palette.
std::vector< ColorElem > mColors
Vector containing the colors.
GradientType
Colors can be static or can alter over time.
Class controlling the game's color palette.
void setColor(int type, int r, int g, int b)
Sets the color for the specified type.
void rollback()
Rollback the colors.
void setGradient(int type, Palette::GradientType grad)
Sets the gradient type for the specified color.
int getColorTypeAt(int i)
Gets the ColorType used by the color for the element at index i in the current color model.
@ HIT_LOCAL_PLAYER_MONSTER
@ HIT_LOCAL_PLAYER_CRITICAL
std::string getElementAt(int i) override
Returns the name of the ith color.
void commit()
Commit the colors.
void setTestColor(int type, const gcn::Color &color)
Sets the test color associated with the specified type.
const gcn::Color & getCommittedColor(int type)
Gets the committed color associated with the specified type.
const gcn::Color & getTestColor(int type)
Gets the test color associated with the specified type.
void setGradientDelay(int type, int delay)
Sets the gradient delay for the specified color.
int getNumberOfElements() override
Returns the number of colors known.
void addColor(int type, unsigned int rgb, GradientType grad, const std::string &text, int delay=GRADIENT_DELAY)
Initialise color.
void setColorAt(int i, int r, int g, int b)
Define a color replacement.
constexpr int GRADIENT_DELAY
UserPalette * userPalette