Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
blob: 9049b72940323eac303a71fd6456501ecff37136 (plain)
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/*
   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, 1.0f),
		palette_highlight(1.0f, 1.0f, 0.5f),
		palette_disabled(0.5f, 0.5f, 0.5f, 1.0f),
		palette_pointer(0.0f, 0.75f, 0.0f, 1.0f),
		palette_active(0.0f, 1.0f, 0.0f, 1.0f),
		palette_debug(0.50f, 0.75f),
		palette_mission(1.0f, 0.5f, 1.0f, 1.0f),
		palette_bold(1.0f, 1.0f),
		palette_fancy(0.0f, 1.0f, 0.0f, 1.0f),
		palette_warning(1.0f, 1.0f, 0.0f, 1.0f),
		palette_error(1.0f, 0.0f, 0.0f, 1.0f)
{

}

Palette::Palette(const Palette & other ) :
		palette_foreground(other.foreground()),
		palette_background(other.background()),
		palette_border(other.border()),
		palette_text(other.text()),
		palette_highlight(other.highlight()),
		palette_disabled(other.disabled()),
		palette_pointer(other.pointer()),
		palette_active(other.active()),
		palette_debug(other.debug()),
		palette_mission(other.mission()),
		palette_bold(other.bold()),
		palette_fancy(other.fancy()),
		palette_warning(other.warning()),
		palette_error(other.error())
{

}

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 Disabled:
			return disabled();
			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;
	}
}


}