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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
/*
ui/palette.cc
This file is part of the Osirion project and is distributed under
the terms of the GNU General Public License version 2
*/
#include "ui/palette.h"
#include "sys/sys.h"
namespace ui
{
Palette::Palette() :
palette_foreground(1.0f, 1.0f),
palette_background(0.5f, 0.75f),
palette_border(0.0f, 0.8f, 0.0f, 0.5f),
palette_text(0.75f),
palette_highlight(1.0f, 1.0f, 0.5f),
palette_pointer(0.0f, 0.75f, 0.0f),
palette_active(0.0f, 1.0f, 0.0f),
palette_debug(0.50f, 0.75f),
palette_mission(1.0f, 0.5f, 1.0f),
palette_bold(1.0f),
palette_fancy(0.0f, 1.0f, 0.0f),
palette_warning(1.0f, 1.0f, 0.0f),
palette_error(1.0f, 0.0f, 0.0f)
{
}
Palette::~Palette()
{
}
const math::Color &Palette::color(Color palettecolor) const
{
switch(palettecolor) {
case Foreground:
return foreground();
break;
case Background:
return background();
break;
case Border:
return border();
break;
case Text:
return text();
break;
case Highlight:
return highlight();
break;
case Pointer:
return pointer();
break;
case Active:
return active();
break;
case Debug:
return debug();
break;
case Mission:
return mission();
break;
case Bold:
return bold();
break;
case Fancy:
return fancy();
break;
case Warning:
return warning();
break;
case Error:
return error();
break;
default:
return foreground();
break;
}
}
}
|