forked from mirror/OpenTTD
Change: Add window description flag to disallow interactive window closing. (#11008)
This replaces/simplifies testing for a closebox to allow closing a window with right-click, and testing for specific window classes when closing all windows by hotkey. This allows right-click closing of dropdowns and the high-score window.
This commit is contained in:
@@ -2251,7 +2251,7 @@ static const NWidgetPart _nested_toolbar_normal_widgets[] = {
|
||||
static WindowDesc _toolb_normal_desc(
|
||||
WDP_MANUAL, nullptr, 0, 0,
|
||||
WC_MAIN_TOOLBAR, WC_NONE,
|
||||
WDF_NO_FOCUS,
|
||||
WDF_NO_FOCUS | WDF_NO_CLOSE,
|
||||
_nested_toolbar_normal_widgets, lengthof(_nested_toolbar_normal_widgets),
|
||||
&MainToolbarWindow::hotkeys
|
||||
);
|
||||
@@ -2591,7 +2591,7 @@ static const NWidgetPart _nested_toolb_scen_widgets[] = {
|
||||
static WindowDesc _toolb_scen_desc(
|
||||
WDP_MANUAL, nullptr, 0, 0,
|
||||
WC_MAIN_TOOLBAR, WC_NONE,
|
||||
WDF_NO_FOCUS,
|
||||
WDF_NO_FOCUS | WDF_NO_CLOSE,
|
||||
_nested_toolb_scen_widgets, lengthof(_nested_toolb_scen_widgets),
|
||||
&ScenarioEditorToolbarWindow::hotkeys
|
||||
);
|
||||
|
Reference in New Issue
Block a user