-
Notifications
You must be signed in to change notification settings - Fork 0
/
color_box.h
31 lines (25 loc) · 874 Bytes
/
color_box.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef ASCII_PAINT_COLOR_BOX_H
#define ASCII_PAINT_COLOR_BOX_H
#include "gui/gui.hpp"
#include "app_user.h"
class TCODColor;
// A ColorBox is the same as an Image except for one difference.
// When clicked a ColorBox will display a screen full of colors from which
// the user is to pick a color. The color that the user picks gets put into
// a variable which we set earlier using setColorToChange. (Hmm.. Maybe I
// should just have a member called col which will hold the color. Oh well.)
class ColorBox : public Image, public AppUser {
public :
ColorBox(int x,int y,int w, int h, const char *tip=NULL);
virtual ~ColorBox();
void setColorToChange(TCODColor *col);
int satRows;
int satCols;
int hueCols;
int valRows;
protected :
void onButtonClick();
void drawColorGrid(TCODConsole *con, float saturation);
TCODColor *colorToChange;
};
#endif