Cleanup widgets
This commit is contained in:
parent
9e7704a446
commit
bce1dbacc2
30 changed files with 705 additions and 654 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue