diff options
author | rubidium <rubidium@openttd.org> | 2008-05-08 11:31:41 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-05-08 11:31:41 +0000 |
commit | 51cda2252ceb088d75f25074f1e83e8eec5f18b6 (patch) | |
tree | 34abcc3662d6f35a9ace2d7f77586e68242b96e7 /src/toolbar_gui.cpp | |
parent | 5a7fcf9aa3ce17e9f8602a682171b30cc8b1a786 (diff) | |
download | openttd-51cda2252ceb088d75f25074f1e83e8eec5f18b6.tar.xz |
(svn r13004) -Codechange: replace AllocateWindow and AllocateWindowDesc with a Window constructor.
Diffstat (limited to 'src/toolbar_gui.cpp')
-rw-r--r-- | src/toolbar_gui.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index f848d3345..f0ac39dd8 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -1230,7 +1230,7 @@ static Window *PopupMainToolbMenu(Window *w, uint16 parent_button, StringID base Point pos = GetToolbarDropdownPos(parent_button, width, height); - w = AllocateWindow(pos.x, pos.y, width, height, MenuWndProc, WC_TOOLBAR_MENU, _menu_widgets); + w = new Window(pos.x, pos.y, width, height, MenuWndProc, WC_TOOLBAR_MENU, _menu_widgets); w->widget[0].bottom = item_count * 10 + 1; w->flags4 &= ~WF_WHITE_BORDER_MASK; @@ -1390,7 +1390,7 @@ static Window *PopupMainPlayerToolbMenu(Window *w, int main_button, int gray) DeleteWindowById(WC_TOOLBAR_MENU, 0); Point pos = GetToolbarDropdownPos(main_button, 241, 82); - w = AllocateWindow(pos.x, pos.y, 241, 82, PlayerMenuWndProc, WC_TOOLBAR_MENU, _player_menu_widgets); + w = new Window(pos.x, pos.y, 241, 82, PlayerMenuWndProc, WC_TOOLBAR_MENU, _player_menu_widgets); w->flags4 &= ~WF_WHITE_BORDER_MASK; WP(w, menu_d).item_count = 0; WP(w, menu_d).sel_index = (_local_player != PLAYER_SPECTATOR) ? _local_player : GetPlayerIndexFromMenu(0); @@ -1418,7 +1418,7 @@ Window *AllocateToolbar() /* Clean old GUI values; railtype is (re)set by rail_gui.cpp */ _last_built_roadtype = ROADTYPE_ROAD; - Window *w = AllocateWindowDesc((_game_mode != GM_EDITOR) ? &_toolb_normal_desc : &_toolb_scen_desc); + Window *w = new Window((_game_mode != GM_EDITOR) ? &_toolb_normal_desc : &_toolb_scen_desc); if (w == NULL) return NULL; CLRBITS(w->flags4, WF_WHITE_BORDER_MASK); |