2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _CTEXTCOLOR
|
|
|
|
#define _CTEXTCOLOR
|
2022-09-30 04:24:13 +00:00
|
|
|
|
|
|
|
#include <types.h>
|
|
|
|
|
2023-01-11 22:03:38 +00:00
|
|
|
#ifdef __MWERKS__
|
|
|
|
#pragma cpp_extensions on
|
|
|
|
#endif
|
|
|
|
|
2022-09-30 04:24:13 +00:00
|
|
|
class CTextColor {
|
|
|
|
public:
|
2022-10-09 05:13:17 +00:00
|
|
|
CTextColor(uchar r, uchar g, uchar b, uchar a) : mR(r), mG(g), mB(b), mA(a) {}
|
|
|
|
|
2023-01-11 22:03:38 +00:00
|
|
|
CTextColor(const CTextColor& other) : mR(other.mR), mG(other.mG), mB(other.mB), mA(other.mA) {}
|
|
|
|
|
|
|
|
const CTextColor& operator=(const CTextColor& other) {
|
|
|
|
mR = other.mR;
|
|
|
|
mG = other.mG;
|
|
|
|
mB = other.mB;
|
|
|
|
mA = other.mA;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2022-09-30 04:24:13 +00:00
|
|
|
private:
|
2023-01-11 22:03:38 +00:00
|
|
|
union {
|
|
|
|
struct {
|
|
|
|
uchar mR;
|
|
|
|
uchar mG;
|
|
|
|
uchar mB;
|
|
|
|
uchar mA;
|
|
|
|
};
|
|
|
|
uint mRgba;
|
|
|
|
};
|
2022-09-30 04:24:13 +00:00
|
|
|
};
|
|
|
|
|
2023-01-11 22:03:38 +00:00
|
|
|
#ifdef __MWERKS__
|
|
|
|
#pragma cpp_extensions off
|
|
|
|
#endif
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _CTEXTCOLOR
|