mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 07:29:44 +00:00
Cleanup: Remove fairly redundant DrawDropdown() function.
This commit is contained in:
parent
5153e1b6e3
commit
4c6cca459a
@ -623,19 +623,6 @@ static inline void DrawButtonDropdown(const Rect &r, Colours colour, bool clicke
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw a dropdown #WWT_DROPDOWN widget.
|
||||
* @param r Rectangle containing the widget.
|
||||
* @param colour Background colour of the widget.
|
||||
* @param clicked The widget is lowered.
|
||||
* @param str Text of the button.
|
||||
* @param align Alignment of the text.
|
||||
*/
|
||||
static inline void DrawDropdown(const Rect &r, Colours colour, bool clicked, StringID str, StringAlignment align)
|
||||
{
|
||||
DrawButtonDropdown(r, colour, false, clicked, str, align);
|
||||
}
|
||||
|
||||
/**
|
||||
* Paint all widgets of a window.
|
||||
*/
|
||||
@ -2639,7 +2626,7 @@ void NWidgetLeaf::Draw(const Window *w)
|
||||
|
||||
case WWT_DROPDOWN:
|
||||
if (this->index >= 0) w->SetStringParameters(this->index);
|
||||
DrawDropdown(r, this->colour, clicked, this->widget_data, this->align);
|
||||
DrawButtonDropdown(r, this->colour, false, clicked, this->widget_data, this->align);
|
||||
break;
|
||||
|
||||
case NWID_BUTTON_DROPDOWN:
|
||||
|
Loading…
Reference in New Issue
Block a user