summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main_gui.cpp2
-rw-r--r--src/misc_gui.cpp4
-rw-r--r--src/network/network_gui.cpp2
-rw-r--r--src/toolbar_gui.cpp4
-rw-r--r--src/widgets/dropdown.cpp2
-rw-r--r--src/window.cpp7
-rw-r--r--src/window_gui.h2
7 files changed, 10 insertions, 13 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp
index 36cda036b..6eaab74e6 100644
--- a/src/main_gui.cpp
+++ b/src/main_gui.cpp
@@ -217,7 +217,7 @@ extern void UpdateAllStationVirtCoord();
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);
}
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp
index 3eb985d9f..d2d306af9 100644
--- a/src/misc_gui.cpp
+++ b/src/misc_gui.cpp
@@ -352,7 +352,7 @@ private:
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 @@ struct TooltipsWindow : public Window
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]));
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index d92ee5aac..49542410f 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -1321,7 +1321,7 @@ struct NetworkClientListPopupWindow : Window {
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)
{
/*
diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp
index 0a3be270e..b41b6c1d7 100644
--- a/src/toolbar_gui.cpp
+++ b/src/toolbar_gui.cpp
@@ -1125,7 +1125,7 @@ struct ToolbarMenuWindow : Window {
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 @@ struct ToolbarPlayerMenuWindow : Window {
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;
diff --git a/src/widgets/dropdown.cpp b/src/widgets/dropdown.cpp
index 67cb77b89..b9857ddaf 100644
--- a/src/widgets/dropdown.cpp
+++ b/src/widgets/dropdown.cpp
@@ -72,7 +72,7 @@ struct DropdownWindow : Window {
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)
{
}
diff --git a/src/window.cpp b/src/window.cpp
index 5e6a2f1b9..4f5e1cc7a 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -963,16 +963,13 @@ void Window::FindWindowPlacementAndResize(const WindowDesc *desc)
* @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);
}
diff --git a/src/window_gui.h b/src/window_gui.h
index f1e8ed21f..66ce5a0eb 100644
--- a/src/window_gui.h
+++ b/src/window_gui.h
@@ -282,7 +282,7 @@ protected:
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();