private SetPosition ( |
||
rect | ||
reverseX | bool | |
reverseY | bool | |
return | void |
/// <summary> /// an item has been pressed /// </summary> private void OnItemPressed() { var item = _content[_selectedIndex]; // item has children, open a new menu if (item.Children != null && item.Children.Any()) { _childMenu = new YamuiMenu(Location, item.Children) { IamMain = false, _parentMenu = this }; _childMenu.SetPosition(new Rectangle(Location.X + Width, Location.Y + Controls[_selectedIndex].Top, Width, Height), _reverseX, _reverseY); _childMenu.Show(); } else { // exec action and close the menu item.Do(); CloseAll(); } }
/// <summary> /// an item has been pressed /// </summary> private void OnItemPressed() { var item = _content[_selectedIndex]; // item has children, open a new menu if (item.Children != null && item.Children.Any()) { _childMenu = new YamuiMenu(Location, item.Children) { IamMain = false, _parentMenu = this }; _childMenu.SetPosition(new Rectangle(Location.X + Width, Location.Y + Controls[_selectedIndex].Top, Width, Height), _reverseX, _reverseY); _childMenu.Show(); } else { // exec action and close the menu item.Do(); CloseAll(); } }