equal
deleted
inserted
replaced
614 } |
614 } |
615 } |
615 } |
616 |
616 |
617 void ShowDropDownMenu(Window *w, const StringID *strings, int selected, int button, uint32 disabled_mask, uint32 hidden_mask) |
617 void ShowDropDownMenu(Window *w, const StringID *strings, int selected, int button, uint32 disabled_mask, uint32 hidden_mask) |
618 { |
618 { |
619 WindowNumber num; |
|
620 WindowClass cls; |
|
621 int i; |
619 int i; |
622 const Widget *wi; |
620 const Widget *wi; |
623 Window *w2; |
621 Window *w2; |
624 const Window *w3; |
622 const Window *w3; |
625 bool is_dropdown_menu_shown = IsWindowWidgetLowered(w, button); |
623 bool is_dropdown_menu_shown = IsWindowWidgetLowered(w, button); |
626 int top, height; |
624 int top, height; |
627 int screen_top, screen_bottom; |
625 int screen_top, screen_bottom; |
628 bool scroll = false; |
626 bool scroll = false; |
629 |
627 |
630 cls = w->window_class; |
|
631 num = w->window_number; |
|
632 DeleteWindowById(WC_DROPDOWN_MENU, 0); |
628 DeleteWindowById(WC_DROPDOWN_MENU, 0); |
633 w = FindWindowById(cls, num); |
|
634 |
629 |
635 if (is_dropdown_menu_shown) return; |
630 if (is_dropdown_menu_shown) return; |
636 |
631 |
637 LowerWindowWidget(w, button); |
632 LowerWindowWidget(w, button); |
638 |
633 |