Mercurial > hg > openttd
changeset 9301:686aa69d2fcd draft
(svn r13169) -Codechange: remove a (now) unneeded parameter of one of the Window constructors.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sun, 18 May 2008 20:40:30 +0000 |
parents | 9290d63a3ed8 |
children | fd3d8a77319f |
files | src/main_gui.cpp src/misc_gui.cpp src/network/network_gui.cpp src/toolbar_gui.cpp src/widgets/dropdown.cpp src/window.cpp src/window_gui.h |
diffstat | 7 files changed, 10 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main_gui.cpp +++ b/src/main_gui.cpp @@ -217,7 +217,7 @@ struct MainWindow : Window { - MainWindow(int width, int height) : Window(0, 0, width, height, NULL, WC_MAIN_WINDOW, NULL) + MainWindow(int width, int height) : Window(0, 0, width, height, WC_MAIN_WINDOW, NULL) { InitializeWindowViewport(this, 0, 0, width, height, TileXY(32, 32), ZOOM_LVL_VIEWPORT); }
--- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -352,7 +352,7 @@ public: ErrmsgWindow(Point pt, int width, int height, StringID msg1, StringID msg2, const Widget *widget, bool show_player_face) : - Window(pt.x, pt.y, width, height, NULL, WC_ERRMSG, widget), + Window(pt.x, pt.y, width, height, WC_ERRMSG, widget), show_player_face(show_player_face) { this->duration = _patches.errmsg_duration; @@ -532,7 +532,7 @@ TooltipsWindow(int x, int y, int width, int height, const Widget *widget, StringID str, uint paramcount, const uint64 params[]) : - Window(x, y, width, height, NULL, WC_TOOLTIPS, widget) + Window(x, y, width, height, WC_TOOLTIPS, widget) { this->string_id = str; assert(sizeof(this->params[0]) == sizeof(params[0]));
--- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -1321,7 +1321,7 @@ ClientList_Action_Proc *proc[MAX_CLIENTLIST_ACTION]; NetworkClientListPopupWindow(int x, int y, const Widget *widgets, int client_no) : - Window(x, y, 150, 100, NULL, WC_TOOLBAR_MENU, widgets), + Window(x, y, 150, 100, WC_TOOLBAR_MENU, widgets), sel_index(0), client_no(client_no) { /*
--- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -1125,7 +1125,7 @@ ToolbarMenuWindow(int x, int y, int width, int height, const Widget *widgets, int item_count, int sel_index, int parent_button, StringID base_string, int checked_items, int disabled_mask) : - Window(x, y, width, height, NULL, WC_TOOLBAR_MENU, widgets), + Window(x, y, width, height, WC_TOOLBAR_MENU, widgets), item_count(item_count), sel_index(sel_index), main_button(GB(parent_button, 0, 8)), action_id((GB(parent_button, 8, 8) != 0) ? GB(parent_button, 8, 8) : parent_button), checked_items(checked_items), disabled_items(disabled_items), base_string(base_string) @@ -1280,7 +1280,7 @@ int gray_items; ToolbarPlayerMenuWindow(int x, int y, int width, int height, const Widget *widgets, int main_button, int gray) : - Window(x, y, width, height, NULL, WC_TOOLBAR_MENU, widgets), + Window(x, y, width, height, WC_TOOLBAR_MENU, widgets), item_count(0), main_button(main_button), action_id(main_button), gray_items(gray) { this->flags4 &= ~WF_WHITE_BORDER_MASK;
--- a/src/widgets/dropdown.cpp +++ b/src/widgets/dropdown.cpp @@ -72,7 +72,7 @@ bool drag_mode; int scrolling; - DropdownWindow(int x, int y, int width, int height, const Widget *widget) : Window(x, y, width, height, NULL, WC_DROPDOWN_MENU, widget) + DropdownWindow(int x, int y, int width, int height, const Widget *widget) : Window(x, y, width, height, WC_DROPDOWN_MENU, widget) { }
--- a/src/window.cpp +++ b/src/window.cpp @@ -963,16 +963,13 @@ * @param y offset in pixels from the top of the screen * @param width width in pixels of the window * @param height height in pixels of the window - * @param *proc see WindowProc function to call when any messages/updates happen to the window * @param cls see WindowClass class of the window, used for identification and grouping * @param *widget see Widget pointer to the window layout and various elements * @return Window pointer of the newly created window */ -Window::Window(int x, int y, int width, int height, WindowProc *proc, WindowClass cls, const Widget *widget) +Window::Window(int x, int y, int width, int height, WindowClass cls, const Widget *widget) { - this->Initialize(x, y, width, height, proc, cls, widget, 0); - - if (proc != NULL) this->FindWindowPlacementAndResize(width, height); + this->Initialize(x, y, width, height, NULL, cls, widget, 0); }
--- a/src/window_gui.h +++ b/src/window_gui.h @@ -282,7 +282,7 @@ void FindWindowPlacementAndResize(const WindowDesc *desc); public: - Window(int x, int y, int width, int height, WindowProc *proc, WindowClass cls, const Widget *widget); + Window(int x, int y, int width, int height, WindowClass cls, const Widget *widget); Window(const WindowDesc *desc, WindowNumber number = 0); virtual ~Window();