OpenMoHAA
0.82.0
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
public
:
27
float
r;
28
float
g;
29
float
b;
30
float
a;
31
32
UColor();
33
UColor(
float
r,
float
g,
float
b,
float
a = 1.0 );
34
UColor(
class
UColorHSV
hsv );
35
UColor(
const
UColor& color );
36
37
operator
float
*( );
38
operator
float
*( )
const
;
39
40
void
ScaleColor(
float
scale );
41
void
ScaleAlpha(
float
scale );
42
void
set(
float
r,
float
g,
float
b,
float
a );
43
};
44
45
class
UColorHSV {
46
public
:
47
float
h;
48
float
s;
49
float
v;
50
float
a;
51
52
UColorHSV();
53
UColorHSV(
UColor
rgb );
54
UColorHSV(
float
h,
float
s,
float
v,
float
a );
55
56
void
set(
float
h,
float
s,
float
v,
float
a );
57
};
58
59
typedef
enum
{ DARK, REALLYDARK, LIGHT, NORMAL } colorType_t;
60
61
class
UBorderColor {
62
public
:
63
UColor
dark;
64
UColor
reallydark;
65
UColor
light;
66
UColor
original;
67
68
UBorderColor();
69
UBorderColor(
const
UColor
& dark,
const
UColor
& reallydark,
const
UColor
& light );
70
UBorderColor(
const
UColor
& color );
71
72
void
CreateSolidBorder(
const
UColor
& color, colorType_t type );
73
};
74
75
extern
const
UColor
UClear;
76
extern
const
UColor
UWhite;
77
extern
const
UColor
UBlack;
78
extern
const
UColor
ULightGrey;
79
extern
const
UColor
UGrey;
80
extern
const
UColor
UDarkGrey;
81
extern
const
UColor
ULightRed;
82
extern
const
UColor
URed;
83
extern
const
UColor
UGreen;
84
extern
const
UColor
ULightGreen;
85
extern
const
UColor
UBlue;
86
extern
const
UColor
UYellow;
87
extern
const
UColor
UHudColor;
UColorHSV
Definition
ucolor.h:45
UColor
Definition
ucolor.h:25
code
uilib
ucolor.h
Generated by
1.13.2