private GUIMenuItem CreateMenuItem(XmlElement element) { GUIMenuItem item = new GUIMenuItem(); item.Name = element.InnerText; item.Shortcut = element.GetAttribute("Shortcut"); if (Boolean.TryParse(element.GetAttribute("IsEnabled"), out bool isEnabled)) { item.IsEnabled = isEnabled; } if (Boolean.TryParse(element.GetAttribute("IsPressed"), out bool isPressed)) { item.IsPressed = isPressed; } if (Boolean.TryParse(element.GetAttribute("IsSelected"), out bool isSelected)) { item.IsSelected = isSelected; } return(item); }
public void RemoveGUIItem(GUIMenuItem item) { _GUIItems.Remove(item); }
public void AddGUIItem(GUIMenuItem item) { _GUIItems.Add(item); }