mirror of https://github.com/OpenTTD/OpenTTD
(svn r13169) -Codechange: remove a (now) unneeded parameter of one of the Window constructors.
parent
9aa69db2e6
commit
6da56ee87e
|
@ -217,7 +217,7 @@ extern void UpdateAllStationVirtCoord();
|
||||||
|
|
||||||
struct MainWindow : Window
|
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);
|
InitializeWindowViewport(this, 0, 0, width, height, TileXY(32, 32), ZOOM_LVL_VIEWPORT);
|
||||||
}
|
}
|
||||||
|
|
|
@ -352,7 +352,7 @@ private:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ErrmsgWindow(Point pt, int width, int height, StringID msg1, StringID msg2, const Widget *widget, bool show_player_face) :
|
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)
|
show_player_face(show_player_face)
|
||||||
{
|
{
|
||||||
this->duration = _patches.errmsg_duration;
|
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,
|
TooltipsWindow(int x, int y, int width, int height, const Widget *widget,
|
||||||
StringID str, uint paramcount, const uint64 params[]) :
|
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;
|
this->string_id = str;
|
||||||
assert(sizeof(this->params[0]) == sizeof(params[0]));
|
assert(sizeof(this->params[0]) == sizeof(params[0]));
|
||||||
|
|
|
@ -1321,7 +1321,7 @@ struct NetworkClientListPopupWindow : Window {
|
||||||
ClientList_Action_Proc *proc[MAX_CLIENTLIST_ACTION];
|
ClientList_Action_Proc *proc[MAX_CLIENTLIST_ACTION];
|
||||||
|
|
||||||
NetworkClientListPopupWindow(int x, int y, const Widget *widgets, int client_no) :
|
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)
|
sel_index(0), client_no(client_no)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1125,7 +1125,7 @@ struct ToolbarMenuWindow : Window {
|
||||||
ToolbarMenuWindow(int x, int y, int width, int height, const Widget *widgets, int item_count,
|
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 sel_index, int parent_button, StringID base_string, int checked_items,
|
||||||
int disabled_mask) :
|
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)),
|
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),
|
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)
|
checked_items(checked_items), disabled_items(disabled_items), base_string(base_string)
|
||||||
|
@ -1280,7 +1280,7 @@ struct ToolbarPlayerMenuWindow : Window {
|
||||||
int gray_items;
|
int gray_items;
|
||||||
|
|
||||||
ToolbarPlayerMenuWindow(int x, int y, int width, int height, const Widget *widgets, int main_button, int gray) :
|
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)
|
item_count(0), main_button(main_button), action_id(main_button), gray_items(gray)
|
||||||
{
|
{
|
||||||
this->flags4 &= ~WF_WHITE_BORDER_MASK;
|
this->flags4 &= ~WF_WHITE_BORDER_MASK;
|
||||||
|
|
|
@ -72,7 +72,7 @@ struct DropdownWindow : Window {
|
||||||
bool drag_mode;
|
bool drag_mode;
|
||||||
int scrolling;
|
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)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -963,16 +963,13 @@ void Window::FindWindowPlacementAndResize(const WindowDesc *desc)
|
||||||
* @param y offset in pixels from the top of the screen
|
* @param y offset in pixels from the top of the screen
|
||||||
* @param width width in pixels of the window
|
* @param width width in pixels of the window
|
||||||
* @param height height 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 cls see WindowClass class of the window, used for identification and grouping
|
||||||
* @param *widget see Widget pointer to the window layout and various elements
|
* @param *widget see Widget pointer to the window layout and various elements
|
||||||
* @return Window pointer of the newly created window
|
* @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);
|
this->Initialize(x, y, width, height, NULL, cls, widget, 0);
|
||||||
|
|
||||||
if (proc != NULL) this->FindWindowPlacementAndResize(width, height);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -282,7 +282,7 @@ protected:
|
||||||
void FindWindowPlacementAndResize(const WindowDesc *desc);
|
void FindWindowPlacementAndResize(const WindowDesc *desc);
|
||||||
|
|
||||||
public:
|
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);
|
Window(const WindowDesc *desc, WindowNumber number = 0);
|
||||||
|
|
||||||
virtual ~Window();
|
virtual ~Window();
|
||||||
|
|
Loading…
Reference in New Issue