Button test

This commit is contained in:
2023-08-10 22:40:02 -07:00
parent 0cde186bf7
commit 5ec1659865
7 changed files with 47 additions and 5 deletions

View File

@ -22,9 +22,16 @@ namespace Dawn {
*/
static struct Color fromString(std::string str);
float_t r, g, b, a;
const struct Color& operator = (const struct Color &val) {
this->r = val.r;
this->g = val.g;
this->b = val.b;
this->a = val.a;
return *this;
}
struct Color operator * (const float_t &x) {
return {
r * x,
@ -52,6 +59,10 @@ namespace Dawn {
};
}
const bool_t operator == (const struct Color &other) {
return r == other.r && g == other.g && b == other.b && a == other.a;
}
operator struct ColorU8() const {
return {
(uint8_t)(r * 255),