summaryrefslogtreecommitdiff
path: root/Client/Source/Graphics/Color.h
diff options
context:
space:
mode:
Diffstat (limited to 'Client/Source/Graphics/Color.h')
-rw-r--r--Client/Source/Graphics/Color.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/Client/Source/Graphics/Color.h b/Client/Source/Graphics/Color.h
new file mode 100644
index 0000000..f7bb937
--- /dev/null
+++ b/Client/Source/Graphics/Color.h
@@ -0,0 +1,48 @@
+#pragma once
+
+struct Color
+{
+ Color(float r = 0, float g = 0, float b = 0, float a = 0)
+ {
+ this->r = r;
+ this->g = g;
+ this->b = b;
+ this->a = a;
+ }
+ void Set(float r = 0, float g = 0, float b = 0, float a = 0)
+ {
+ this->r = r;
+ this->g = g;
+ this->b = b;
+ this->a = a;
+ }
+ float r, g, b, a;
+};
+
+struct Color32
+{
+ Color32(unsigned char r = 0, unsigned char g = 0, unsigned char b = 0, unsigned char a = 0)
+ {
+ this->r = r;
+ this->g = g;
+ this->b = b;
+ this->a = a;
+ }
+ void Set(unsigned char r = 0, unsigned char g = 0, unsigned char b = 0, unsigned char a = 0)
+ {
+ this->r = r;
+ this->g = g;
+ this->b = b;
+ this->a = a;
+ }
+
+ bool operator !=(const Color32& col)
+ {
+ return !(r == col.r && g == col.g && b == col.b && a == col.a);
+ }
+
+ unsigned char r, g, b, a;
+
+ static const Color32 white;
+};
+