/// <summary>Get a translation equivalent to "Freeze Time Inside".</summary> public static string Time_FreezeInside() { return(I18n.GetByKey("time.freeze-inside")); }
/// <summary>Get a translation equivalent to "Press New Key...".</summary> public static string Controls_PressNewKey() { return(I18n.GetByKey("controls.press-new-key")); }
/********* ** Private methods *********/ /// <summary>Initialize or reinitialize the UI components.</summary> private void ResetComponents() { // set dimensions this.width = (this.IsAndroid ? 750 : 800) + IClickableMenu.borderWidth * 2; this.height = (this.IsAndroid ? 550 : 600) + IClickableMenu.borderWidth * 2; this.xPositionOnScreen = Game1.uiViewport.Width / 2 - (this.width - (int)(Game1.tileSize * 2.4f)) / 2; this.yPositionOnScreen = Game1.uiViewport.Height / 2 - this.height / 2; // show close button on Android if (this.IsAndroid) { this.initializeUpperRightCloseButton(); } // add title this.Title = new ClickableComponent(new Rectangle(this.xPositionOnScreen + this.width / 2, this.yPositionOnScreen, Game1.tileSize * 4, Game1.tileSize), I18n.ModName()); // add tabs { int i = 0; int labelX = (int)(this.xPositionOnScreen - Game1.tileSize * 4.8f); int labelY = (int)(this.yPositionOnScreen + Game1.tileSize * (this.IsAndroid ? 1.25f : 1.5f)); int labelHeight = (int)(Game1.tileSize * 0.9F); this.Tabs.Clear(); this.Tabs.AddRange(new[] { new ClickableComponent(new Rectangle(labelX, labelY + labelHeight * i++, Game1.tileSize * 5, Game1.tileSize), MenuTab.PlayerAndTools.ToString(), I18n.Tabs_PlayerAndTools()), new ClickableComponent(new Rectangle(labelX, labelY + labelHeight * i++, Game1.tileSize * 5, Game1.tileSize), MenuTab.FarmAndFishing.ToString(), I18n.Tabs_FarmAndFishing()), new ClickableComponent(new Rectangle(labelX, labelY + labelHeight * i++, Game1.tileSize * 5, Game1.tileSize), MenuTab.Skills.ToString(), I18n.Tabs_Skills()), new ClickableComponent(new Rectangle(labelX, labelY + labelHeight * i++, Game1.tileSize * 5, Game1.tileSize), MenuTab.Weather.ToString(), I18n.Tabs_Weather()), new ClickableComponent(new Rectangle(labelX, labelY + labelHeight * i++, Game1.tileSize * 5, Game1.tileSize), MenuTab.Relationships.ToString(), I18n.Tabs_Relationships()), new ClickableComponent(new Rectangle(labelX, labelY + labelHeight * i++, Game1.tileSize * 5, Game1.tileSize), MenuTab.WarpLocations.ToString(), I18n.Tabs_Warp()), new ClickableComponent(new Rectangle(labelX, labelY + labelHeight * i++, Game1.tileSize * 5, Game1.tileSize), MenuTab.Time.ToString(), I18n.Tabs_Time()), new ClickableComponent(new Rectangle(labelX, labelY + labelHeight * i++, Game1.tileSize * 5, Game1.tileSize), MenuTab.Advanced.ToString(), I18n.Tabs_Advanced()), new ClickableComponent(new Rectangle(labelX, labelY + labelHeight * i++, Game1.tileSize * 5, Game1.tileSize), MenuTab.Controls.ToString(), I18n.Tabs_Controls()) }); } // add scroll UI int scrollbarOffset = Game1.tileSize * (this.IsAndroid ? 1 : 4) / 16; this.UpArrow = new ClickableTextureComponent("up-arrow", new Rectangle(this.xPositionOnScreen + this.width + scrollbarOffset, this.yPositionOnScreen + Game1.tileSize, 11 * Game1.pixelZoom, 12 * Game1.pixelZoom), "", "", Game1.mouseCursors, new Rectangle(421, 459, 11, 12), Game1.pixelZoom); this.DownArrow = new ClickableTextureComponent("down-arrow", new Rectangle(this.xPositionOnScreen + this.width + scrollbarOffset, this.yPositionOnScreen + this.height - Game1.tileSize, 11 * Game1.pixelZoom, 12 * Game1.pixelZoom), "", "", Game1.mouseCursors, new Rectangle(421, 472, 11, 12), Game1.pixelZoom); this.Scrollbar = new ClickableTextureComponent("scrollbar", new Rectangle(this.UpArrow.bounds.X + Game1.pixelZoom * 3, this.UpArrow.bounds.Y + this.UpArrow.bounds.Height + Game1.pixelZoom, 6 * Game1.pixelZoom, 10 * Game1.pixelZoom), "", "", Game1.mouseCursors, new Rectangle(435, 463, 6, 10), Game1.pixelZoom); this.ScrollbarRunner = new Rectangle(this.Scrollbar.bounds.X, this.UpArrow.bounds.Y + this.UpArrow.bounds.Height + Game1.pixelZoom, this.Scrollbar.bounds.Width, this.height - Game1.tileSize * 2 - this.UpArrow.bounds.Height - Game1.pixelZoom * 2); this.SetScrollBarToCurrentIndex(); // add option slots this.OptionSlots.Clear(); for (int i = 0; i < CheatsMenu.ItemsPerPage; i++) { this.OptionSlots.Add(new ClickableComponent(new Rectangle(this.xPositionOnScreen + Game1.tileSize / 4, this.yPositionOnScreen + Game1.tileSize * 5 / 4 + Game1.pixelZoom + i * ((this.height - Game1.tileSize * 2) / CheatsMenu.ItemsPerPage), this.width - Game1.tileSize / 2, (this.height - Game1.tileSize * 2) / CheatsMenu.ItemsPerPage + Game1.pixelZoom), string.Concat(i))); } }
/// <summary>Get a translation equivalent to "Grow Tree".</summary> public static string Controls_GrowTree() { return(I18n.GetByKey("controls.grow-tree")); }
/// <summary>Get a translation equivalent to "Grow distance around player".</summary> public static string Controls_GrowRadius() { return(I18n.GetByKey("controls.grow-radius")); }
/// <summary>Get a translation equivalent to "Controls".</summary> public static string Controls_Title() { return(I18n.GetByKey("controls.title")); }
/// <summary>Get a translation equivalent to "Open Menu".</summary> public static string Controls_OpenMenu() { return(I18n.GetByKey("controls.open-menu")); }
/// <summary>Get a translation equivalent to "Complete Quests".</summary> public static string Flags_Quests() { return(I18n.GetByKey("flags.quests")); }
/// <summary>Get a translation equivalent to "Controls".</summary> public static string Tabs_Controls() { return(I18n.GetByKey("tabs.controls")); }
/// <summary>Get a translation equivalent to "Time Frozen".</summary> public static string Time_TimeFrozenMessage() { return(I18n.GetByKey("time.time-frozen-message")); }
/// <summary>Get a translation equivalent to "Use this section at your own risk!\nThis may cause issues like skipped mail, events, or quests.".</summary> public static string Flags_Warning() { return(I18n.GetByKey("flags.warning")); }
/// <summary>Get a translation equivalent to "Time".</summary> public static string Time_Time() { return(I18n.GetByKey("time.time")); }
/// <summary>Get a translation equivalent to "Freeze Time Everywhere".</summary> public static string Time_FreezeEverywhere() { return(I18n.GetByKey("time.freeze-everywhere")); }
/// <summary>Get a translation equivalent to "Freeze Time In Caves".</summary> public static string Time_FreezeCaves() { return(I18n.GetByKey("time.freeze-caves")); }
/// <summary>Get a translation equivalent to "JojaMart Membership".</summary> public static string Flags_Jojamart_Membership() { return(I18n.GetByKey("flags.jojamart.membership")); }
/// <summary>Get a translation equivalent to "Wallet Items".</summary> public static string Flags_Wallet() { return(I18n.GetByKey("flags.wallet")); }
/// <summary>Get a translation equivalent to "Player".</summary> public static string Player_Title() { return(I18n.GetByKey("player.title")); }
/// <summary>Get a translation equivalent to "Adventurer's Guild".</summary> public static string Flags_Unlocked_Guild() { return(I18n.GetByKey("flags.unlocked.guild")); }
/// <summary>Get a translation equivalent to "You can change the on-screen buttons in the config files for the CJB Cheats Menu and Virtual Keyboard mods.".</summary> public static string Controls_AndroidConfigNote() { return(I18n.GetByKey("controls.android-config-note")); }
/// <summary>Get a translation equivalent to "Room: {{name}}".</summary> /// <param name="name">The value to inject for the <c>{{name}}</c> token.</param> public static string Flags_Unlocked_Room(object name) { return(I18n.GetByKey("flags.unlocked.room", new { name })); }
/// <summary>Get a translation equivalent to "Freeze Time".</summary> public static string Controls_FreezeTime() { return(I18n.GetByKey("controls.freeze-time")); }
/// <summary>Get a translation equivalent to "Unlocked content".</summary> public static string Flags_UnlockedContent() { return(I18n.GetByKey("flags.unlocked-content")); }
/// <summary>Get a translation equivalent to "Grow Crops".</summary> public static string Controls_GrowCrops() { return(I18n.GetByKey("controls.grow-crops")); }
/// <summary>Get a translation equivalent to "Dyes & tailoring".</summary> public static string Flags_UnlockedContent_DyesAndTailoring() { return(I18n.GetByKey("flags.unlocked-content.dyes-and-tailoring")); }
/// <summary>Get a translation equivalent to "Reset".</summary> public static string Controls_ResetControls() { return(I18n.GetByKey("controls.reset-controls")); }
/// <summary>Get a translation equivalent to "Community Center".</summary> public static string Flags_CommunityCenter() { return(I18n.GetByKey("flags.community-center")); }
/// <summary>Get a translation equivalent to "Infinite Stamina".</summary> public static string Player_InfiniteStamina() { return(I18n.GetByKey("player.infinite-stamina")); }
/// <summary>Get a translation equivalent to "Door Unlocked".</summary> public static string Flags_CommunityCenter_DoorUnlocked() { return(I18n.GetByKey("flags.community-center.door-unlocked")); }
/// <summary>Set the options to display.</summary> private void SetOptions() { CheatManager cheats = this.Cheats; CheatContext context = cheats.Context; ModConfig config = context.Config; cheats.Context.SlotWidth = this.OptionSlots[0].bounds.Width; this.Options.Clear(); switch (this.CurrentTab) { case MenuTab.PlayerAndTools: // player this.AddOptions( $"{I18n.Player_Title()}:", cheats.InfiniteHealth, cheats.InfiniteStamina, cheats.InstantCooldowns, cheats.OneHitKill, cheats.MaxDailyLuck, cheats.MoveSpeed, cheats.InventorySize ); // tools this.AddOptions( $"{I18n.Tools_Title()}:", cheats.InfiniteWater, cheats.OneHitBreak, cheats.HarvestWithScythe ); // money this.AddOptions( $"{I18n.Add_Money()}:", cheats.AddMoney ); // casino coins this.AddOptions( $"{I18n.Add_CasinoCoins()}:", cheats.AddCasinoCoins ); // golden walnuts this.AddOptions( $"{I18n.Add_GoldenWalnuts()}:", cheats.AddGoldenWalnuts ); // Qi gems this.AddOptions( $"{I18n.Add_QiGems()}:", cheats.AddQiGems ); break; case MenuTab.FarmAndFishing: // farming this.AddOptions( $"{I18n.Farm_Title()}:", cheats.AutoWater, cheats.DurableFences, cheats.InstantBuild, cheats.AlwaysAutoFeed, cheats.InfiniteHay, cheats.NoAnimalFriendshipDecay ); // fishing this.AddOptions( $"{I18n.Fishing_Title()}:", cheats.InstantFishCatch, cheats.InstantFishBite, cheats.AlwaysCastMaxDistance, cheats.AlwaysFishTreasure, cheats.DurableFishTackles ); // fast machines this.AddOptions( $"{I18n.FastMachines_Title()}:", cheats.FastMachines ); break; case MenuTab.Skills: // skills this.AddOptions( $"{I18n.Skills_Title()}:", cheats.Skills ); // professions this.AddOptions( $"{I18n.Professions_Title()}:", cheats.Professions ); break; case MenuTab.Weather: this.AddOptions( $"{I18n.Weather_Title()}:", cheats.SetWeatherForTomorrow ); break; case MenuTab.Relationships: // relationship options this.AddOptions( $"{I18n.Relationships_Title()}:", cheats.AlwaysGiveGifts, cheats.NoFriendshipDecay ); // heart levels this.AddOptions( $"{I18n.Relationships_Friends()}:", cheats.Hearts ); break; case MenuTab.WarpLocations: this.AddOptions( cheats.Warps // grouped into sections, no need for a tab title ); break; case MenuTab.Time: this.AddOptions( $"{I18n.Time_Title()}:", cheats.FreezeTime, cheats.SetTime ); break; case MenuTab.Advanced: { this.AddDescription(I18n.Flags_Warning()); // quests this.AddOptions( $"{I18n.Flags_Quests()}:", cheats.Quests ); // wallet items this.AddOptions( $"{I18n.Flags_Wallet()}:", cheats.WalletItems ); // locked doors this.AddOptions( $"{I18n.Flags_Unlocked()}:", cheats.UnlockDoor ); // locked content this.AddOptions( $"{I18n.Flags_UnlockedContent()}:", cheats.UnlockContent ); // community center this.AddOptions( $"{I18n.Flags_CommunityCenter()}:", cheats.Bundles ); } break; case MenuTab.Controls: this.AddTitle($"{I18n.Controls_Title()}:"); if (this.IsAndroid) { this.AddDescription(I18n.Controls_AndroidConfigNote()); } this.AddOptions( new CheatsOptionsKeyListener( label: I18n.Controls_OpenMenu(), value: this.GetSingleButton(config.OpenMenuKey), setValue: key => config.OpenMenuKey = new(key), slotWidth: context.SlotWidth, clearToButton: this.GetSingleButton(ModConfig.Defaults.OpenMenuKey) ), new CheatsOptionsKeyListener( label: I18n.Controls_FreezeTime(), value: this.GetSingleButton(config.FreezeTimeKey), setValue: key => config.FreezeTimeKey = new(key), slotWidth: context.SlotWidth ), new CheatsOptionsKeyListener( label: I18n.Controls_GrowTree(), value: this.GetSingleButton(config.GrowTreeKey), setValue: key => config.GrowTreeKey = new(key), slotWidth: context.SlotWidth ), new CheatsOptionsKeyListener( label: I18n.Controls_GrowCrops(), value: this.GetSingleButton(config.GrowCropsKey), setValue: key => config.GrowCropsKey = new(key), slotWidth: context.SlotWidth ), new CheatsOptionsSlider( label: I18n.Controls_GrowRadius(), value: config.GrowRadius, minValue: 1, maxValue: 10, setValue: value => config.GrowRadius = value, disabled: () => !config.GrowTreeKey.IsBound && !config.GrowCropsKey.IsBound ), new OptionsElement(string.Empty), // blank line new CheatsOptionsButton( label: I18n.Controls_ResetControls(), toggle: this.ResetControls, slotWidth: context.SlotWidth ) ); break; } this.SetScrollBarToCurrentIndex(); }
/// <summary>Get a translation equivalent to "Skull Cavern".</summary> public static string Warp_SkullCavern() { return(I18n.GetByKey("warp.skull-cavern")); }