Browse Source

Menu: added OnOpenMenu event handler. (#276)

giladlevi 5 năm trước cách đây
mục cha
commit
c832688112
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      Terminal.Gui/Views/Menu.cs

+ 2 - 0
Terminal.Gui/Views/Menu.cs

@@ -349,11 +349,13 @@ namespace Terminal.Gui {
 			action = item.Action;
 		}
 
+		public event EventHandler OnOpenMenu;
 		Menu openMenu;
 		View previousFocused;
 
 		void OpenMenu (int index)
 		{
+			OnOpenMenu?.Invoke(this, null);
 			if (openMenu != null)
 				SuperView.Remove (openMenu);