ManaPlus
Public Member Functions | Data Fields
Palette::ColorElem Struct Reference

#include <palette.h>

Public Member Functions

 ColorElem ()
 
void set (const int type0, const Color &color0, const GradientTypeT grad0, const int delay0)
 
unsigned int getRGB () const
 

Data Fields

int type
 
Color color
 
Color testColor
 
Color committedColor
 
std::string text
 
signed char ch
 
GradientTypeT grad
 
GradientTypeT committedGrad
 
int gradientIndex
 
int delay
 
int committedDelay
 

Detailed Description

Definition at line 102 of file palette.h.

Constructor & Destructor Documentation

◆ ColorElem()

Palette::ColorElem::ColorElem ( )
inline

Definition at line 104 of file palette.h.

104  :
105  type(0),
106  color(0),
107  testColor(0),
108  committedColor(0),
109  text(),
110  ch(0),
113  gradientIndex(0),
114  delay(0),
115  committedDelay(0)
116  {
117  }
std::string text
Definition: palette.h:125
GradientTypeT committedGrad
Definition: palette.h:128
Color committedColor
Definition: palette.h:124
signed char ch
Definition: palette.h:126
GradientTypeT grad
Definition: palette.h:127

Member Function Documentation

◆ getRGB()

unsigned int Palette::ColorElem::getRGB ( ) const
inline

Definition at line 146 of file palette.h.

147  {
148  return (committedColor.r << 16) | (committedColor.g << 8) |
150  }
unsigned int b
Definition: color.h:245
unsigned int r
Definition: color.h:235
unsigned int g
Definition: color.h:240

References Color::b, committedColor, Color::g, and Color::r.

◆ set()

void Palette::ColorElem::set ( const int  type0,
const Color color0,
const GradientTypeT  grad0,
const int  delay0 
)
inline

Definition at line 133 of file palette.h.

137  {
138  type = type0;
139  color = color0;
140  testColor = color0;
141  grad = grad0;
142  delay = delay0;
143  gradientIndex = rand();
144  }

References color, delay, grad, gradientIndex, testColor, and type.

Field Documentation

◆ ch

signed char Palette::ColorElem::ch

Definition at line 126 of file palette.h.

◆ color

Color Palette::ColorElem::color

Definition at line 122 of file palette.h.

Referenced by set().

◆ committedColor

Color Palette::ColorElem::committedColor

Definition at line 124 of file palette.h.

Referenced by getRGB().

◆ committedDelay

int Palette::ColorElem::committedDelay

Definition at line 131 of file palette.h.

◆ committedGrad

GradientTypeT Palette::ColorElem::committedGrad

Definition at line 128 of file palette.h.

◆ delay

int Palette::ColorElem::delay

Definition at line 130 of file palette.h.

Referenced by set().

◆ grad

GradientTypeT Palette::ColorElem::grad

Definition at line 127 of file palette.h.

Referenced by set(), and UserPalette::setGradient().

◆ gradientIndex

int Palette::ColorElem::gradientIndex

Definition at line 129 of file palette.h.

Referenced by set().

◆ testColor

Color Palette::ColorElem::testColor

Definition at line 123 of file palette.h.

Referenced by set().

◆ text

std::string Palette::ColorElem::text

Definition at line 125 of file palette.h.

◆ type

int Palette::ColorElem::type

Definition at line 121 of file palette.h.

Referenced by set().


The documentation for this struct was generated from the following file: