예제 #1
0
        public UIPartSelector(BaseMenu menu, Point position)
            : base(menu, null, new Rectangle(position.X, position.Y, 0, 0))
        {
            TypeBar = new UIStandardButton(menu, new Point(position.X,position.Y), "Nose");
            TypeBar.ForcedLength = (int)Resources.Menus.ButtonFont.MeasureString("012345").X;
            TypeBar.dimensions = new Rectangle(position.X, position.Y, TypeBar.ForcedLength + 36 * 2, 48);
            int x = TypeBar.dimensions.X + TypeBar.dimensions.Width - 24;
            NameBar = new UIStandardButton(menu, new Point(x, position.Y), "No Part");
            NameBar.ForcedLength = nameLength;
            NameBar.isDisplay = true;
            NameBar.dimensions = new Rectangle(x, position.Y, NameBar.ForcedLength + 36 * 2, 48);
            menu.Manager.Elements.Add(NameBar);

            /*tex = Resources.Menus.Customization.DescriptionScreen;
            dim = new Rectangle((weaponNameBar.dimensions.X+weaponNameBar.dimensions.Width)-tex.Width, position.Y + weaponGraphicBox.dimensions.Height + 8, tex.Width, tex.Height);
            weaponDescriptionBox = new UIElement(menu, tex, dim);*/

            Texture2D tex = Resources.Menus.Customization.UpArrow;
            Rectangle dim = new Rectangle(NameBar.dimensions.X + (36 * 2 + NameBar.ForcedLength) - tex.Width
                , position.Y-6, tex.Width, tex.Height);
            UpArrow = new UIElement(menu, tex, dim);
            tex = Resources.Menus.Customization.DownArrow;
            dim = new Rectangle(NameBar.dimensions.X + (36 * 2 + NameBar.ForcedLength) - tex.Width
                , position.Y+dim.Height+8, tex.Width, tex.Height);
            DownArrow = new UIElement(menu, tex, dim);
            menu.Manager.Elements.Add(UpArrow);
            menu.Manager.Elements.Add(DownArrow);
        }
예제 #2
0
        public UIWeaponSelector(BaseMenu menu, Point position)
            : base(menu, null, new Rectangle(position.X, position.Y, 0, 0))
        {
            Texture2D tex = Resources.Menus.Customization.WeaponSelector;
            Rectangle dim = new Rectangle(position.X, position.Y, tex.Width, tex.Height);
            graphicBox = new UIElement(menu, tex, dim);
            tex = Resources.Menus.HUD.WeaponIcon[0];
            dim = new Rectangle(dim.X + (dim.Width / 2 - tex.Width / 2), dim.Y + (dim.Height / 2 - tex.Height / 2), tex.Width, tex.Height);
            graphic = new UIElement(menu, tex, dim);
            int x = graphicBox.dimensions.X + graphicBox.dimensions.Width - 24;
            int y = 8;
            NameBar = new UIStandardButton(menu, new Point(x, position.Y+y), "No Weapon");
            NameBar.ForcedLength = nameLength;
            NameBar.dimensions = new Rectangle(x, position.Y, NameBar.ForcedLength + 36 * 2, 48);
            NameBar.isDisplay = true;
            menu.Manager.Elements.Add(NameBar);

            /*tex = Resources.Menus.Customization.DescriptionScreen;
            dim = new Rectangle((weaponNameBar.dimensions.X+weaponNameBar.dimensions.Width)-tex.Width, position.Y + weaponGraphicBox.dimensions.Height + 8, tex.Width, tex.Height);
            weaponDescriptionBox = new UIElement(menu, tex, dim);*/

            tex = Resources.Menus.Customization.UpArrow;
            dim = new Rectangle(NameBar.dimensions.X + (36 * 2 + NameBar.ForcedLength) - tex.Width
                , position.Y, tex.Width, tex.Height);
            UpArrow = new UIElement(menu, tex, dim);
            tex = Resources.Menus.Customization.DownArrow;
            dim = new Rectangle(NameBar.dimensions.X + (36 * 2 + NameBar.ForcedLength) - tex.Width
                , position.Y + dim.Height + 12, tex.Width, tex.Height);
            DownArrow = new UIElement(menu, tex, dim);
            menu.Manager.Elements.Add(UpArrow);
            menu.Manager.Elements.Add(DownArrow);
            menu.Manager.Elements.Add(graphicBox);
            Available = false;
        }
