mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r22932) -Fix [FS#4766]: disable the white border on window creation for several windows (based on patch by monoid)
This commit is contained in:
parent
9a6ec0dce7
commit
ad232bd497
|
@ -34,6 +34,7 @@ struct EndGameHighScoreBaseWindow : Window {
|
||||||
EndGameHighScoreBaseWindow(const WindowDesc *desc) : Window()
|
EndGameHighScoreBaseWindow(const WindowDesc *desc) : Window()
|
||||||
{
|
{
|
||||||
this->InitNested(desc);
|
this->InitNested(desc);
|
||||||
|
CLRBITS(this->flags4, WF_WHITE_BORDER_MASK);
|
||||||
ResizeWindow(this, _screen.width - this->width, _screen.height - this->height);
|
ResizeWindow(this, _screen.width - this->width, _screen.height - this->height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -244,6 +244,7 @@ struct MainWindow : Window
|
||||||
MainWindow() : Window()
|
MainWindow() : Window()
|
||||||
{
|
{
|
||||||
this->InitNested(&_main_window_desc, 0);
|
this->InitNested(&_main_window_desc, 0);
|
||||||
|
CLRBITS(this->flags4, WF_WHITE_BORDER_MASK);
|
||||||
ResizeWindow(this, _screen.width, _screen.height);
|
ResizeWindow(this, _screen.width, _screen.height);
|
||||||
|
|
||||||
NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(MW_VIEWPORT);
|
NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(MW_VIEWPORT);
|
||||||
|
|
|
@ -902,7 +902,7 @@ struct TooltipsWindow : public Window
|
||||||
|
|
||||||
this->InitNested(&_tool_tips_desc);
|
this->InitNested(&_tool_tips_desc);
|
||||||
|
|
||||||
this->flags4 &= ~WF_WHITE_BORDER_MASK; // remove white-border from tooltip
|
CLRBITS(this->flags4, WF_WHITE_BORDER_MASK); // remove white-border from tooltip
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual Point OnInitialPosition(const WindowDesc *desc, int16 sm_width, int16 sm_height, int window_number)
|
virtual Point OnInitialPosition(const WindowDesc *desc, int16 sm_width, int16 sm_height, int window_number)
|
||||||
|
|
|
@ -1801,8 +1801,8 @@ struct NetworkClientListPopupWindow : Window {
|
||||||
this->AddAction(STR_NETWORK_CLIENTLIST_BAN, &ClientList_Ban);
|
this->AddAction(STR_NETWORK_CLIENTLIST_BAN, &ClientList_Ban);
|
||||||
}
|
}
|
||||||
|
|
||||||
this->flags4 &= ~WF_WHITE_BORDER_MASK;
|
|
||||||
this->InitNested(desc, client_id);
|
this->InitNested(desc, client_id);
|
||||||
|
CLRBITS(this->flags4, WF_WHITE_BORDER_MASK);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual Point OnInitialPosition(const WindowDesc *desc, int16 sm_width, int16 sm_height, int window_number)
|
virtual Point OnInitialPosition(const WindowDesc *desc, int16 sm_width, int16 sm_height, int window_number)
|
||||||
|
|
|
@ -89,11 +89,11 @@ struct StatusBarWindow : Window {
|
||||||
|
|
||||||
StatusBarWindow(const WindowDesc *desc) : Window()
|
StatusBarWindow(const WindowDesc *desc) : Window()
|
||||||
{
|
{
|
||||||
CLRBITS(this->flags4, WF_WHITE_BORDER_MASK);
|
|
||||||
this->ticker_scroll = TICKER_STOP;
|
this->ticker_scroll = TICKER_STOP;
|
||||||
this->reminder_timeout = REMINDER_STOP;
|
this->reminder_timeout = REMINDER_STOP;
|
||||||
|
|
||||||
this->InitNested(desc);
|
this->InitNested(desc);
|
||||||
|
CLRBITS(this->flags4, WF_WHITE_BORDER_MASK);
|
||||||
PositionStatusbar(this);
|
PositionStatusbar(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -148,7 +148,7 @@ struct DropdownWindow : Window {
|
||||||
this->GetWidget<NWidgetStacked>(DDM_SHOW_SCROLL)->SetDisplayedPlane(scroll ? 0 : SZSP_NONE);
|
this->GetWidget<NWidgetStacked>(DDM_SHOW_SCROLL)->SetDisplayedPlane(scroll ? 0 : SZSP_NONE);
|
||||||
|
|
||||||
this->FinishInitNested(&_dropdown_desc, 0);
|
this->FinishInitNested(&_dropdown_desc, 0);
|
||||||
this->flags4 &= ~WF_WHITE_BORDER_MASK;
|
CLRBITS(this->flags4, WF_WHITE_BORDER_MASK);
|
||||||
|
|
||||||
/* Total length of list */
|
/* Total length of list */
|
||||||
int list_height = 0;
|
int list_height = 0;
|
||||||
|
|
Loading…
Reference in New Issue