* Draw a dropdown button. * @param x the x position to draw * @param y the y position to draw * @param button_colour the colour of the button * @param state true = lowered * @param clickable is the button clickable? */
| 1922 | * @param clickable is the button clickable? |
| 1923 | */ |
| 1924 | void DrawDropDownButton(int x, int y, Colours button_colour, bool state, bool clickable) |
| 1925 | { |
| 1926 | PixelColour colour = GetColourGradient(button_colour, SHADE_DARKER); |
| 1927 | |
| 1928 | Rect r = {x, y, x + SETTING_BUTTON_WIDTH - 1, y + SETTING_BUTTON_HEIGHT - 1}; |
| 1929 | |
| 1930 | DrawFrameRect(r, button_colour, state ? FrameFlag::Lowered : FrameFlags{}); |
| 1931 | DrawSpriteIgnorePadding(SPR_ARROW_DOWN, PAL_NONE, r, SA_CENTER); |
| 1932 | |
| 1933 | if (!clickable) { |
| 1934 | GfxFillRect(r.Shrink(WidgetDimensions::scaled.bevel), colour, FILLRECT_CHECKER); |
| 1935 | } |
| 1936 | } |
| 1937 | |
| 1938 | /** |
| 1939 | * Draw a toggle button. |
no test coverage detected