diff --git a/LemonUI/Menus/NativeMenu.cs b/LemonUI/Menus/NativeMenu.cs
index 23fa21d7..4a93d768 100644
--- a/LemonUI/Menus/NativeMenu.cs
+++ b/LemonUI/Menus/NativeMenu.cs
@@ -537,6 +537,10 @@ public string Subtitle
///
public bool UseMouse { get; set; } = true;
///
+ /// If the menu should be closed when the user clicks out of bounds (aka anywhere else other than the items).
+ ///
+ public bool CloseOnInvalidClick { get; set; } = true;
+ ///
/// If the camera should be rotated when the cursor is on the left and right corners of the screen.
///
public bool RotateCamera { get; set; } = false;
@@ -1009,8 +1013,11 @@ private void ProcessControls()
}
// If we got here, the user clicked outside of the selected item area
- // So close the menu (same behavior of the interaction menu)
- Close();
+ // So close the menu if required (same behavior of the interaction menu)
+ if (CloseOnInvalidClick)
+ {
+ Close();
+ }
return;
}
}