mirror of https://github.com/OpenTTD/OpenTTD
Fix: Make dropdowns self-close when losing focus.
parent
c3815359f1
commit
2d8d9c49c4
|
@ -203,6 +203,11 @@ struct DropdownWindow : Window {
|
|||
}
|
||||
}
|
||||
|
||||
void OnFocusLost() override
|
||||
{
|
||||
this->Close();
|
||||
}
|
||||
|
||||
Point OnInitialPosition(int16 sm_width, int16 sm_height, int window_number) override
|
||||
{
|
||||
return this->position;
|
||||
|
|
|
@ -2321,7 +2321,6 @@ static void StartWindowDrag(Window *w)
|
|||
_drag_delta.y = w->top - _cursor.pos.y;
|
||||
|
||||
BringWindowToFront(w);
|
||||
CloseWindowById(WC_DROPDOWN_MENU, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2339,7 +2338,6 @@ static void StartWindowSizing(Window *w, bool to_left)
|
|||
_drag_delta.y = _cursor.pos.y;
|
||||
|
||||
BringWindowToFront(w);
|
||||
CloseWindowById(WC_DROPDOWN_MENU, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue