OpenMoHAA
0.82.1
Loading...
Searching...
No Matches
ucolor.h
1
/*
2
===========================================================================
3
Copyright (C) 2024 the OpenMoHAA team
4
5
This file is part of OpenMoHAA source code.
6
7
OpenMoHAA source code is free software; you can redistribute it
8
and/or modify it under the terms of the GNU General Public License as
9
published by the Free Software Foundation; either version 2 of the License,
10
or (at your option) any later version.
11
12
OpenMoHAA source code is distributed in the hope that it will be
13
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU General Public License for more details.
16
17
You should have received a copy of the GNU General Public License
18
along with OpenMoHAA source code; if not, write to the Free Software
19
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20
===========================================================================
21
*/
22
23
#pragma once
24
25
class
UColor
26
{
27
public
:
28
float
r;
29
float
g;
30
float
b;
31
float
a;
32
33
UColor();
34
UColor(
float
r,
float
g,
float
b,
float
a = 1.0);
35
UColor(
class
UColorHSV
hsv);
36
UColor(
const
UColor& color);
37
38
operator
float
*();
39
operator
float
*()
const
;
40
41
void
ScaleColor(
float
scale);
42
void
ScaleAlpha(
float
scale);
43
void
set(
float
r,
float
g,
float
b,
float
a);
44
};
45
46
class
UColorHSV
47
{
48
public
:
49
float
h;
50
float
s;
51
float
v;
52
float
a;
53
54
UColorHSV();
55
UColorHSV(
UColor
rgb);
56
UColorHSV(
float
h,
float
s,
float
v,
float
a);
57
58
void
set(
float
h,
float
s,
float
v,
float
a);
59
};
60
61
typedef
enum
{
62
DARK,
63
REALLYDARK,
64
LIGHT,
65
NORMAL
66
} colorType_t;
67
68
class
UBorderColor
69
{
70
public
:
71
UColor
dark;
72
UColor
reallydark;
73
UColor
light;
74
UColor
original;
75
76
UBorderColor();
77
UBorderColor(
const
UColor
& dark,
const
UColor
& reallydark,
const
UColor
& light);
78
UBorderColor(
const
UColor
& color);
79
80
void
CreateSolidBorder(
const
UColor
& color, colorType_t type);
81
};
82
83
extern
const
UColor
UClear;
84
extern
const
UColor
UWhite;
85
extern
const
UColor
UBlack;
86
extern
const
UColor
ULightGrey;
87
extern
const
UColor
UGrey;
88
extern
const
UColor
UDarkGrey;
89
extern
const
UColor
ULightRed;
90
extern
const
UColor
URed;
91
extern
const
UColor
UGreen;
92
extern
const
UColor
ULightGreen;
93
extern
const
UColor
UBlue;
94
extern
const
UColor
UYellow;
95
extern
const
UColor
UHudColor;
UColorHSV
Definition
ucolor.h:47
UColor
Definition
ucolor.h:26
code
uilib
ucolor.h
Generated by
1.13.2