summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2008-01-19 11:08:06 +0000
committerpeter1138 <peter1138@openttd.org>2008-01-19 11:08:06 +0000
commitcc05abf382d74159e3b6d4948042553d199da58f (patch)
tree8b9036bb5460085fc6cacb1fffb787e22a9cd87d
parent8e15c0fba8ceca869d871a581255b859fb677cce (diff)
downloadopenttd-cc05abf382d74159e3b6d4948042553d199da58f.tar.xz
(svn r11924) -Codechange: All dropdowns now use the dropdown widget, so compatibility code can be removed
-rw-r--r--src/widgets/dropdown.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/widgets/dropdown.cpp b/src/widgets/dropdown.cpp
index 2e937c8b4..b55bcd644 100644
--- a/src/widgets/dropdown.cpp
+++ b/src/widgets/dropdown.cpp
@@ -246,21 +246,17 @@ void ShowDropDownList(Window *w, DropDownList *list, int selected, int button)
}
}
- /* XXX Temporary fix to make dropdown compatible with separate widgets */
- const Widget *wil = wi;
- if (wi->type != WWT_DROPDOWN && wi->type != WWT_DROPDOWNIN) wil--;
-
Window *dw = AllocateWindow(
- w->left + wil->left,
+ w->left + wi->left,
top,
- wi->right - wil->left + 1,
+ wi->right - wi->left + 1,
height,
DropDownMenuWndProc,
WC_DROPDOWN_MENU,
_dropdown_menu_widgets);
dw->widget[0].color = wi->color;
- dw->widget[0].right = wi->right - wil->left;
+ dw->widget[0].right = wi->right - wi->left;
dw->widget[0].bottom = height - 1;
dw->SetWidgetHiddenState(1, !scroll);