Beispiel #1
0
 public static void Serialize_SkillsPage(dynamic menu, SkillsPage page, Point mousePosition)
 {
     menu.menuType     = "skillsPage";
     menu.skillAreas   = page.skillAreas.Where(x => x.hoverText.Length > 0).ToList();
     menu.skillBars    = page.skillBars.Where(x => x.hoverText.Length > 0 && !x.name.Equals("-1")).ToList();
     menu.specialItems = page.specialItems;
 }
 public SkillsPageStep()
 {
     driver      = new ChromeDriver();
     loginPage   = new LoginPage(driver);
     profilePage = new ProfilePage(driver);
     skillsPage  = new SkillsPage(driver);
 }
Beispiel #3
0
        private void drawLuckSkill(SkillsPage skills)
        {
            SpriteBatch b = Game1.spriteBatch;
            int         j = 5;

            int num;
            int num2;

            num  = skills.xPositionOnScreen + IClickableMenu.borderWidth + IClickableMenu.spaceToClearTopBorder + 4 * Game1.tileSize - 8;
            num2 = skills.yPositionOnScreen + IClickableMenu.spaceToClearTopBorder + IClickableMenu.borderWidth - Game1.pixelZoom * 2;

            int num3 = 0;

            for (int i = 0; i < 10; i++)
            {
                bool      flag  = false;
                bool      flag2 = false;
                string    text  = "";
                int       num4  = 0;
                Rectangle empty = Rectangle.Empty;

                flag = (Game1.player.LuckLevel > i);
                if (i == 0)
                {
                    text = "Luck";
                }
                num4  = Game1.player.LuckLevel;
                flag2 = (Game1.player.addedLuckLevel.Value > 0);
                empty = new Rectangle(50, 428, 10, 10);

                if (!text.Equals(""))
                {
                    b.DrawString(Game1.smallFont, text, new Vector2((float)num - Game1.smallFont.MeasureString(text).X - (float)(Game1.pixelZoom * 4) - (float)Game1.tileSize, (float)(num2 + Game1.pixelZoom + j * (Game1.tileSize / 2 + Game1.pixelZoom * 6))), Game1.textColor);
                    b.Draw(Game1.mouseCursors, new Vector2((float)(num - Game1.pixelZoom * 16), (float)(num2 + j * (Game1.tileSize / 2 + Game1.pixelZoom * 6))), new Rectangle?(empty), Color.Black * 0.3f, 0f, Vector2.Zero, (float)Game1.pixelZoom, SpriteEffects.None, 0.85f);
                    b.Draw(Game1.mouseCursors, new Vector2((float)(num - Game1.pixelZoom * 15), (float)(num2 - Game1.pixelZoom + j * (Game1.tileSize / 2 + Game1.pixelZoom * 6))), new Rectangle?(empty), Color.White, 0f, Vector2.Zero, (float)Game1.pixelZoom, SpriteEffects.None, 0.87f);
                }
                if (!flag && (i + 1) % 5 == 0)
                {
                    b.Draw(Game1.mouseCursors, new Vector2((float)(num3 + num - Game1.pixelZoom + i * (Game1.tileSize / 2 + Game1.pixelZoom)), (float)(num2 + j * (Game1.tileSize / 2 + Game1.pixelZoom * 6))), new Rectangle?(new Rectangle(145, 338, 14, 9)), Color.Black * 0.35f, 0f, Vector2.Zero, (float)Game1.pixelZoom, SpriteEffects.None, 0.87f);
                    b.Draw(Game1.mouseCursors, new Vector2((float)(num3 + num + i * (Game1.tileSize / 2 + Game1.pixelZoom)), (float)(num2 - Game1.pixelZoom + j * (Game1.tileSize / 2 + Game1.pixelZoom * 6))), new Rectangle?(new Rectangle(145 + (flag ? 14 : 0), 338, 14, 9)), Color.White * (flag ? 1f : 0.65f), 0f, Vector2.Zero, (float)Game1.pixelZoom, SpriteEffects.None, 0.87f);
                }
                else if ((i + 1) % 5 != 0)
                {
                    b.Draw(Game1.mouseCursors, new Vector2((float)(num3 + num - Game1.pixelZoom + i * (Game1.tileSize / 2 + Game1.pixelZoom)), (float)(num2 + j * (Game1.tileSize / 2 + Game1.pixelZoom * 6))), new Rectangle?(new Rectangle(129, 338, 8, 9)), Color.Black * 0.35f, 0f, Vector2.Zero, (float)Game1.pixelZoom, SpriteEffects.None, 0.85f);
                    b.Draw(Game1.mouseCursors, new Vector2((float)(num3 + num + i * (Game1.tileSize / 2 + Game1.pixelZoom)), (float)(num2 - Game1.pixelZoom + j * (Game1.tileSize / 2 + Game1.pixelZoom * 6))), new Rectangle?(new Rectangle(129 + (flag ? 8 : 0), 338, 8, 9)), Color.White * (flag ? 1f : 0.65f), 0f, Vector2.Zero, (float)Game1.pixelZoom, SpriteEffects.None, 0.87f);
                }
                if (i == 9)
                {
                    NumberSprite.draw(num4, b, new Vector2((float)(num3 + num + (i + 2) * (Game1.tileSize / 2 + Game1.pixelZoom) + Game1.pixelZoom * 3 + ((num4 >= 10) ? (Game1.pixelZoom * 3) : 0)), (float)(num2 + Game1.pixelZoom * 4 + j * (Game1.tileSize / 2 + Game1.pixelZoom * 6))), Color.Black * 0.35f, 1f, 0.85f, 1f, 0, 0);
                    NumberSprite.draw(num4, b, new Vector2((float)(num3 + num + (i + 2) * (Game1.tileSize / 2 + Game1.pixelZoom) + Game1.pixelZoom * 4 + ((num4 >= 10) ? (Game1.pixelZoom * 3) : 0)), (float)(num2 + Game1.pixelZoom * 3 + j * (Game1.tileSize / 2 + Game1.pixelZoom * 6))), (flag2 ? Color.LightGreen : Color.SandyBrown) * ((num4 == 0) ? 0.75f : 1f), 1f, 0.87f, 1f, 0, 0);
                }
                if ((i + 1) % 5 == 0)
                {
                    num3 += Game1.pixelZoom * 6;
                }
            }

            skills.drawMouse(b);
        }
