public static void Proccess(IMenuable item, IMenu menu) { IMenuItem currentMItem = item as IMenuItem; if (currentMItem == null) { return; } BehaviorActions.First(x => x.Key == currentMItem.ItemBehavor).Value(currentMItem, menu); }
public GameMenuItem(XElement ItemNode, IMenuable baseItm, Color color, Color selectedColor, SpriteFont font, SpriteFont selectedFont) : base(ItemNode, baseItm) { unselectedColor = TextColor = color; this.selectedColor = selectedColor; unselectedFont = Font = font; this.selectedFont = selectedFont; ElementSelected += () => { Font = selectedFont; TextColor = selectedColor; }; ElementDeselected += () => { Font = unselectedFont; TextColor = unselectedColor; }; }
public MenuItem(XElement ItemNode, IMenuable baseItm) : base(ItemNode) { this.LoadItem(ItemNode); baseItem = baseItm; }
public void AddSubMenu(IMenuable i_SubMenu) { m_SubOptions.Add(i_SubMenu); }
public void Push(IMenuable item) { Commander.Proccess(item, this); }
public GameMenuItem(XElement ItemNode, IMenuable baseItm, Color color, SpriteFont font) : this(ItemNode, baseItm, color, color, font, font) { }