public virtual void Update(Scene scene) { Ticks++; foreach (var handler in SubMenuHandlers.OrderBy(x => x.UpdatePriority)) { handler.Update(scene); } }
public virtual void HandleInput(Scene scene) { InputBlocked = false; foreach (var handler in SubMenuHandlers.OrderBy(x => x.InputPriority)) { handler.HandleInput(scene); if (handler.IsOpen && handler.BlocksInput) { InputBlocked = true; break; } } }
public IEnumerable <Menu> GetAllMenus() { return(new[] { this }.Concat(SubMenuHandlers.Where(x => x.IsOpen).SelectMany(x => x.InternalMenu.GetAllMenus())).Where(x => x != null)); }