Fix up some level editor dialog behavior

This commit is contained in:
elasota
2020-02-26 12:17:04 -05:00
parent d617795591
commit cc17911776
23 changed files with 224 additions and 201 deletions

View File

@@ -18,6 +18,9 @@ struct Point
Point &operator-=(const Point &other);
Point &operator+=(const Point &other);
bool operator==(const Point &other) const;
bool operator!=(const Point &other) const;
static Point Create(int16_t h, int16_t v);
};
@@ -139,6 +142,17 @@ inline Point &Point::operator+=(const Point &other)
return *this;
}
inline bool Point::operator==(const Point &other) const
{
return this->h == other.h && this->v == other.v;
}
inline bool Point::operator!=(const Point &other) const
{
return !((*this) == other);
}
inline Point Point::Create(int16_t h, int16_t v)
{
Point p;