summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Nelson <peter1138@openttd.org>2021-04-22 01:35:51 +0100
committerPeterN <peter@fuzzle.org>2021-04-30 17:08:15 +0100
commit4c6cca459a678a5f1970b3ee5f23141d7ed89528 (patch)
tree97016efe95413cd849fe450639d419a479d3c2af
parent5153e1b6e38a75ef6eeb71760941018139feedea (diff)
downloadopenttd-4c6cca459a678a5f1970b3ee5f23141d7ed89528.tar.xz
Cleanup: Remove fairly redundant DrawDropdown() function.
-rw-r--r--src/widget.cpp15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/widget.cpp b/src/widget.cpp
index 74a89eaea..78da9457c 100644
--- a/src/widget.cpp
+++ b/src/widget.cpp
@@ -624,19 +624,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.
*/
void Window::DrawWidgets() const
@@ -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: