summaryrefslogtreecommitdiff
path: root/src/toolbar_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-05-08 11:31:41 +0000
committerrubidium <rubidium@openttd.org>2008-05-08 11:31:41 +0000
commit2eef026fe35b9236606062f7d8a59d5661a5c748 (patch)
tree34abcc3662d6f35a9ace2d7f77586e68242b96e7 /src/toolbar_gui.cpp
parentd3650ecb3a42529c720634dcdc982d046a47a1ee (diff)
downloadopenttd-2eef026fe35b9236606062f7d8a59d5661a5c748.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.cpp6
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);