public override void HandleExtendedParameters(XElement extendedParameters) { foreach (XElement param in extendedParameters.Descendants("ContextEntry")) { string name = "NULL"; string icon = "NULL"; string message = "NULL"; if (param.Attribute("name") != null) { name = param.Attribute("name").Value; } if (param.Attribute("icon") != null) { icon = param.Attribute("icon").Value; } if (param.Attribute("message") != null) { message = param.Attribute("message").Value; } var newEntry = new ContextMenuEntry { EntryName = name, IconName = icon, ComponentMessage = message }; _entries.Add(newEntry); } }
public override void HandleExtendedParameters(XElement extendedParameters) { foreach (XElement param in extendedParameters.Descendants("ContextEntry")) { string name = "NULL"; string icon = "NULL"; string message = "NULL"; if (param.Attribute("name") != null) name = param.Attribute("name").Value; if (param.Attribute("icon") != null) icon = param.Attribute("icon").Value; if (param.Attribute("message") != null) message = param.Attribute("message").Value; var newEntry = new ContextMenuEntry { EntryName = name, IconName = icon, ComponentMessage = message }; _entries.Add(newEntry); } }
public void AddEntry(ContextMenuEntry entry) { _entries.Add(entry); }
public ContextMenuButton(ContextMenuEntry entry, Vector2D size, IResourceManager resourceManager) { _resourceManager = resourceManager; UserData = entry.ComponentMessage; Size = size; _currentColor = Color.Gray; _iconSprite = _resourceManager.GetSprite(entry.IconName); _textLabel = new Label(entry.EntryName, "CALIBRI", _resourceManager); _textLabel.Update(0); }