mirror of https://github.com/OpenTTD/OpenTTD.git
Codechange: Close dropdowns by class instead of id.
This commit is contained in:
parent
2511649938
commit
2e62682f73
|
@ -339,7 +339,7 @@ struct DropdownWindow : Window {
|
|||
*/
|
||||
void ShowDropDownListAt(Window *w, DropDownList &&list, int selected, int button, Rect wi_rect, Colours wi_colour, bool instant_close)
|
||||
{
|
||||
CloseWindowById(WC_DROPDOWN_MENU, 0);
|
||||
CloseWindowByClass(WC_DROPDOWN_MENU);
|
||||
|
||||
/* The preferred position is just below the dropdown calling widget */
|
||||
int top = w->top + wi_rect.bottom + 1;
|
||||
|
|
|
@ -3483,7 +3483,7 @@ void ChangeVehicleViewports(VehicleID from_index, VehicleID to_index)
|
|||
*/
|
||||
void RelocateAllWindows(int neww, int newh)
|
||||
{
|
||||
CloseWindowById(WC_DROPDOWN_MENU, 0);
|
||||
CloseWindowByClass(WC_DROPDOWN_MENU);
|
||||
|
||||
for (Window *w : Window::Iterate()) {
|
||||
int left, top;
|
||||
|
|
Loading…
Reference in New Issue