OpenMoHAA 0.82.0
Loading...
Searching...
No Matches
ucolor.h
1/*
2===========================================================================
3Copyright (C) 2024 the OpenMoHAA team
4
5This file is part of OpenMoHAA source code.
6
7OpenMoHAA source code is free software; you can redistribute it
8and/or modify it under the terms of the GNU General Public License as
9published by the Free Software Foundation; either version 2 of the License,
10or (at your option) any later version.
11
12OpenMoHAA source code is distributed in the hope that it will be
13useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with OpenMoHAA source code; if not, write to the Free Software
19Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20===========================================================================
21*/
22
23#pragma once
24
25class UColor {
26public:
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
45class UColorHSV {
46public:
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
59typedef enum { DARK, REALLYDARK, LIGHT, NORMAL } colorType_t;
60
61class UBorderColor {
62public:
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
75extern const UColor UClear;
76extern const UColor UWhite;
77extern const UColor UBlack;
78extern const UColor ULightGrey;
79extern const UColor UGrey;
80extern const UColor UDarkGrey;
81extern const UColor ULightRed;
82extern const UColor URed;
83extern const UColor UGreen;
84extern const UColor ULightGreen;
85extern const UColor UBlue;
86extern const UColor UYellow;
87extern const UColor UHudColor;
Definition ucolor.h:45
Definition ucolor.h:25