diff options
author | frosch <frosch@openttd.org> | 2012-11-13 21:46:19 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2012-11-13 21:46:19 +0000 |
commit | 17025fa6ea110f0db0b1c2e29b7615b21c2f5a50 (patch) | |
tree | e172f8a486ffd070f0a04406e46d74b24a68348c /src/widget.cpp | |
parent | 8cd77b6f6eb0e82ebcb4c0197786eeea08dd0263 (diff) | |
download | openttd-17025fa6ea110f0db0b1c2e29b7615b21c2f5a50.tar.xz |
(svn r24724) -Codechange: Move drawing of editboxes to the widget drawing code.
Diffstat (limited to 'src/widget.cpp')
-rw-r--r-- | src/widget.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/widget.cpp b/src/widget.cpp index 2b932f9a1..0b0ed6d8e 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -18,6 +18,7 @@ #include "transparency.h" #include "core/geometry_func.hpp" #include "settings_type.h" +#include "querystring_gui.h" #include "table/sprites.h" #include "table/strings.h" @@ -2364,9 +2365,12 @@ void NWidgetLeaf::Draw(const Window *w) DrawMatrix(r, this->colour, clicked, this->widget_data); break; - case WWT_EDITBOX: + case WWT_EDITBOX: { DrawFrameRect(r.left, r.top, r.right, r.bottom, this->colour, FR_LOWERED | FR_DARKENED); + const QueryString *query = dynamic_cast<const QueryString*>(w); + if (query != NULL) query->DrawEditBox(w, this->index); break; + } case WWT_CAPTION: if (this->index >= 0) w->SetStringParameters(this->index); |