예제 #3
0
 public void BackButtonPressed()
 {
     _currentDisplayedMenu.HideMenu();
     if (_menusStack.Count > 0)
     {
         _currentDisplayedMenu = (BaseMenu)_menusStack.Pop();
         _currentDisplayedMenu.DisplayMenu();
     }
 }
예제 #4
0
    public void ChangeMenu(MenuTypes menuType)
    {
        if (_currentDisplayedMenu)
        {
            _currentDisplayedMenu.HideMenu();
            _menusStack.Push(_currentDisplayedMenu);
        }

        _currentDisplayedMenu = (BaseMenu)_menusTable[menuType];
        _currentDisplayedMenu.DisplayMenu();
    }
예제 #5
0
 public virtual void ClearMenu(UIElement element = null)
 {
     BaseMenu.Clear(element);
 }
예제 #6
0
 public override void leftClickHeld(int x, int y)
 {
     BaseMenu.PerformClick(new Point(x, y), false, false, true);
 }
예제 #7
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(BaseMenu model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update BaseMenu set ");

            strSql.Append(" Memo = @Memo , ");
            strSql.Append(" Image = @Image , ");
            strSql.Append(" UrlId = @UrlId , ");
            strSql.Append(" UrlName = @UrlName , ");
            strSql.Append(" BindSQL = @BindSQL , ");
            strSql.Append(" WorkId = @WorkId , ");
            strSql.Append(" SortId = @SortId , ");
            strSql.Append(" Name = @Name , ");
            strSql.Append(" DllName = @DllName , ");
            strSql.Append(" FunName = @FunName , ");
            strSql.Append(" ModuleId = @ModuleId , ");
            strSql.Append(" PMenuId = @PMenuId ");
            strSql.Append(" where MenuId=@MenuId ");

            SqlParameter[] parameters =
            {
                new SqlParameter("@MenuId",   SqlDbType.Int,        4),
                new SqlParameter("@Memo",     SqlDbType.VarChar,  254),
                new SqlParameter("@Image",    SqlDbType.VarChar,  500),
                new SqlParameter("@UrlId",    SqlDbType.VarChar,  100),
                new SqlParameter("@UrlName",  SqlDbType.VarChar,  100),
                new SqlParameter("@BindSQL",  SqlDbType.NVarChar,  -1),
                new SqlParameter("@WorkId",   SqlDbType.Int,        4),
                new SqlParameter("@SortId",   SqlDbType.Int,        4),
                new SqlParameter("@Name",     SqlDbType.VarChar,   50),
                new SqlParameter("@DllName",  SqlDbType.VarChar,  200),
                new SqlParameter("@FunName",  SqlDbType.VarChar,  200),
                new SqlParameter("@ModuleId", SqlDbType.Int,        4),
                new SqlParameter("@PMenuId",  SqlDbType.Int, 4)
            };

            parameters[0].Value  = model.MenuId;
            parameters[1].Value  = model.Memo;
            parameters[2].Value  = model.Image;
            parameters[3].Value  = model.UrlId;
            parameters[4].Value  = model.UrlName;
            parameters[5].Value  = model.BindSQL;
            parameters[6].Value  = model.WorkId;
            parameters[7].Value  = model.SortId;
            parameters[8].Value  = model.Name;
            parameters[9].Value  = model.DllName;
            parameters[10].Value = model.FunName;
            parameters[11].Value = model.ModuleId;
            parameters[12].Value = model.PMenuId;
            int rows = dbc.ExeInfochange(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
예제 #8
0
 public virtual void leftClickHeld(int x, int y)
 {
     BaseMenu.PerformClick(new Point(x, y), false, false, true);
 }
        public void GetLoginFirstMenu_Debug()
        {
            int ModuleId = Convert.ToInt32(ParamsData["ModuleId"]);

            string filepath = AppPluginManage.getbaseinfoDataValue(_pluginName, "menuconfig");

            System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument();
            xmlDoc.Load(AppGlobal.AppRootPath + filepath);
            XmlNodeList     nl       = xmlDoc.DocumentElement.SelectNodes("menus/menu");
            List <BaseMenu> menulist = new List <BaseMenu>();

            foreach (XmlNode n in nl)
            {
                BaseMenu bmenu = new BaseMenu();
                bmenu.MenuId   = Convert.ToInt32(n.Attributes["MenuId"].Value);
                bmenu.ModuleId = Convert.ToInt32(n.Attributes["ModuleId"].Value);
                bmenu.PMenuId  = Convert.ToInt32(n.Attributes["PMenuId"].Value);
                bmenu.Name     = n.Attributes["Name"].Value;
                bmenu.Image    = n.Attributes["Image"].Value;
                bmenu.DllName  = n.Attributes["DllName"].Value;
                bmenu.FunName  = n.Attributes["FunName"].Value;
                bmenu.UrlName  = n.Attributes["UrlName"].Value;
                menulist.Add(bmenu);
            }

            List <BaseMenu> menuList = menulist;
            //List<BaseMenu> AllmenuList = menulist;
            List <BaseMenu> _menuList = new List <BaseMenu>();

            for (int i = 0; i < menuList.Count; i++)
            {
                if (menuList[i].PMenuId != -1)
                {
                    BaseMenu _menu = menuList.Find(x => x.MenuId == menuList[i].PMenuId);
                    if (_menuList.FindIndex(x => x.MenuId == _menu.MenuId) == -1 && menuList.FindIndex(x => x.MenuId == _menu.MenuId) == -1)
                    {
                        _menuList.Add(_menu);
                    }
                }
            }
            menuList.AddRange(_menuList);


            List <BaseMenu> menus = menuList.FindAll(x => (x.ModuleId == ModuleId && x.PMenuId == -1)).OrderBy(x => x.SortId).ToList();
            string          ret   = "";//"[{\"FirstMenu\":{},\"SecondMenu\":[]}]";

            for (int i = 0; i < menus.Count; i++)
            {
                string FirstMenu  = "{}";
                string SecondMenu = "[]";

                FirstMenu = JavaScriptConvert.SerializeObject(menus[i]);
                List <BaseMenu> secondmenus = menuList.FindAll(x => x.PMenuId == menus[i].MenuId).OrderBy(x => x.SortId).ToList();
                SecondMenu = secondmenus.Count > 0 ? JavaScriptConvert.SerializeObject(secondmenus) : "[]";
                if (ret == "")
                {
                    ret += "{\"FirstMenu\":" + FirstMenu + ",\"SecondMenu\":" + SecondMenu + "}";
                }
                else
                {
                    ret += ",{\"FirstMenu\":" + FirstMenu + ",\"SecondMenu\":" + SecondMenu + "}";
                }
            }
            JsonResult = RetSuccess("", "[" + ret + "]");
        }
예제 #10
0
 // Start is called before the first frame update
 void Start()
 {
     menuStack       = new Stack <BaseMenu>();
     currentBaseMenu = this;
     currentCanvas   = currentBaseMenu.canvas;
 }
예제 #11
0
 public WarpMenu()
     : base("WarpMenu", null, false, null, null, false)
 {
     Menu = SetUpMenu();
     BaseMenu.Add(Menu);
 }
예제 #12
0
 public static void Initialize()
 {
     BaseMenu.Initialize();
     BaseLogic.Initialize();
     ChampionLoader.Initialize();
 }
예제 #13
0
        //调试免登录
        private void DebugLogin()
        {
            #region 进入调试模式

            if (AppPluginManage.getbaseinfoDataValue(_pluginName, "isdebug") == "true")
            {
                //进入调试模式
                DefaultView = frmmain as IBaseViewBusiness;

                SysLoginRight right = new SysLoginRight();
                right.UserId   = 1;
                right.EmpId    = 1;
                right.WorkId   = 1;
                right.DeptId   = 1;
                right.DeptName = "调试科室";
                right.EmpName  = "调试用户";
                right.WorkName = "调试机构";
                AppGlobal.cache.Add("RoleUser", right);

                frmmain.UserName = right.EmpName;
                frmmain.DeptName = right.DeptName;
                frmmain.WorkName = right.WorkName;
                if (AppPluginManage.getbaseinfoDataValue(_pluginName, "menuconfig") != null)
                {
                    string filepath = AppPluginManage.getbaseinfoDataValue(_pluginName, "menuconfig");
                    System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument();
                    xmlDoc.Load(filepath);

                    XmlNodeList       nl     = xmlDoc.DocumentElement.SelectNodes("modules/module");
                    List <BaseModule> mdlist = new List <BaseModule>();
                    foreach (XmlNode n in nl)
                    {
                        BaseModule bmd = new BaseModule();
                        bmd.ModuleId = Convert.ToInt32(n.Attributes["ModuleId"].Value);
                        bmd.Name     = n.Attributes["Name"].Value;
                        mdlist.Add(bmd);
                    }
                    nl = xmlDoc.DocumentElement.SelectNodes("menus/menu");
                    List <BaseMenu> menulist = new List <BaseMenu>();
                    foreach (XmlNode n in nl)
                    {
                        BaseMenu bmenu = new BaseMenu();
                        bmenu.MenuId   = Convert.ToInt32(n.Attributes["MenuId"].Value);
                        bmenu.ModuleId = Convert.ToInt32(n.Attributes["ModuleId"].Value);
                        bmenu.PMenuId  = Convert.ToInt32(n.Attributes["PMenuId"].Value);
                        bmenu.Name     = n.Attributes["Name"].Value;
                        bmenu.Image    = n.Attributes["Image"].Value;
                        bmenu.DllName  = n.Attributes["DllName"].Value;
                        bmenu.FunName  = n.Attributes["FunName"].Value;
                        menulist.Add(bmenu);
                    }
                    frmmain.modules = mdlist;
                    frmmain.menus   = menulist;
                    //frmmain.depts = NewObject<Dept>().GetHaveDept(right.EmpId);
                }
                frmmain.showSysMenu();
                ShowWeclomeForm();

                ((System.Windows.Forms.Form)frmmain).ShowIcon = true;
                ((System.Windows.Forms.Form)frmmain).Icon     = System.Drawing.Icon.ExtractAssociatedIcon(EFWCoreLib.CoreFrame.Init.AppGlobal.AppRootPath + @"images\msn.ico");
            }
            #endregion
        }
예제 #14
0
 public void CloseMenu(BaseMenu baseMenu, float removalDelay = 1f)
 {
     CurrentMenu = baseMenu;
     CloseCurrentMenu(removalDelay);
 }
예제 #15
0
 public virtual void changeScreenSize()
 {
     BaseMenu.UpdateBounds();
 }
예제 #16
0
 public virtual void releaseRightClick(int x, int y)
 {
     BaseMenu.PerformClick(new Point(x, y), true, true, false);
 }
예제 #17
0
 public virtual void receiveLeftClick(int x, int y, bool playSound = true)
 {
     BaseMenu.PerformClick(new Point(x, y), false, false, false);
 }
예제 #18
0
 public virtual void receiveKeyPress(Keys k)
 {
     BaseMenu.PerformKey(k, false);
 }
예제 #19
0
 public void ShowDefaultMenu()
 {
     _currentDisplayedMenu = (BaseMenu)_menusTable[_defaultMenu];
     _currentDisplayedMenu.DisplayMenu();
 }
예제 #20
0
        private void OnGameLoad(EventArgs args)
        {
            try
            {
                Logger.Prefix = string.Format("{0} - {1}", BaseName, Name);

                Menu = new Menu(Name, Name);

                var experienceMenu = new Menu("缁忛獙鑼冨洿", Name + "Experience");
                experienceMenu.AddItem(new MenuItem(Name + "ExperienceColor", "棰滆壊").SetValue(Color.Gray));
                experienceMenu.AddItem(new MenuItem(Name + "ExperienceSelf", "鑷繁").SetValue(true));
                experienceMenu.AddItem(new MenuItem(Name + "ExperienceFriendly", "鐩熷弸").SetValue(true));
                experienceMenu.AddItem(new MenuItem(Name + "ExperienceEnemy", "鏁屾柟").SetValue(true));

                var attackMenu = new Menu("鏀诲嚮鑼冨洿", Name + "Attack");
                attackMenu.AddItem(new MenuItem(Name + "AttackColor", "棰滆壊").SetValue(Color.Yellow));
                attackMenu.AddItem(new MenuItem(Name + "AttackSelf", "鑷繁").SetValue(true));
                attackMenu.AddItem(new MenuItem(Name + "AttackFriendly", "鐩熷弸").SetValue(true));
                attackMenu.AddItem(new MenuItem(Name + "AttackEnemy", "鏁屾柟").SetValue(true));

                var turretMenu = new Menu("鐐鑼冨洿", Name + "Turret");
                turretMenu.AddItem(new MenuItem(Name + "TurretFriendlyColor", "鐩熷弸棰滆壊").SetValue(Color.DarkGreen));
                turretMenu.AddItem(new MenuItem(Name + "TurretEnemyColor", "鏁屾柟棰滆壊").SetValue(Color.DarkRed));
                turretMenu.AddItem(new MenuItem(Name + "TurretFriendly", "鐩熷弸").SetValue(true));
                turretMenu.AddItem(new MenuItem(Name + "TurretEnemy", "鏁屾柟").SetValue(true));

                var spellMenu = new Menu("娉曟湳鑼冨洿", Name + "Spell");
                spellMenu.AddItem(
                    new MenuItem(Name + "SpellMaxRange", "鏈€澶ф硶鏈寖鍥磡").SetValue(new Slider(1000, 500, 3000)));


                var spellSelfMenu = new Menu("鑷繁鎶€鑳借寖鍥磡", Name + "SpellSelf");
                spellSelfMenu.AddItem(new MenuItem(Name + "SpellSelfColor", "棰滆壊").SetValue(Color.Purple));
                spellSelfMenu.AddItem(new MenuItem(Name + "SpellSelfQ", "Q鑼冨洿").SetValue(true));
                spellSelfMenu.AddItem(new MenuItem(Name + "SpellSelfW", "W鑼冨洿").SetValue(true));
                spellSelfMenu.AddItem(new MenuItem(Name + "SpellSelfE", "E鑼冨洿").SetValue(true));
                spellSelfMenu.AddItem(new MenuItem(Name + "SpellSelfR", "R鑼冨洿").SetValue(true));

                spellMenu.AddSubMenu(spellSelfMenu);

                var spellFriendlyMenu = new Menu("鐩熷弸鎶€鑳借寖鍥磡", Name + "SpellFriendly");
                spellFriendlyMenu.AddItem(new MenuItem(Name + "SpellFriendlyColor", "棰滆壊").SetValue(Color.Green));
                spellFriendlyMenu.AddItem(new MenuItem(Name + "SpellFriendlyQ", "Q鑼冨洿").SetValue(true));
                spellFriendlyMenu.AddItem(new MenuItem(Name + "SpellFriendlyW", "W鑼冨洿").SetValue(true));
                spellFriendlyMenu.AddItem(new MenuItem(Name + "SpellFriendlyE", "E鑼冨洿").SetValue(true));
                spellFriendlyMenu.AddItem(new MenuItem(Name + "SpellFriendlyR", "R鑼冨洿").SetValue(true));

                spellMenu.AddSubMenu(spellFriendlyMenu);

                var spellEnemyMenu = new Menu("鏁屾柟鎶€鑳借寖鍥磡", Name + "SpellEnemy");
                spellEnemyMenu.AddItem(new MenuItem(Name + "SpellEnemyColor", "棰滆壊").SetValue(Color.Red));
                spellEnemyMenu.AddItem(new MenuItem(Name + "SpellEnemyQ", "Q鑼冨洿").SetValue(true));
                spellEnemyMenu.AddItem(new MenuItem(Name + "SpellEnemyW", "W鑼冨洿").SetValue(true));
                spellEnemyMenu.AddItem(new MenuItem(Name + "SpellEnemyE", "E鑼冨洿").SetValue(true));
                spellEnemyMenu.AddItem(new MenuItem(Name + "SpellEnemyR", "R鑼冨洿").SetValue(true));

                spellMenu.AddSubMenu(spellEnemyMenu);

                var distanceMenu = new Menu("璺濈", Name + "Distance");
                distanceMenu.AddItem(new MenuItem(Name + "DistanceEnabled", "鍙楄窛绂婚檺鍒秥").SetValue(true));
                distanceMenu.AddItem(
                    new MenuItem(Name + "DistanceLimit", "璺濈闄愬埗").SetValue(new Slider(1500, 500, 3000)));

                Menu.AddSubMenu(experienceMenu);
                Menu.AddSubMenu(attackMenu);
                Menu.AddSubMenu(turretMenu);
                Menu.AddSubMenu(spellMenu);
                Menu.AddSubMenu(distanceMenu);

                Menu.AddItem(new MenuItem(Name + "Enabled", "鎵ц閿綅").SetValue(false));

                BaseMenu.AddSubMenu(Menu);

                Drawing.OnDraw += OnDraw;

                Initialized = true;
            }
            catch (Exception ex)
            {
                Logger.WriteBlock(ex.Message, ex.ToString());
            }
        }
예제 #21
0
 public override void performHoverAction(int x, int y)
 {
     BaseMenu.PerformHover(new Point(x, y));
 }
        public ActionResult SaveData(FormCollection form)
        {
            int  idProfile = int.Parse(form["id"]);
            var  pro       = db.BaseProfiles.Find(idProfile);
            bool firsttime = false;
            int  increment = 0;

            foreach (var f in form.AllKeys)
            {
                if (!firsttime)
                {
                    Helper.executeNonQUery("Delete from dbo.BaseWidgetUserProfile where ProfileID = " + pro.id, db);
                    Helper.executeNonQUery("Delete from dbo.BaseProfileMenu where userProfileID = " + pro.id, db);
                    Helper.executeNonQUery("Delete from dbo.BaseProfileAction where profileID = " + pro.id, db);
                    Helper.executeNonQUery("Delete from dbo.BaseUserProfileGraph where ProfileID = " + pro.id, db);
                    firsttime = true;
                }

                //ELEMENTEO DEL MENU
                if (f.Contains("MenuID_"))
                {
                    string sp = f.Split('_')[1];
                    if (sp != "")
                    {
                        //inserts
                        int             id  = int.Parse(sp);
                        BaseMenu        m   = db.BaseMenus.Find(id);
                        BaseProfileMenu bpm = new BaseProfileMenu();
                        bpm.menuID        = m.id;
                        bpm.userProfileID = pro.id;
                        bpm.noOrder       = increment;
                        db.BaseProfileMenus.Add(bpm);
                        increment++;
                    }
                }
                else if (f.Contains("ActionID_"))
                {
                    string sp = f.Split('_')[1];
                    if (sp != "")
                    {
                        //inserts
                        int        id = int.Parse(sp);
                        BaseAction a  = db.BaseActions.Find(id);
                        pro.BaseActions.Add(a);
                    }
                }
                else if (f.Contains("WidgetID_"))
                {
                    string sp = f.Split('_')[1];
                    if (sp != "")
                    {
                        //inserts
                        int        id = int.Parse(sp);
                        BaseWidget a  = db.BaseWidgets.Find(id);
                        pro.BaseWidgets1.Add(a);
                    }
                }
                else if (f.Contains("GraphID_"))
                {
                    string sp = f.Split('_')[1];
                    if (sp != "")
                    {
                        //inserts
                        int       id = int.Parse(sp);
                        BaseGraph a  = db.BaseGraphs.Find(id);
                        pro.BaseGraphs.Add(a);
                    }
                }
            }
            db.SaveChanges();

            string parameters = "?id=" + pro.id;
            string url        = URLHelper.getUrl("BasePermissions", "Index2") + parameters;

            return(Redirect(url));
        }
예제 #23
0
 public void OpenTargetPicture(string path, string picture)
 {
     BaseMenu.FileButton.Click();
     BaseMenu.ClickMenuOpen();
     BaseMenu.OpenTargetPicture(FileUtil.DataController.ReadParam(path), FileUtil.DataController.ReadParam(picture));
 }
예제 #24
0
 public void MapButton()
 {
     menuStack.Push(currentBaseMenu);
     currentBaseMenu = BaseRepositionManager.instance;
     StartCoroutine(ViewMap());
 }
예제 #25
0
        private void DrawSpell()
        {
            var drawFriendlyQ = Menu.Item(Name + "SpellFriendlyQ").GetValue <bool>();
            var drawFriendlyW = Menu.Item(Name + "SpellFriendlyW").GetValue <bool>();
            var drawFriendlyE = Menu.Item(Name + "SpellFriendlyE").GetValue <bool>();
            var drawFriendlyR = Menu.Item(Name + "SpellFriendlyR").GetValue <bool>();
            var drawFriendly  = drawFriendlyQ || drawFriendlyW || drawFriendlyE || drawFriendlyR;

            var drawEnemyQ = Menu.Item(Name + "SpellEnemyQ").GetValue <bool>();
            var drawEnemyW = Menu.Item(Name + "SpellEnemyW").GetValue <bool>();
            var drawEnemyE = Menu.Item(Name + "SpellEnemyE").GetValue <bool>();
            var drawEnemyR = Menu.Item(Name + "SpellEnemyR").GetValue <bool>();
            var drawEnemy  = drawEnemyQ || drawEnemyW || drawEnemyE || drawEnemyR;

            var drawSelfQ = Menu.Item(Name + "SpellSelfQ").GetValue <bool>();
            var drawSelfW = Menu.Item(Name + "SpellSelfW").GetValue <bool>();
            var drawSelfE = Menu.Item(Name + "SpellSelfE").GetValue <bool>();
            var drawSelfR = Menu.Item(Name + "SpellSelfR").GetValue <bool>();
            var drawSelf  = drawSelfQ || drawSelfW || drawSelfE || drawSelfR;

            if (!drawFriendly && !drawEnemy && !drawSelf)
            {
                return;
            }

            var circleThickness = BaseMenu.Item("MiscCircleThickness").GetValue <Slider>().Value;

            var distanceLimitEnabled = Menu.Item(Name + "DistanceEnabled").GetValue <bool>();
            var distanceLimit        = Menu.Item(Name + "DistanceLimit").GetValue <Slider>().Value;

            var spellMaxRange = Menu.Item(Name + "SpellMaxRange").GetValue <Slider>().Value;

            foreach (Obj_AI_Hero hero in ObjectManager.Get <Obj_AI_Hero>())
            {
                if (hero.IsValid && !hero.IsDead && hero.IsVisible)
                {
                    if (!distanceLimitEnabled || hero.Distance(ObjectManager.Player.Position) <= distanceLimit)
                    {
                        var color =
                            Menu.Item(Name + "Spell" + (hero.IsMe ? "Self" : (hero.IsEnemy ? "Enemy" : "Friendly")) +
                                      "Color").GetValue <Color>();
                        if ((hero.IsAlly && drawFriendlyQ || hero.IsEnemy && drawEnemyQ || hero.IsMe && drawSelfQ) &&
                            !(hero.IsMe && !drawSelfQ))
                        {
                            var range = hero.Spellbook.GetSpell(SpellSlot.Q).SData.CastRange;
                            if (range <= spellMaxRange && hero.IsOnScreen(range))
                            {
                                Render.Circle.DrawCircle(hero.Position, range, color, circleThickness);
                            }
                        }
                        if ((hero.IsAlly && drawFriendlyW || hero.IsEnemy && drawEnemyW || hero.IsMe && drawSelfW) &&
                            !(hero.IsMe && !drawSelfW))
                        {
                            var range = hero.Spellbook.GetSpell(SpellSlot.W).SData.CastRange;
                            if (range <= spellMaxRange && hero.IsOnScreen(range))
                            {
                                Render.Circle.DrawCircle(hero.Position, range, color, circleThickness);
                            }
                        }
                        if ((hero.IsAlly && drawFriendlyE || hero.IsEnemy && drawEnemyE || hero.IsMe && drawSelfE) &&
                            !(hero.IsMe && !drawSelfE))
                        {
                            var range = hero.Spellbook.GetSpell(SpellSlot.E).SData.CastRange;
                            if (range <= spellMaxRange && hero.IsOnScreen(range))
                            {
                                Render.Circle.DrawCircle(hero.Position, range, color, circleThickness);
                            }
                        }
                        if ((hero.IsAlly && drawFriendlyR || hero.IsEnemy && drawEnemyR || hero.IsMe && drawSelfR) &&
                            !(hero.IsMe && !drawSelfR))
                        {
                            var range = hero.Spellbook.GetSpell(SpellSlot.R).SData.CastRange;
                            if (range <= spellMaxRange && hero.IsOnScreen(range))
                            {
                                Render.Circle.DrawCircle(hero.Position, range, color, circleThickness);
                            }
                        }
                    }
                }
            }
        }
예제 #26
0
 public override void receiveKeyPress(Keys key)
 {
     BaseMenu.PerformKey(key, false);
     base.receiveKeyPress(key);
 }
예제 #27
0
    public void Execute(InterfaceObject menuItem)
    {
        switch (menuItem)
        {
        case InterfaceObject.MainMenu:
            if (_currentMenu != null)
            {
                _currentMenu.Hide();
            }
            _currentMenu = _mainMenu;
            break;

        case InterfaceObject.OptionsMenu:
            if (_currentMenu != null)
            {
                _currentMenu.Hide();
            }
            _currentMenu = _optionsMenu;
            break;

        case InterfaceObject.VideoOptions:
            if (_currentMenu != null)
            {
                _currentMenu.Hide();
            }
            _currentMenu = _videoOptions;
            _currentMenu.Show();
            break;

        case InterfaceObject.AudioOptions:
            if (_currentMenu != null)
            {
                _currentMenu.Hide();
            }
            _currentMenu = _audioOptions;
            _currentMenu.Show();
            break;

        case InterfaceObject.GameOptions:
            if (_currentMenu != null)
            {
                _currentMenu.Hide();
            }
            _currentMenu = _gameOptions;
            _currentMenu.Show();
            break;

        //case InterfaceObject.MenuPause:
        // if (_currentMenu != null) _currentMenu.Hide();
        // _currentMenu = _menuPause;
        // _currentMenu.Show();
        // break;
        //case InterfaceObject.OptionsPauseMenu:
        // if (_currentMenu != null) _currentMenu.Hide();
        // _currentMenu = _optionsPauseMenu;
        // _currentMenu.Show();
        // break;
        default:
            break;
        }

        _currentMenu.Show();
    }
예제 #28
0
        public ActionResult Edit(int id = 0)
        {
            BaseMenu menu = db.BaseMenus.Find(id);

            return(PartialView(menu));
        }
예제 #29
0
 public override void releaseLeftClick(int x, int y)
 {
     BaseMenu.PerformClick(new Point(x, y), false, true, false);
 }
예제 #30
0
 public override void receiveScrollWheelAction(int direction)
 {
     BaseMenu.PerformScroll(direction);
     base.receiveScrollWheelAction(direction);
 }
예제 #31
0
 public override void receiveRightClick(int x, int y, bool playSound = true)
 {
     BaseMenu.PerformClick(new Point(x, y), true, false, false);
 }
예제 #32
0
 public void ShowDefaultMenu()
 {
     _currentDisplayedMenu = (BaseMenu)_menusTable[_defaultMenu];
     _currentDisplayedMenu.DisplayMenu();
 }
예제 #33
0
 public void OpenMenu(BaseMenu menu)
 {
     _menus.Push(menu);
     menu.gameObject.SetActive(true);
     menu.Init();
 }