public MenuWindow AddWindow(Window window) { if (window == Window.NONE) { throw new ArgumentException("Can't add NONE window!"); } if (menuStack.Count > 0) { menuStack.Peek().OnSetAsBackground(); } currentWindow = window; MenuWindow menu = menuProperties.CreateWindow(window, myCanvas.transform); menu.OnActivate(); menuStack.Push(menu); if (OnMenuAdded != null) { OnMenuAdded(this, new EventArgs()); } tooltip.GetComponent <RectTransform>().SetAsLastSibling(); return(menu); }
public MenuWindow AddWindow(Window window) { if (window == Window.NONE) { throw new ArgumentException("Can't add NONE window!"); } currentWindow = window; MenuWindow menu = menuProperties.CreateWindow(window, myCanvas.transform); menu.OnActivate(); menuStack.Push(menu); if (OnMenuAdded != null) { OnMenuAdded(this, new EventArgs()); } return(menu); }