public override void ConnectToMenu(IUnitMenu menu, Menu subMenu) { if (this.connectedToMenu) { return; } this.connectedToMenu = true; this.Menu = subMenu as IPanelMenu; if (this.Menu != null) { this.Menu.EnableMenuItem.Provider.Subscribe(this.enableObserver); this.Menu.HealthBarPositionMenuItem.Provider.Subscribe(this.healthbarPosObserver); } }
/// <summary> /// The connect to menu. /// </summary> /// <param name="menu"> /// The menu. /// </param> public virtual void ConnectToMenu(IUnitMenu menu, Menu subMenu) { if (this.connectedToMenu) { return; } this.connectedToMenu = true; this.Menu = subMenu as IPanelMenu; if (this.Menu != null) { this.enableObserver.Subscribe(this.Menu.EnableMenuItem.Provider); this.ConnectSizeIncreaseToMenu(); this.positionObserver.Subscribe(this.Menu.HealthBarPositionMenuItem.Provider); } }
/// <summary> /// The generate menu. /// </summary> /// <returns> /// The <see cref="Ensage.Common.Menu.Menu" />. /// </returns> Menu IUnitOverlayElement.GenerateMenu(IUnitMenu menu) { this.GeneratePanelMenu(); this.GenerateEnable(); this.GenerateSizeIncrease(); this.GenerateHealthBarPosition(); var subMenu = this.AddSubmenu(menu); subMenu.AddItem(this.Menu.EnableMenuItem); if (this.Menu.SizeIncreaseMenuItem != null) { subMenu.AddItem(this.Menu.SizeIncreaseMenuItem); } subMenu.AddItem(this.Menu.HealthBarPositionMenuItem); return(subMenu); }
/// <summary> /// The add submenu. /// </summary> /// <param name="menu"> /// The menu. /// </param> /// <returns> /// The <see cref="Ensage.Common.Menu.Menu" />. /// </returns> public virtual Menu AddSubmenu(IUnitMenu menu) { return(menu.Menu.AddSubMenu(this.Menu as Menu)); }
/// <summary> /// The generate menu. /// </summary> /// <param name="menu"> /// The menu. /// </param> /// <returns> /// The <see cref="Menu" />. /// </returns> public Menu GenerateMenu(IUnitMenu menu) { throw new NotImplementedException(); }
/// <summary> /// The connect to menu. /// </summary> /// <param name="menu"> /// The menu. /// </param> /// <param name="subMenu"> /// The sub Menu. /// </param> public void ConnectToMenu(IUnitMenu menu, Menu subMenu) { }
/// <summary> /// The add submenu. /// </summary> /// <param name="menu"> /// The menu. /// </param> /// <returns> /// The <see cref="Menu" />. /// </returns> public Menu AddSubmenu(IUnitMenu menu) { throw new NotImplementedException(); }
/// <summary> /// The connect to menu. /// </summary> /// <param name="menu"> /// The menu. /// </param> public void ConnectToMenu(IUnitMenu menu, Menu subMenu) { // this.BotPanel.ConnectToMenu(menu, subMenu); }
/// <summary> /// The connect to menu. /// </summary> /// <param name="menu"> /// The menu. /// </param> public void ConnectToMenu(IUnitMenu menu, Menu subMenu) { // this.LeftPanel.ConnectToMenu(menu, subMenu); // this.TopPanel.ConnectToMenu(menu, subMenu); // this.RightPanel.ConnectToMenu(menu, subMenu); }
/// <summary> /// The connect to menu. /// </summary> /// <param name="menu"> /// The menu. /// </param> /// <param name="subMenu"> /// The sub Menu. /// </param> public void ConnectToMenu(IUnitMenu menu, Menu subMenu) { throw new NotImplementedException(); }