forked from mirror/OpenTTD
Cleanup: Remove unnecessary pressed button offset code.
This commit is contained in:
@@ -2667,8 +2667,8 @@ void DrawArrowButtons(int x, int y, Colours button_colour, byte state, bool clic
|
||||
|
||||
DrawFrameRect(lr, button_colour, (state == 1) ? FR_LOWERED : FR_NONE);
|
||||
DrawFrameRect(rr, button_colour, (state == 2) ? FR_LOWERED : FR_NONE);
|
||||
DrawSpriteIgnorePadding(SPR_ARROW_LEFT, PAL_NONE, lr, (state == 1), SA_CENTER);
|
||||
DrawSpriteIgnorePadding(SPR_ARROW_RIGHT, PAL_NONE, rr, (state == 2), SA_CENTER);
|
||||
DrawSpriteIgnorePadding(SPR_ARROW_LEFT, PAL_NONE, lr, SA_CENTER);
|
||||
DrawSpriteIgnorePadding(SPR_ARROW_RIGHT, PAL_NONE, rr, SA_CENTER);
|
||||
|
||||
/* Grey out the buttons that aren't clickable */
|
||||
bool rtl = _current_text_dir == TD_RTL;
|
||||
@@ -2695,7 +2695,7 @@ void DrawDropDownButton(int x, int y, Colours button_colour, bool state, bool cl
|
||||
Rect r = {x, y, x + SETTING_BUTTON_WIDTH - 1, y + SETTING_BUTTON_HEIGHT - 1};
|
||||
|
||||
DrawFrameRect(r, button_colour, state ? FR_LOWERED : FR_NONE);
|
||||
DrawSpriteIgnorePadding(SPR_ARROW_DOWN, PAL_NONE, r, state, SA_CENTER);
|
||||
DrawSpriteIgnorePadding(SPR_ARROW_DOWN, PAL_NONE, r, SA_CENTER);
|
||||
|
||||
if (!clickable) {
|
||||
GfxFillRect(r.Shrink(WidgetDimensions::scaled.bevel), colour, FILLRECT_CHECKER);
|
||||
|
Reference in New Issue
Block a user