From ca0521f89fc53be22e18cb56f6d9c358555246af Mon Sep 17 00:00:00 2001 From: rubidium Date: Sat, 24 Oct 2009 14:53:55 +0000 Subject: (svn r17853) -Codechange: remove the 'delta' parameter from OnResize; it was used in ways that aren't always wanted, causing bugs and the like. Also with nested widgets most reasons for handling OnResize have gone. --- src/ai/ai_gui.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ai') diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp index b37bcd17f..355cbbb00 100644 --- a/src/ai/ai_gui.cpp +++ b/src/ai/ai_gui.cpp @@ -203,7 +203,7 @@ struct AIListWindow : public Window { } } - virtual void OnResize(Point delta) + virtual void OnResize() { this->vscroll.SetCapacity(this->GetWidget(AIL_WIDGET_LIST)->current_y / this->line_height); this->GetWidget(AIL_WIDGET_LIST)->widget_data = (this->vscroll.GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START); @@ -399,7 +399,7 @@ struct AISettingsWindow : public Window { this->SetDirty(); } - virtual void OnResize(Point delta) + virtual void OnResize() { this->vscroll.SetCapacity(this->GetWidget(AIS_WIDGET_BACKGROUND)->current_y / this->line_height); this->GetWidget(AIS_WIDGET_BACKGROUND)->widget_data = (this->vscroll.GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START); @@ -876,7 +876,7 @@ struct AIDebugWindow : public Window { if (data == -1 || ai_debug_company == data) this->SetDirty(); } - virtual void OnResize(Point delta) + virtual void OnResize() { this->vscroll.SetCapacity(this->GetWidget(AID_WIDGET_LOG_PANEL)->current_y / this->resize.step_height); } -- cgit v1.2.3-70-g09d2