Beispiel #4
0
        // ############# Create a Constructor #############

        public SkillTabSteps()
        {
            // Inject the driver
            driver      = new ChromeDriver();
            loginPage   = new LoginPage(driver);
            skillsPage  = new SkillsPage(driver);
            profilePage = new ProfilePage(driver);
        }
Beispiel #5
0
        public static void SetSkillXpToolTip(GameMenu menu)
        {
            SkillsPage skillPage = menu.pages[GameMenu.skillsTab] as SkillsPage;

            foreach (ClickableTextureComponent component in skillPage.skillAreas)
            {
                if (int.TryParse(component.name, out int skillIndex))
                {
                    component.hoverText = GetXpForSkillstring(skillIndex);
                }
            }
        }
        private static void DrawProfessionHoverText(SpriteBatch spriteBatch, SkillsPage skillsPage)
        {
            var hoverText = (string)skillsPage.GetInstanceField("hoverText");

            if (hoverText.Length <= 0)
            {
                return;
            }
            var hoverTitle = (string)skillsPage.GetInstanceField("hoverTitle");

            IClickableMenu.drawHoverText(spriteBatch, hoverText, Game1.smallFont, 0, 0, -1, hoverTitle.Length > 0 ? hoverTitle : null);
        }
Beispiel #7
0
        public void deleteSkillTest(IWebDriver driver)
        {

            // Profile Objects
            ProfilePage profileObj = new ProfilePage(driver);

            profileObj.navigateToSkills(driver);
            // skills Page Object
            SkillsPage skillsObj = new SkillsPage(driver);
            skillsObj.deleteSkills(driver);

        }
