summaryrefslogtreecommitdiff
path: root/src/widgets
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-11-15 13:36:30 +0000
committerrubidium <rubidium@openttd.org>2009-11-15 13:36:30 +0000
commitaeb9f8e715c1a11c926d13eaf8cd39b0d0caa3fd (patch)
treef8628644f4b190863dd814ba1f4ff4e74b74a363 /src/widgets
parent7337a0553c28e4b95c3d6bdfba42da84f7c842ee (diff)
downloadopenttd-aeb9f8e715c1a11c926d13eaf8cd39b0d0caa3fd.tar.xz
(svn r18092) -Codechange: remove support for the unnested widgets
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/dropdown.cpp29
1 files changed, 9 insertions, 20 deletions
diff --git a/src/widgets/dropdown.cpp b/src/widgets/dropdown.cpp
index c55292191..7bda0ec15 100644
--- a/src/widgets/dropdown.cpp
+++ b/src/widgets/dropdown.cpp
@@ -326,27 +326,16 @@ void ShowDropDownList(Window *w, DropDownList *list, int selected, int button, u
* down list window. */
Rect wi_rect;
Colours wi_colour;
- if (w->nested_array != NULL) {
- NWidgetCore *nwi = w->GetWidget<NWidgetCore>(button);
- wi_rect.left = nwi->pos_x;
- wi_rect.right = nwi->pos_x + nwi->current_x - 1;
- wi_rect.top = nwi->pos_y;
- wi_rect.bottom = nwi->pos_y + nwi->current_y - 1;
- wi_colour = nwi->colour;
-
- if (nwi->type == NWID_BUTTON_DRPDOWN) {
- nwi->disp_flags |= ND_DROPDOWN_ACTIVE;
- } else {
- w->LowerWidget(button);
- }
+ NWidgetCore *nwi = w->GetWidget<NWidgetCore>(button);
+ wi_rect.left = nwi->pos_x;
+ wi_rect.right = nwi->pos_x + nwi->current_x - 1;
+ wi_rect.top = nwi->pos_y;
+ wi_rect.bottom = nwi->pos_y + nwi->current_y - 1;
+ wi_colour = nwi->colour;
+
+ if (nwi->type == NWID_BUTTON_DRPDOWN) {
+ nwi->disp_flags |= ND_DROPDOWN_ACTIVE;
} else {
- const Widget *wi = &w->widget[button];
- wi_rect.left = wi->left;
- wi_rect.right = wi->right;
- wi_rect.top = wi->top;
- wi_rect.bottom = wi->bottom;
- wi_colour = wi->colour;
-
w->LowerWidget(button);
}
w->SetWidgetDirty(button);