mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r13225) -Fix (r13041): Missing calls to FindWindowPlacementAndResize() from lots
of windows causing 'two stage' opening effect.
This commit is contained in:
parent
95c2307595
commit
6f233b1f8f
|
@ -125,6 +125,7 @@ struct CheatWindow : Window {
|
||||||
|
|
||||||
CheatWindow(const WindowDesc *desc) : Window(desc)
|
CheatWindow(const WindowDesc *desc) : Window(desc)
|
||||||
{
|
{
|
||||||
|
this->FindWindowPlacementAndResize(desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnPaint()
|
virtual void OnPaint()
|
||||||
|
|
|
@ -69,6 +69,7 @@ static const DrawEngineInfo _draw_engine_list[4] = {
|
||||||
struct EnginePreviewWindow : Window {
|
struct EnginePreviewWindow : Window {
|
||||||
EnginePreviewWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number)
|
EnginePreviewWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number)
|
||||||
{
|
{
|
||||||
|
this->FindWindowPlacementAndResize(desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnPaint()
|
virtual void OnPaint()
|
||||||
|
|
|
@ -645,6 +645,7 @@ struct CreateScenarioWindow : public Window
|
||||||
CreateScenarioWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number)
|
CreateScenarioWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number)
|
||||||
{
|
{
|
||||||
this->LowerWidget(_opt_newgame.landscape + CSCEN_TEMPERATE);
|
this->LowerWidget(_opt_newgame.landscape + CSCEN_TEMPERATE);
|
||||||
|
this->FindWindowPlacementAndResize(desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnPaint()
|
virtual void OnPaint()
|
||||||
|
@ -850,7 +851,10 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GenerateProgressWindow() : Window(&_generate_progress_desc) {};
|
GenerateProgressWindow() : Window(&_generate_progress_desc)
|
||||||
|
{
|
||||||
|
this->FindWindowPlacementAndResize(&_generate_progress_desc);
|
||||||
|
}
|
||||||
|
|
||||||
virtual void OnClick(Point pt, int widget)
|
virtual void OnClick(Point pt, int widget)
|
||||||
{
|
{
|
||||||
|
|
|
@ -769,6 +769,7 @@ static int CDECL PerfHistComp(const void* elem1, const void* elem2)
|
||||||
struct CompanyLeagueWindow : Window {
|
struct CompanyLeagueWindow : Window {
|
||||||
CompanyLeagueWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number)
|
CompanyLeagueWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number)
|
||||||
{
|
{
|
||||||
|
this->FindWindowPlacementAndResize(desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnPaint()
|
virtual void OnPaint()
|
||||||
|
|
|
@ -795,6 +795,8 @@ struct MessageOptionsWindow : Window {
|
||||||
}
|
}
|
||||||
/* If all values are the same value, the ALL-button will take over this value */
|
/* If all values are the same value, the ALL-button will take over this value */
|
||||||
this->state = all_val;
|
this->state = all_val;
|
||||||
|
|
||||||
|
this->FindWindowPlacementAndResize(desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -165,6 +165,8 @@ struct PlayerFinancesWindow : Window {
|
||||||
this->top = top;
|
this->top = top;
|
||||||
this->left = left;
|
this->left = left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this->FindWindowPlacementAndResize(desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnPaint()
|
virtual void OnPaint()
|
||||||
|
@ -758,7 +760,6 @@ public:
|
||||||
SelectPlayerFaceWindow(const WindowDesc *desc, Window *parent, bool advanced, int top, int left) : Window(desc, parent->window_number)
|
SelectPlayerFaceWindow(const WindowDesc *desc, Window *parent, bool advanced, int top, int left) : Window(desc, parent->window_number)
|
||||||
{
|
{
|
||||||
this->parent = parent;
|
this->parent = parent;
|
||||||
this->FindWindowPlacementAndResize(desc);
|
|
||||||
this->caption_color = this->window_number;
|
this->caption_color = this->window_number;
|
||||||
this->face = GetPlayer((PlayerID)this->window_number)->face;
|
this->face = GetPlayer((PlayerID)this->window_number)->face;
|
||||||
this->advanced = advanced;
|
this->advanced = advanced;
|
||||||
|
@ -770,6 +771,8 @@ public:
|
||||||
this->top = top;
|
this->top = top;
|
||||||
this->left = left;
|
this->left = left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this->FindWindowPlacementAndResize(desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnPaint()
|
virtual void OnPaint()
|
||||||
|
@ -1167,6 +1170,7 @@ struct PlayerCompanyWindow : Window
|
||||||
PlayerCompanyWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number)
|
PlayerCompanyWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number)
|
||||||
{
|
{
|
||||||
this->caption_color = this->window_number;
|
this->caption_color = this->window_number;
|
||||||
|
this->FindWindowPlacementAndResize(desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnPaint()
|
virtual void OnPaint()
|
||||||
|
@ -1357,6 +1361,7 @@ void ShowPlayerCompany(PlayerID player)
|
||||||
struct BuyCompanyWindow : Window {
|
struct BuyCompanyWindow : Window {
|
||||||
BuyCompanyWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number)
|
BuyCompanyWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number)
|
||||||
{
|
{
|
||||||
|
this->FindWindowPlacementAndResize(desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnPaint()
|
virtual void OnPaint()
|
||||||
|
|
|
@ -318,6 +318,8 @@ struct PlayerStationsWindow : public Window, public GUIStationList
|
||||||
|
|
||||||
/* set up resort timer */
|
/* set up resort timer */
|
||||||
this->resort_timer = DAY_TICKS * PERIODIC_RESORT_DAYS;
|
this->resort_timer = DAY_TICKS * PERIODIC_RESORT_DAYS;
|
||||||
|
|
||||||
|
this->FindWindowPlacementAndResize(desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnPaint()
|
virtual void OnPaint()
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
struct SubsidyListWindow : Window {
|
struct SubsidyListWindow : Window {
|
||||||
SubsidyListWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number)
|
SubsidyListWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number)
|
||||||
{
|
{
|
||||||
|
this->FindWindowPlacementAndResize(desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnClick(Point pt, int widget)
|
virtual void OnClick(Point pt, int widget)
|
||||||
|
|
|
@ -56,6 +56,8 @@ struct TimetableWindow : Window {
|
||||||
this->vscroll.cap = 8;
|
this->vscroll.cap = 8;
|
||||||
this->resize.step_height = 10;
|
this->resize.step_height = 10;
|
||||||
this->sel_index = -1;
|
this->sel_index = -1;
|
||||||
|
|
||||||
|
this->FindWindowPlacementAndResize(desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
int GetOrderFromTimetableWndPt(int y, const Vehicle *v)
|
int GetOrderFromTimetableWndPt(int y, const Vehicle *v)
|
||||||
|
|
|
@ -1322,6 +1322,8 @@ struct ToolbarPlayerMenuWindow : Window {
|
||||||
this->sel_index = 0;
|
this->sel_index = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this->FindWindowPlacementAndResize(width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
~ToolbarPlayerMenuWindow()
|
~ToolbarPlayerMenuWindow()
|
||||||
|
|
|
@ -640,6 +640,7 @@ public:
|
||||||
ScenarioEditorTownGenerationWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number)
|
ScenarioEditorTownGenerationWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number)
|
||||||
{
|
{
|
||||||
this->LowerWidget(_scengen_town_size + TSEW_SMALLTOWN);
|
this->LowerWidget(_scengen_town_size + TSEW_SMALLTOWN);
|
||||||
|
this->FindWindowPlacementAndResize(desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnPaint()
|
virtual void OnPaint()
|
||||||
|
|
|
@ -1401,6 +1401,8 @@ struct VehicleDetailsWindow : Window {
|
||||||
this->caption_color = v->owner;
|
this->caption_color = v->owner;
|
||||||
|
|
||||||
this->tab = 0;
|
this->tab = 0;
|
||||||
|
|
||||||
|
this->FindWindowPlacementAndResize(desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Checks whether service interval is enabled for the vehicle. */
|
/** Checks whether service interval is enabled for the vehicle. */
|
||||||
|
@ -1873,6 +1875,8 @@ struct VehicleViewWindow : Window {
|
||||||
|
|
||||||
default: NOT_REACHED();
|
default: NOT_REACHED();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this->FindWindowPlacementAndResize(desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
~VehicleViewWindow()
|
~VehicleViewWindow()
|
||||||
|
|
Loading…
Reference in New Issue