mirror of
https://github.com/edubart/otclient.git
synced 2025-10-20 06:23:26 +02:00
rect fix and some ui new classes
This commit is contained in:
@@ -77,8 +77,8 @@ public:
|
||||
inline void setBottomLeft(const TPoint<T> &p) { x1 = p.x; y2 = p.y; }
|
||||
inline void setWidth(T width) { x2 = x1 + width - 1; }
|
||||
inline void setHeight(T height) { y2 = y1 + height- 1; }
|
||||
inline void setSize(T width, T height) { x2 = x1 + width; y2 = y1 + height; }
|
||||
inline void setSize(const TSize<T>& size) { x2 = x1 + size.width(); y2 = y1 + size.height(); }
|
||||
inline void setSize(T width, T height) { x2 = x1 + width - 1; y2 = y1 + height - 1; }
|
||||
inline void setSize(const TSize<T>& size) { x2 = x1 + size.width() - 1; y2 = y1 + size.height() - 1; }
|
||||
inline void setRect(T x, T y, T width, T height) { x1 = x; y1 = y; x2 = (x + width - 1); y2 = (y + height - 1); }
|
||||
inline void setCoords(int left, int top, int right, int bottom) { x1 = left; y1 = top; x2 = right; y2 = bottom; }
|
||||
|
||||
|
@@ -38,7 +38,7 @@ template <class T>
|
||||
class TSize
|
||||
{
|
||||
public:
|
||||
inline TSize() : wd(-1), ht(-1) {};
|
||||
inline TSize() : wd(0), ht(0) {};
|
||||
inline TSize(T width, T height) : wd(width), ht(height) { };
|
||||
inline TSize(const TSize<T>& other) : wd(other.wd), ht(other.ht) { };
|
||||
|
||||
|
Reference in New Issue
Block a user