Add methods to move a widget

This commit is contained in:
Gymnasiast 2024-04-20 18:44:51 +02:00 committed by Michael Steenbeek
parent 9906a18bc7
commit 4db5d62476
No known key found for this signature in database
GPG Key ID: 92EB181D74FDE5EF
1 changed files with 12 additions and 0 deletions

View File

@ -137,6 +137,18 @@ struct Widget
return top - 1;
}
void moveRight(int32_t amount)
{
left += amount;
right += amount;
}
void moveDown(int32_t amount)
{
top += amount;
bottom += amount;
}
bool IsVisible() const
{
return !(flags & WIDGET_FLAGS::IS_HIDDEN);