private void InitiatePrestigeButton() { Logger.LogVerbose("Prestige menu - Initiating prestige button..."); const int yOffset = 3; var buttonWidth = 100 * Game1.pixelZoom; var buttonHeight = 20 * Game1.pixelZoom; var rightEdgeOfDialog = xPositionOnScreen + width; var bounds = new Rectangle(rightEdgeOfDialog - spaceToClearSideBorder - buttonWidth, yPositionOnScreen + yOffset + (int)Math.Floor(Game1.tileSize * 3.15), buttonWidth, buttonHeight); _prestigeButton = new PrestigeButton(_skill.GetSkillLevel() < 10) { Bounds = bounds, Skill = _skill }; Logger.LogVerbose("Prestige menu - Prestige button initiated."); }
private void InitiatePrestigeButton() { Logger.LogVerbose("Prestige menu - Initiating prestige button..."); const int yOffset = 3; var buttonWidth = 100 * Game1.pixelZoom; var buttonHeight = 20 * Game1.pixelZoom; var rightEdgeOfDialog = xPositionOnScreen + width; var bounds = new Rectangle(rightEdgeOfDialog - spaceToClearSideBorder - buttonWidth, yPositionOnScreen + yOffset + (Game1.tileSize * 3.15).Floor(), buttonWidth, buttonHeight); var prestigeButtonDisabled = true; if (PerSaveOptions.Instance.PainlessPrestigeMode) { if (Game1.player.experiencePoints[_skill.Type.Ordinal] >= 15000 + PerSaveOptions.Instance.ExperienceNeededPerPainlessPrestige) { prestigeButtonDisabled = false; } } else { if (_skill.GetSkillLevel() == 10) { var newLevelForSkillExists = Game1.player.newLevels.Any(point => point.X == _skill.Type.Ordinal && point.Y > 0); if (!newLevelForSkillExists) { prestigeButtonDisabled = false; } } } _prestigeButton = new PrestigeButton(prestigeButtonDisabled, _skill) { Bounds = bounds, }; Logger.LogVerbose("Prestige menu - Prestige button initiated."); }