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:
@@ -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 };
|
||||
|
@@ -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;
|
||||
|
@@ -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) {
|
||||
|
Reference in New Issue
Block a user