1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-19 20:49:11 +00:00

(svn r24724) -Codechange: Move drawing of editboxes to the widget drawing code.

This commit is contained in:
frosch
2012-11-13 21:46:19 +00:00
parent 8cd77b6f6e
commit 17025fa6ea
13 changed files with 7 additions and 74 deletions

View File

@@ -463,12 +463,6 @@ struct NetworkChatWindow : public QueryStringBaseWindow {
free(pre_buf);
}
virtual void OnPaint()
{
this->DrawWidgets();
this->DrawEditBox(WID_NC_TEXTBOX);
}
virtual Point OnInitialPosition(const WindowDesc *desc, int16 sm_width, int16 sm_height, int window_number)
{
Point pt = { 0, _screen.height - sm_height - FindWindowById(WC_STATUS_BAR, 0)->height };

View File

@@ -489,9 +489,6 @@ public:
this->DrawWidgets();
/* Edit box to filter for keywords */
this->DrawEditBox(WID_NCL_FILTER);
switch (this->content.SortType()) {
case WID_NCL_CHECKBOX - WID_NCL_CHECKBOX: this->DrawSortButtonState(WID_NCL_CHECKBOX, arrow); break;
case WID_NCL_TYPE - WID_NCL_CHECKBOX: this->DrawSortButtonState(WID_NCL_TYPE, arrow); break;

View File

@@ -588,8 +588,6 @@ public:
this->GetWidget<NWidgetStacked>(WID_NG_NEWGRF_MISSING_SEL)->SetDisplayedPlane(sel == NULL || !sel->online || sel->info.grfconfig == NULL || !sel->info.version_compatible || sel->info.compatible);
this->DrawWidgets();
/* Edit box to set client name */
this->DrawEditBox(WID_NG_CLIENT);
}
void DrawDetails(const Rect &r) const
@@ -1070,15 +1068,6 @@ struct NetworkStartServerWindow : public QueryStringBaseWindow {
}
}
virtual void OnPaint()
{
/* draw basic widgets */
this->DrawWidgets();
/* editbox to set game name */
this->DrawEditBox(WID_NSS_GAMENAME);
}
virtual void OnClick(Point pt, int widget, int click_count)
{
this->field = widget;
@@ -2155,12 +2144,6 @@ struct NetworkCompanyPasswordWindow : public QueryStringBaseWindow {
NetworkChangeCompanyPassword(_local_company, this->edit_str_buf);
}
virtual void OnPaint()
{
this->DrawWidgets();
this->DrawEditBox(WID_NCP_PASSWORD);
}
virtual void OnClick(Point pt, int widget, int click_count)
{
switch (widget) {