mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-23 23:04:36 +01:00
Introduce widget::midX and widget::midY helper functions
This commit is contained in:
@@ -108,6 +108,16 @@ struct rct_widget
|
||||
{
|
||||
return bottom - top;
|
||||
}
|
||||
|
||||
int16_t midX() const
|
||||
{
|
||||
return (left + right) / 2;
|
||||
}
|
||||
|
||||
int16_t midY() const
|
||||
{
|
||||
return (top + bottom) / 2;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user