(svn r13225) -Fix (r13041): Missing calls to FindWindowPlacementAndResize() from lots

of windows causing 'two stage' opening effect.
This commit is contained in:
peter1138 2008-05-23 23:02:13 +00:00
parent 95c2307595
commit 6f233b1f8f
12 changed files with 28 additions and 2 deletions

View File

@ -125,6 +125,7 @@ struct CheatWindow : Window {
CheatWindow(const WindowDesc *desc) : Window(desc)
{
this->FindWindowPlacementAndResize(desc);
}
virtual void OnPaint()

View File

@ -69,6 +69,7 @@ static const DrawEngineInfo _draw_engine_list[4] = {
struct EnginePreviewWindow : Window {
EnginePreviewWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number)
{
this->FindWindowPlacementAndResize(desc);
}
virtual void OnPaint()

View File

@ -645,6 +645,7 @@ struct CreateScenarioWindow : public Window
CreateScenarioWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number)
{
this->LowerWidget(_opt_newgame.landscape + CSCEN_TEMPERATE);
this->FindWindowPlacementAndResize(desc);
}
virtual void OnPaint()
@ -850,7 +851,10 @@ private:
};
public:
GenerateProgressWindow() : Window(&_generate_progress_desc) {};
GenerateProgressWindow() : Window(&_generate_progress_desc)
{
this->FindWindowPlacementAndResize(&_generate_progress_desc);
}
virtual void OnClick(Point pt, int widget)
{

View File

@ -769,6 +769,7 @@ static int CDECL PerfHistComp(const void* elem1, const void* elem2)
struct CompanyLeagueWindow : Window {
CompanyLeagueWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number)
{
this->FindWindowPlacementAndResize(desc);
}
virtual void OnPaint()

View File

@ -795,6 +795,8 @@ struct MessageOptionsWindow : Window {
}
/* If all values are the same value, the ALL-button will take over this value */
this->state = all_val;
this->FindWindowPlacementAndResize(desc);
}
/**

View File

@ -165,6 +165,8 @@ struct PlayerFinancesWindow : Window {
this->top = top;
this->left = left;
}
this->FindWindowPlacementAndResize(desc);
}
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)
{
this->parent = parent;
this->FindWindowPlacementAndResize(desc);
this->caption_color = this->window_number;
this->face = GetPlayer((PlayerID)this->window_number)->face;
this->advanced = advanced;
@ -770,6 +771,8 @@ public:
this->top = top;
this->left = left;
}
this->FindWindowPlacementAndResize(desc);
}
virtual void OnPaint()
@ -1167,6 +1170,7 @@ struct PlayerCompanyWindow : Window
PlayerCompanyWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number)
{
this->caption_color = this->window_number;
this->FindWindowPlacementAndResize(desc);
}
virtual void OnPaint()
@ -1357,6 +1361,7 @@ void ShowPlayerCompany(PlayerID player)
struct BuyCompanyWindow : Window {
BuyCompanyWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number)
{
this->FindWindowPlacementAndResize(desc);
}
virtual void OnPaint()

View File

@ -318,6 +318,8 @@ struct PlayerStationsWindow : public Window, public GUIStationList
/* set up resort timer */
this->resort_timer = DAY_TICKS * PERIODIC_RESORT_DAYS;
this->FindWindowPlacementAndResize(desc);
}
virtual void OnPaint()

View File

@ -22,6 +22,7 @@
struct SubsidyListWindow : Window {
SubsidyListWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number)
{
this->FindWindowPlacementAndResize(desc);
}
virtual void OnClick(Point pt, int widget)

View File

@ -56,6 +56,8 @@ struct TimetableWindow : Window {
this->vscroll.cap = 8;
this->resize.step_height = 10;
this->sel_index = -1;
this->FindWindowPlacementAndResize(desc);
}
int GetOrderFromTimetableWndPt(int y, const Vehicle *v)

View File

@ -1322,6 +1322,8 @@ struct ToolbarPlayerMenuWindow : Window {
this->sel_index = 0;
}
}
this->FindWindowPlacementAndResize(width, height);
}
~ToolbarPlayerMenuWindow()

View File

@ -640,6 +640,7 @@ public:
ScenarioEditorTownGenerationWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number)
{
this->LowerWidget(_scengen_town_size + TSEW_SMALLTOWN);
this->FindWindowPlacementAndResize(desc);
}
virtual void OnPaint()

View File

@ -1401,6 +1401,8 @@ struct VehicleDetailsWindow : Window {
this->caption_color = v->owner;
this->tab = 0;
this->FindWindowPlacementAndResize(desc);
}
/** Checks whether service interval is enabled for the vehicle. */
@ -1873,6 +1875,8 @@ struct VehicleViewWindow : Window {
default: NOT_REACHED();
}
this->FindWindowPlacementAndResize(desc);
}
~VehicleViewWindow()