1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-21 05:53:02 +01:00

Replace spinner widgets with horizontal +/- buttons.

Limited to Options and Ride windows so far.
This commit is contained in:
Aaron van Geffen
2018-05-31 22:43:48 +02:00
parent e91777bd7e
commit 2181e35b95
5 changed files with 41 additions and 51 deletions

View File

@@ -411,7 +411,13 @@ static void widget_text_centred(rct_drawpixelinfo *dpi, rct_window *w, rct_widge
sint32 t;
if (widget->type == WWT_BUTTON || widget->type == WWT_TABLE_HEADER)
t = w->y + std::max<sint32>(widget->top, (widget->top + widget->bottom) / 2 - 5);
{
sint32 height = (widget->bottom - widget->top);
if (height >= 10)
t = w->y + std::max<sint32>(widget->top, widget->top + (height / 2) - 5);
else
t = w->y + widget->top - 1;
}
else
t = w->y + widget->top;
@@ -449,7 +455,13 @@ static void widget_text(rct_drawpixelinfo *dpi, rct_window *w, rct_widgetindex w
sint32 t;
if (widget->type == WWT_BUTTON || widget->type == WWT_TABLE_HEADER)
t = w->y + std::max<sint32>(widget->top, (widget->top + widget->bottom) / 2 - 5);
{
sint32 height = (widget->bottom - widget->top);
if (height >= 10)
t = w->y + std::max<sint32>(widget->top, widget->top + (height / 2) - 5);
else
t = w->y + widget->top - 1;
}
else
t = w->y + widget->top;