Beispiel #8
0
        private void initLuckSkill(SkillsPage skills)
        {
            // Bunch of stuff from the constructor
            int num2 = 0;
            int num3 = skills.xPositionOnScreen + IClickableMenu.borderWidth + IClickableMenu.spaceToClearTopBorder + 4 * Game1.tileSize - Game1.pixelZoom;
            int num4 = skills.yPositionOnScreen + IClickableMenu.spaceToClearTopBorder + IClickableMenu.borderWidth - Game1.pixelZoom * 3;

            for (int i = 4; i < 10; i += 5)
            {
                int j = 5;

                string text  = "";
                string text2 = "";
                bool   flag  = false;
                int    num5  = -1;

                flag = (Game1.player.LuckLevel > i);
                num5 = getLuckProfessionForSkill(i + 1);  //Game1.player.getProfessionForSkill(5, i + 1);
                object[] args = new object[] { text, text2, LevelUpMenu.getProfessionDescription(num5) };
                Helper.Reflection.GetMethod(skills, "parseProfessionDescription").Invoke(args);
                text  = (string)args[0];
                text2 = (string)args[1];

                if (flag && (i + 1) % 5 == 0)
                {
                    var skillBars = Helper.Reflection.GetField <List <ClickableTextureComponent> >(skills, "skillBars").GetValue();
                    skillBars.Add(new ClickableTextureComponent(string.Concat(num5), new Rectangle(num2 + num3 - Game1.pixelZoom + i * (Game1.tileSize / 2 + Game1.pixelZoom), num4 + j * (Game1.tileSize / 2 + Game1.pixelZoom * 6), 14 * Game1.pixelZoom, 9 * Game1.pixelZoom), null, text, Game1.mouseCursors, new Rectangle(159, 338, 14, 9), (float)Game1.pixelZoom, true));
                }
                num2 += Game1.pixelZoom * 6;
            }
            int k    = 5;
            int num6 = k;

            if (num6 == 1)
            {
                num6 = 3;
            }
            else if (num6 == 3)
            {
                num6 = 1;
            }
            string text3 = "";

            if (Game1.player.LuckLevel > 0)
            {
                text3 = "Luck Increased";
            }
            var skillAreas = Helper.Reflection.GetField <List <ClickableTextureComponent> >(skills, "skillAreas").GetValue();

            skillAreas.Add(new ClickableTextureComponent(string.Concat(num6), new Rectangle(num3 - Game1.tileSize * 2 - Game1.tileSize * 3 / 4, num4 + k * (Game1.tileSize / 2 + Game1.pixelZoom * 6), Game1.tileSize * 2 + Game1.pixelZoom * 5, 9 * Game1.pixelZoom), string.Concat(num6), text3, null, Rectangle.Empty, 1f, false));
        }
 // ReSharper disable once SuggestBaseTypeForParameter - we specifically want the skills page here, even if our usage could work against IClickableMenu.
 private static void IntializeSkillsMenu(SkillsPage skillsPage)
 {
     Logger.LogVerbose("Initializing Skills Menu...");
     _skillsMenuInitialized = true;
     PrestigeButtons.Clear();
     foreach (var skill in Skill.AllSkills)
     {
         var width          = 8 * Game1.pixelZoom;
         var height         = 8 * Game1.pixelZoom;
         var yOffset        = (Game1.tileSize / 2.5).Floor();
         var yPadding       = (Game1.tileSize * 1.05).Floor();
         var xOffset        = skillsPage.width + Game1.tileSize;
         var bounds         = new Rectangle(skillsPage.xPositionOnScreen + xOffset, skillsPage.yPositionOnScreen + yPadding + yOffset * skill.SkillScreenPosition + skill.SkillScreenPosition * height, width, height);
         var prestigeButton = new TextureButton(bounds, SkillPrestigeMod.PrestigeIconTexture, new Rectangle(0, 0, 32, 32), () => OpenPrestigeMenu(skill), "Click to open the Prestige menu.");
         PrestigeButtons.Add(prestigeButton);
         Logger.LogVerbose($"{skill.Type.Name} skill prestige button initiated at {bounds.X}, {bounds.Y}. Width: {bounds.Width}, Height: {bounds.Height}");
         Mouse.MouseMoved   += prestigeButton.CheckForMouseHover;
         Mouse.MouseClicked += prestigeButton.CheckForMouseClick;
     }
     Logger.LogVerbose("Skills Menu initialized.");
 }
Beispiel #10
0
 private static void SkillsPage_receiveLeftClick_Postfix(SkillsPage __instance, int x, int y, bool playSound = true)
 {
     if (!Config.EnableMod || GetStatValue(Game1.player, "points") <= 0)
     {
         return;
     }
     foreach (ClickableTextureComponent c in increaseButtons)
     {
         if (c != null && c.containsPoint(x, y))
         {
             string stat    = c.name.Substring("SDRPG_".Length);
             int    oldStat = GetStatValue(Game1.player, stat);
             if (oldStat >= Config.MaxStatValue)
             {
                 return;
             }
             SetModData(Game1.player, stat, oldStat + 1);
             SetModData(Game1.player, "points", GetStatValue(Game1.player, "points") - 1);
             break;
         }
     }
 }
