mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-19 12:39:11 +00:00
(svn r15312) -Codechange: Handle closing of drop down menus when clicking in a window in a single place, instead of in the OnClick event for some windows. This standardises behaviour so that clicking anywhere in a window will close its drop down menu, which happened before for some windows but not all. In addition the dubious feature of hiding a drop down menu by opening the same menu has been removed. This only caused wasted CPU cycles as a whole new list was generated and then destroyed. Breathe.
This commit is contained in:
@@ -925,7 +925,6 @@ struct NetworkStartServerWindow : public QueryStringBaseWindow {
|
||||
|
||||
virtual void OnClick(Point pt, int widget)
|
||||
{
|
||||
if (widget != NSSW_CONNTYPE_BTN && widget != NSSW_LANGUAGE_BTN) HideDropDownMenu(this);
|
||||
this->field = widget;
|
||||
switch (widget) {
|
||||
case NSSW_CLOSE: // Close 'X'
|
||||
|
Reference in New Issue
Block a user