mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-10 14:58:10 -05:00
Add non default forecolor flag if forecolor is not white
This commit is contained in:
@ -1,5 +1,8 @@
|
||||
#include "CommonMenuTypes.h"
|
||||
|
||||
#include <limits>
|
||||
#include <cmath>
|
||||
|
||||
using namespace menu;
|
||||
|
||||
CommonColor::CommonColor()
|
||||
@ -20,6 +23,14 @@ CommonColor::CommonColor(const double r, const double g, const double b, const d
|
||||
this->a = a;
|
||||
}
|
||||
|
||||
bool CommonColor::Equals(const CommonColor& other) const
|
||||
{
|
||||
return std::fabs(this->r - other.r) < std::numeric_limits<double>::epsilon()
|
||||
&& std::fabs(this->g - other.g) < std::numeric_limits<double>::epsilon()
|
||||
&& std::fabs(this->b - other.b) < std::numeric_limits<double>::epsilon()
|
||||
&& std::fabs(this->a - other.a) < std::numeric_limits<double>::epsilon();
|
||||
}
|
||||
|
||||
CommonRect::CommonRect()
|
||||
: CommonRect(0, 0, 0, 0)
|
||||
{
|
||||
|
@ -15,6 +15,8 @@ namespace menu
|
||||
|
||||
CommonColor();
|
||||
CommonColor(double r, double g, double b, double a);
|
||||
|
||||
bool Equals(const CommonColor& other) const;
|
||||
};
|
||||
|
||||
struct CommonRect
|
||||
|
Reference in New Issue
Block a user