Пример #1
0
        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);
            }
        }
Пример #2
0
        /// <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);
            }
        }
Пример #3
0
        /// <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);
        }
Пример #4
0
 /// <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));
 }
Пример #5
0
 /// <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();
 }
Пример #6
0
 /// <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)
 {
 }
Пример #7
0
 /// <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();
 }
Пример #8
0
 /// <summary>
 ///     The connect to menu.
 /// </summary>
 /// <param name="menu">
 ///     The menu.
 /// </param>
 public void ConnectToMenu(IUnitMenu menu, Menu subMenu)
 {
     // this.BotPanel.ConnectToMenu(menu, subMenu);
 }
Пример #9
0
 /// <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();
 }