Cleanup widgets

This commit is contained in:
IlyaShurupov 2024-06-26 11:30:02 +03:00
parent 9e7704a446
commit bce1dbacc2
30 changed files with 705 additions and 654 deletions

View file

@ -245,6 +245,12 @@ namespace tp {
return { x, y + abs, size.x, size.y - abs };
}
Rect<Type> getSizedFromCenter(Vec2<Type> size) {
const auto pivot = center();
const auto sizeHalf = size / 2;
return { pivot - sizeHalf, size };
}
public:
union {
Vec2<Type> v1;