Beispiel #11
0
        private static void SkillsPage_Postfix(SkillsPage __instance)
        {
            if (!Config.EnableMod)
            {
                return;
            }
            int x = __instance.xPositionOnScreen + __instance.width - 24;
            int y = __instance.yPositionOnScreen;

            increaseButtons.Clear();
            for (int i = 0; i < skillNames.Length; i++)
            {
                var name = skillNames[i];
                increaseButtons.Add(new ClickableTextureComponent("SDRPG_" + name, new Rectangle(new Point(x + statsX + 134, y + skillStatsY + i * skillStatY + 17), new Point(64, 64)), null, "", Game1.mouseCursors, OptionsPlusMinus.plusButtonSource, 4f, false)
                {
                    myID            = 106 - i,
                    upNeighborID    = -99998,
                    leftNeighborID  = -99998,
                    rightNeighborID = -99998,
                    downNeighborID  = -99998
                });
            }
        }
Beispiel #12
0
        private static void SkillsPage_draw_Postfix(SkillsPage __instance, SpriteBatch b)
        {
            if (!Config.EnableMod)
            {
                return;
            }

            int x = __instance.xPositionOnScreen + __instance.width - 24;
            int y = __instance.yPositionOnScreen;

            // draw points box

            Game1.drawDialogueBox(x, __instance.yPositionOnScreen, 400, __instance.height, false, true, null, false, true, -1, -1, -1);
            Utility.drawTextWithShadow(b, SHelper.Translation.Get("stardew-rpg"), Game1.dialogueFont, new Vector2(x + 78, y + 112), Color.SaddleBrown, 1f, -1f, -1, -1, 1f, 3);

            int points = GetStatValue(Game1.player, "points");

            if (points < 0)
            {
                points = Config.StartStatExtraPoints;
                SetModData(Game1.player, "points", points);
            }

            if (points > 0)
            {
                Utility.drawTextWithShadow(b, string.Format(SHelper.Translation.Get("x-points-left"), points), Game1.smallFont, new Vector2(x + statsX, y + 128 + 39), Color.Black, 1f, -1f, -1, -1, 1f, 3);
                for (int i = 0; i < increaseButtons.Count; i++)
                {
                    increaseButtons[i].bounds = new Rectangle(new Point(x + statsX + 134, y + skillStatsY + i * skillStatY + 17), new Point(64, 64));
                    increaseButtons[i].draw(b);
                }
            }

            for (int i = 0; i < skillNames.Length; i++)
            {
                Utility.drawTextWithShadow(b, SHelper.Translation.Get(skillNames[i]), Game1.smallFont, new Vector2(x + statsX, y + skillStatsY + 17 + i * skillStatY), Color.Black, 1f, -1f, -1, -1, 1f, 3);

                int val = GetStatValue(Game1.player, skillNames[i]);
                Utility.drawTextWithShadow(b, val.ToString(), Game1.smallFont, new Vector2(x + statsX + 80 + 17, y + skillStatsY + 17 + i * skillStatY), Color.Black, 1f, -1f, -1, -1, 1f, 3);

                int mod = GetStatMod(val);
                if (mod != 0)
                {
                    string modString = "(" + (mod > 0 ? "+" : "") + mod + ")";
                    Utility.drawTextWithShadow(b, modString, Game1.smallFont, new Vector2(x + statsX + 154 + 17, y + skillStatsY + 17 + i * skillStatY), Color.Black, 1f, -1f, -1, -1, 1f, 3);
                }
            }

            // hover text

            var mx = Game1.getMouseX();
            var my = Game1.getMouseY();

            for (int i = 0; i < skillNames.Length; i++)
            {
                var rect = new Rectangle(Utility.Vector2ToPoint(new Vector2(__instance.xPositionOnScreen + __instance.width - 24 + statsX, __instance.yPositionOnScreen + skillStatsY + 17 + i * skillStatY)), Utility.Vector2ToPoint(Game1.smallFont.MeasureString(SHelper.Translation.Get(skillNames[i]))));
                if (rect.Contains(mx, my))
                {
                    IClickableMenu.drawHoverText(b, Game1.parseText(SHelper.Translation.Get(skillNames[i] + "-desc"), Game1.smallFont, 256), Game1.smallFont, 0, 0, -1, SHelper.Translation.Get(skillNames[i] + "-full"), -1, null, null, 0, -1, -1, -1, -1, 1f, null, null);
                    break;
                }
            }


            int    playerLevel = GetExperienceLevel(Game1.player);
            string levelString = string.Format(SHelper.Translation.Get("level-x"), playerLevel);

            b.DrawString(Game1.smallFont, levelString, new Vector2((float)(__instance.xPositionOnScreen + 64 - 12 + 64) - Game1.smallFont.MeasureString(levelString).X / 2f, __instance.yPositionOnScreen + IClickableMenu.borderWidth + IClickableMenu.spaceToClearTopBorder + 4 + 252), Game1.textColor);
            var levels = GetExperienceLevels();

            if (playerLevel < levels.Length + 1)
            {
                string expString = string.Format(SHelper.Translation.Get("x/y-exp-to-next"), GetStatValue(Game1.player, "exp", 0), levels[playerLevel - 1]);
                b.DrawString(Game1.smallFont, expString, new Vector2((float)(__instance.xPositionOnScreen + 64 - 12 + 64) - Game1.smallFont.MeasureString(levelString).X / 2f, __instance.yPositionOnScreen + IClickableMenu.borderWidth + IClickableMenu.spaceToClearTopBorder + 4 + 280), Game1.textColor);
            }


            int totalLevels = GetTotalSkillLevels(Game1.player);
            int newLevels   = Math.Max(0, (int)(playerLevel * (1 + Config.IntSkillLevelsBonus)) - totalLevels - 1);

            for (int i = 0; i < 6; i++)
            {
                int sl = Game1.player.GetSkillLevel(i);
                int sp = Game1.player.professions.Count(p => p / 6 == i && p % 6 > 1);
                if (sl >= 10 && !Game1.player.newLevels.Contains(new Point(i, 10)))
                {
                    sp--;
                }
                if (sp > 0)                // prestige
                {
                    newLevels -= 10 * sp;
                }
            }

            if (newLevels <= 0 || !Config.ManualSkillUpgrades)
            {
                return;
            }

            // draw skill changes

            string pointString = string.Format(SHelper.Translation.Get("x-points"), newLevels);

            b.DrawString(Game1.smallFont, pointString, new Vector2((float)(__instance.xPositionOnScreen + 64 - 12 + 64) - Game1.smallFont.MeasureString(pointString).X / 2f, __instance.yPositionOnScreen + IClickableMenu.borderWidth + IClickableMenu.spaceToClearTopBorder - 28), Game1.textColor);

            x = ((LocalizedContentManager.CurrentLanguageCode == LocalizedContentManager.LanguageCode.ru || LocalizedContentManager.CurrentLanguageCode == LocalizedContentManager.LanguageCode.it) ? (__instance.xPositionOnScreen + __instance.width - 448 - 48) : (__instance.xPositionOnScreen + IClickableMenu.borderWidth + IClickableMenu.spaceToClearTopBorder + 256 - 8));
            y = __instance.yPositionOnScreen + IClickableMenu.spaceToClearTopBorder + IClickableMenu.borderWidth - 8;

            int addedXSource = 0;

            for (int i = 0; i < 10; i++)
            {
                for (int j = 0; j < 5; j++)
                {
                    Rectangle boundary = (i + 1) % 5 == 0 ? new Rectangle(new Point(addedXSource + x - 4 + i * 36, y + j * 56), new Point(14 * 4, 9 * 4)) : new Rectangle(new Point(addedXSource + x - 4 + i * 36, y + j * 56), new Point(8 * 4, 9 * 4));
                    if (!boundary.Contains(Game1.getMousePosition(true)))
                    {
                        continue;
                    }
                    int which = j;
                    if (which == 1)
                    {
                        which = 3;
                    }
                    else if (which == 3)
                    {
                        which = 1;
                    }
                    bool clickable = Game1.player.GetSkillLevel(which) == i;
                    if (!clickable)
                    {
                        return;
                    }
                    if (SHelper.Input.IsDown(StardewModdingAPI.SButton.MouseLeft))
                    {
                        int newLevel = 1;
                        foreach (int level in skillLevels)
                        {
                            if (Game1.player.experiencePoints[which] < level)
                            {
                                Game1.player.experiencePoints[which] = level;
                                Game1.player.newLevels.Add(new Point(which, newLevel));

                                switch (which)
                                {
                                case 0:
                                    Game1.player.FarmingLevel++;
                                    break;

                                case 1:
                                    Game1.player.FishingLevel++;
                                    break;

                                case 2:
                                    Game1.player.ForagingLevel++;
                                    break;

                                case 3:
                                    Game1.player.MiningLevel++;
                                    break;

                                case 4:
                                    Game1.player.CombatLevel++;
                                    break;
                                }
                                if ((i + 1) % 5 == 0)
                                {
                                    int drawX = (LocalizedContentManager.CurrentLanguageCode == LocalizedContentManager.LanguageCode.ru || LocalizedContentManager.CurrentLanguageCode == LocalizedContentManager.LanguageCode.it) ? (__instance.xPositionOnScreen + __instance.width - 448 - 48 + 4) : (__instance.xPositionOnScreen + IClickableMenu.borderWidth + IClickableMenu.spaceToClearTopBorder + 256 - 4);
                                    int drawY = __instance.yPositionOnScreen + IClickableMenu.spaceToClearTopBorder + IClickableMenu.borderWidth - 12;
                                    __instance.skillBars.Add(new ClickableTextureComponent("", new Rectangle(drawX - 4 + (i == 9 ? 348 : 144), drawY + j * 56, 56, 36), null, "", Game1.mouseCursors, new Rectangle(159, 338, 14, 9), 4f, true)
                                    {
                                        myID            = ((i + 1 == 5) ? (100 + j) : (200 + j)),
                                        leftNeighborID  = ((i + 1 == 5) ? j : (100 + j)),
                                        rightNeighborID = ((i + 1 == 5) ? (200 + j) : -1),
                                        downNeighborID  = -99998
                                    });
                                }
                                return;
                            }
                            newLevel++;
                        }
                    }
                    if ((i + 1) % 5 == 0)
                    {
                        b.Draw(Game1.mouseCursors, new Vector2(addedXSource + x + i * 36, y - 4 + j * 56), new Rectangle?(new Rectangle(145 + 14, 338, 14, 9)), Color.White, 0f, Vector2.Zero, 4f, SpriteEffects.None, 0.871f);
                    }
                    else if ((i + 1) % 5 != 0)
                    {
                        b.Draw(Game1.mouseCursors, new Vector2(addedXSource + x + i * 36, y - 4 + j * 56), new Rectangle?(new Rectangle(129 + 8, 338, 8, 9)), Color.White, 0f, Vector2.Zero, 4f, SpriteEffects.None, 0.871f);
                    }
                }
                if ((i + 1) % 5 == 0)
                {
                    addedXSource += 24;
                }
            }
        }
