mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-26 18:28:12 +00:00
sdl/rect: Add pos() and size() returning points {x,y} and {w,h}
This commit is contained in:
parent
2da7515722
commit
d58829e129
@ -60,6 +60,10 @@ public:
|
||||
: SDL_Rect{pos.x, pos.y, size.x, size.y}
|
||||
{}
|
||||
|
||||
// subcomponent access
|
||||
point pos() const { return {x, y}; }
|
||||
point size() const { return {w, h}; }
|
||||
|
||||
// Comparisons
|
||||
bool operator==(const rect& r) const;
|
||||
bool operator==(const SDL_Rect& r) const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user