diff options
author | peter1138 <peter1138@openttd.org> | 2008-05-23 23:02:13 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2008-05-23 23:02:13 +0000 |
commit | 6f233b1f8f18beb1e347c943685f6086d886993e (patch) | |
tree | f8f7bc73f5f105177d305593ba5a478036481084 | |
parent | 95c230759505dbaeaec1e56922bb8eb57e92bd4a (diff) | |
download | openttd-6f233b1f8f18beb1e347c943685f6086d886993e.tar.xz |
(svn r13225) -Fix (r13041): Missing calls to FindWindowPlacementAndResize() from lots
of windows causing 'two stage' opening effect.
-rw-r--r-- | src/cheat_gui.cpp | 1 | ||||
-rw-r--r-- | src/engine_gui.cpp | 1 | ||||
-rw-r--r-- | src/genworld_gui.cpp | 6 | ||||
-rw-r--r-- | src/graph_gui.cpp | 1 | ||||
-rw-r--r-- | src/news_gui.cpp | 2 | ||||
-rw-r--r-- | src/player_gui.cpp | 7 | ||||
-rw-r--r-- | src/station_gui.cpp | 2 | ||||
-rw-r--r-- | src/subsidy_gui.cpp | 1 | ||||
-rw-r--r-- | src/timetable_gui.cpp | 2 | ||||
-rw-r--r-- | src/toolbar_gui.cpp | 2 | ||||
-rw-r--r-- | src/town_gui.cpp | 1 | ||||
-rw-r--r-- | src/vehicle_gui.cpp | 4 |
12 files changed, 28 insertions, 2 deletions
diff --git a/src/cheat_gui.cpp b/src/cheat_gui.cpp index 67d191cb4..42b8ca470 100644 --- a/src/cheat_gui.cpp +++ b/src/cheat_gui.cpp @@ -125,6 +125,7 @@ struct CheatWindow : Window { CheatWindow(const WindowDesc *desc) : Window(desc) { + this->FindWindowPlacementAndResize(desc); } virtual void OnPaint() diff --git a/src/engine_gui.cpp b/src/engine_gui.cpp index b5a2c79c3..a67d23fcb 100644 --- a/src/engine_gui.cpp +++ b/src/engine_gui.cpp @@ -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() diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp index 6d5ab4dc0..42336d9f9 100644 --- a/src/genworld_gui.cpp +++ b/src/genworld_gui.cpp @@ -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) { diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp index 2cc1fe12d..69264ec9b 100644 --- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -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() diff --git a/src/news_gui.cpp b/src/news_gui.cpp index 3b2b250a5..41b2e9daf 100644 --- a/src/news_gui.cpp +++ b/src/news_gui.cpp @@ -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); } /** diff --git a/src/player_gui.cpp b/src/player_gui.cpp index 3c611b005..f08b5c332 100644 --- a/src/player_gui.cpp +++ b/src/player_gui.cpp @@ -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() diff --git a/src/station_gui.cpp b/src/station_gui.cpp index ba2abc5ee..4086f9ad8 100644 --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -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() diff --git a/src/subsidy_gui.cpp b/src/subsidy_gui.cpp index ed03ba1a4..ca81c0271 100644 --- a/src/subsidy_gui.cpp +++ b/src/subsidy_gui.cpp @@ -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) diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp index 0052a5f09..1a4f7d75b 100644 --- a/src/timetable_gui.cpp +++ b/src/timetable_gui.cpp @@ -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) diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index 80d9af408..7cc462cbd 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -1322,6 +1322,8 @@ struct ToolbarPlayerMenuWindow : Window { this->sel_index = 0; } } + + this->FindWindowPlacementAndResize(width, height); } ~ToolbarPlayerMenuWindow() diff --git a/src/town_gui.cpp b/src/town_gui.cpp index f0afdf253..46a7e8890 100644 --- a/src/town_gui.cpp +++ b/src/town_gui.cpp @@ -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() diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index 1e8af36af..422fd9671 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -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() |