Beispiel #13
0
        private void initCookingSkill(SkillsPage skills)
        {
            int cookingLevel = getCookingLevel();

            // Bunch of stuff from the constructor
            int num2 = 0;
            int num3 = skills.xPositionOnScreen + IClickableMenu.borderWidth + IClickableMenu.spaceToClearTopBorder + 4 * Game1.tileSize - Game1.pixelZoom;
            int num4 = skills.yPositionOnScreen + IClickableMenu.spaceToClearTopBorder + IClickableMenu.borderWidth - Game1.pixelZoom * 3;

            for (int i = 4; i < 10; i += 5)
            {
                int j = 5;
                if (hasLuck)
                {
                    j++;
                }

                string text  = "";
                string text2 = "";
                bool   flag  = false;
                int    num5  = -1;

                flag = (cookingLevel > i);
                num5 = getProfessionForSkill(i + 1);  //Game1.player.getProfessionForSkill(5, i + 1);
                object[] args = new object[] { text, text2, CookingLevelUpMenu.getProfessionDescription(num5) };
                Util.CallInstanceMethod(typeof(SkillsPage), skills, "parseProfessionDescription", args);
                text  = (string)args[0];
                text2 = (string)args[1];

                if (flag && (i + 1) % 5 == 0)
                {
                    var skillBars = (List <ClickableTextureComponent>)Util.GetInstanceField(typeof(SkillsPage), skills, "skillBars");
                    skillBars.Add(new ClickableTextureComponent(string.Concat(num5), new Rectangle(num2 + num3 - Game1.pixelZoom + i * (Game1.tileSize / 2 + Game1.pixelZoom), num4 + j * (Game1.tileSize / 2 + Game1.pixelZoom * 6), 14 * Game1.pixelZoom, 9 * Game1.pixelZoom), null, text, Game1.mouseCursors, new Rectangle(159, 338, 14, 9), (float)Game1.pixelZoom, true));
                }
                num2 += Game1.pixelZoom * 6;
            }
            int k = 5;

            if (hasLuck)
            {
                k++;
            }
            int num6 = k;

            if (num6 == 1)
            {
                num6 = 3;
            }
            else if (num6 == 3)
            {
                num6 = 1;
            }
            string text3 = "";

            if (cookingLevel > 0)
            {
                text3 = string.Concat(new object[]
                {
                    "+",
                    (int)((getEdibilityMultiplier() - 1) * 100),
                    "% edibility in home-cooked food",
                    Environment.NewLine,
                });
            }
            var skillAreas = (List <ClickableTextureComponent>)Util.GetInstanceField(typeof(SkillsPage), skills, "skillAreas");

            skillAreas.Add(new ClickableTextureComponent(string.Concat(num6), new Rectangle(num3 - Game1.tileSize * 2 - Game1.tileSize * 3 / 4, num4 + k * (Game1.tileSize / 2 + Game1.pixelZoom * 6), Game1.tileSize * 2 + Game1.pixelZoom * 5, 9 * Game1.pixelZoom), string.Concat(num6), text3, null, Rectangle.Empty, 1f, false));
        }
