1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-24 23:34:37 +01:00

Introduce widget::textTop

This commit is contained in:
Aaron van Geffen
2020-06-26 19:33:04 +02:00
parent 2e153a7e95
commit 2cb5402069
2 changed files with 14 additions and 16 deletions

View File

@@ -118,6 +118,14 @@ struct rct_widget
{
return (top + bottom) / 2;
}
int16_t textTop() const
{
if (height() >= 10)
return std::max<int32_t>(top, top + (height() / 2) - 5);
else
return top - 1;
}
};
/**