Beispiel #14
0
        public void ThenSellerIsAbleToVerifyTheSkillsInTheProfileDetails()
        {
            var skilladded = new SkillsPage();

            skilladded.SkillsAdded();
        }
Beispiel #15
0
        public void WhenIAddSkills()
        {
            var addskills = new SkillsPage();

            addskills.AddSkills();
        }
Beispiel #16
0
        public void WhenIEditTheExistingSkills()
        {
            var editskills = new SkillsPage();

            editskills.EditSkills();
        }
Beispiel #17
0
        public void ThenIAmAbleToVerifyTheUpdatedSkills()
        {
            var skillsedited = new SkillsPage();

            skillsedited.SkillsEdited();
        }
Beispiel #18
0
        public void WhenITryToDeleteExistingSkills()
        {
            var deleteskills = new SkillsPage();

            deleteskills.DeleteSkills();
        }
Beispiel #19
0
        public void WhenIAmAbleToDeleteTheSkills()
        {
            var skillsdeleted = new SkillsPage();

            skillsdeleted.SkillsDeleted();
        }
Beispiel #20
0
        private void NavigateFromLandingPage(MainSection chosenSection)   // figuring out what section was pressed
        {                                                                 // and navigating it + resetting the selectedSection
            MainSection section    = chosenSection;
            var         navigation = Application.Current.MainPage as NavigationPage;

            switch (section.SectionName)
            {
            case "About Me":
                var aboutMeViewModel = new AboutMeViewModel();
                var aboutMePage      = new AboutMe {
                    BindingContext = aboutMeViewModel
                };
                SelectedSection = null;
                navigation.PushAsync(aboutMePage, true);
                break;

            case "Projects":
                var projectsViewModel = new ProjectsViewModel();
                var projectsPage      = new ProjectsPage {
                    BindingContext = projectsViewModel
                };
                SelectedSection = null;
                navigation.PushAsync(projectsPage, true);
                break;

            case "Skills":
                var skillsViewModel = new SkillsViewModel();
                var skillsPage      = new SkillsPage {
                    BindingContext = skillsViewModel
                };
                SelectedSection = null;
                navigation.PushAsync(skillsPage, true);
                break;

            case "Experience":
                var experienceViewModel = new ExperienceViewModel();
                var experiencePage      = new ExperiencePage {
                    BindingContext = experienceViewModel
                };
                SelectedSection = null;
                navigation.PushAsync(experiencePage, true);
                break;

            case "Goals":
                var goalsViewModel = new GoalsViewModel();
                var goalsPage      = new GoalsPage {
                    BindingContext = goalsViewModel
                };
                SelectedSection = null;
                navigation.PushAsync(goalsPage, true);
                break;

            case "Contact":
                var contactViewModel = new ContactViewModel();
                var contactPage      = new ContactPage {
                    BindingContext = contactViewModel
                };
                SelectedSection = null;
                navigation.PushAsync(contactPage, true);
                break;
            }

            //var viewModel = new GeneralInfoViewModel();
            //var sectionPage = new GeneralInfoPage { BindingContext = viewModel };
            //SelectedSection = null;

            //var navigation = Application.Current.MainPage as NavigationPage;
            //navigation.PushAsync(sectionPage, true);
        }