diff --git a/CalamityConfig.cs b/CalamityConfig.cs index 39e51e8720..768fc5c546 100644 --- a/CalamityConfig.cs +++ b/CalamityConfig.cs @@ -108,12 +108,8 @@ namespace CalamityMod public bool DebuffDisplay { get; set; } [BackgroundColor(192, 54, 64, 192)] - [SliderColor(224, 165, 56, 128)] - [Range(0f, 2f)] - [DefaultValue(2f)] - [Increment(1f)] - [DrawTicks] - public float CooldownDisplay { get; set; } + [DefaultValue(CooldownDisplayOptions.Full)] + public CooldownDisplayOptions CooldownDisplay { get; set; } [BackgroundColor(192, 54, 64, 192)] [DefaultValue(true)] @@ -264,8 +260,6 @@ namespace CalamityMod public bool FasterFallHotkey { get; set; } [BackgroundColor(192, 54, 64, 192)] - [SliderColor(224, 165, 56, 128)] - [DrawTicks] [DefaultValue(SetBonusDoubleTapOptions.Auto)] public SetBonusDoubleTapOptions SetBonusDoubleTap { get; set; } diff --git a/Enums/CooldownDisplayOptions.cs b/Enums/CooldownDisplayOptions.cs new file mode 100644 index 0000000000..e5b3d1debb --- /dev/null +++ b/Enums/CooldownDisplayOptions.cs @@ -0,0 +1,11 @@ +using Terraria.ModLoader.Config; + +namespace CalamityMod.Enums +{ + public enum CooldownDisplayOptions + { + Full, + Compact, + Hidden + } +} diff --git a/Enums/SetBonusDoubleTapOptions.cs b/Enums/SetBonusDoubleTapOptions.cs index f71b0e4349..93d7c17f51 100644 --- a/Enums/SetBonusDoubleTapOptions.cs +++ b/Enums/SetBonusDoubleTapOptions.cs @@ -4,11 +4,8 @@ namespace CalamityMod.Enums { public enum SetBonusDoubleTapOptions { - [LabelKey("$Mods.CalamityMod.Configs.CalamityClientConfig.SetBonusDoubleTap.Options.On")] On, - [LabelKey("$Mods.CalamityMod.Configs.CalamityClientConfig.SetBonusDoubleTap.Options.Auto")] Auto, - [LabelKey("$Mods.CalamityMod.Configs.CalamityClientConfig.SetBonusDoubleTap.Options.Off")] Off } } diff --git a/Localization/en-US/Mods.CalamityMod.Configs.hjson b/Localization/en-US/Mods.CalamityMod.Configs.hjson index 40d5986221..8631cbcc86 100644 --- a/Localization/en-US/Mods.CalamityMod.Configs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Configs.hjson @@ -79,11 +79,7 @@ CalamityClientConfig: { CooldownDisplay: { Label: "[i:CalamityMod/NebulousCore] Cooldown Rack Display Mode" - Tooltip: - ''' - Adds the Cooldown Rack which displays all important cooldowns right underneath buffs and debuffs. - Set this to 1 to display the Cooldown Rack in compact mode, and to 0 to hide it entirely. - ''' + Tooltip: Adds the Cooldown Rack which displays all important cooldowns right underneath buffs and debuffs. } DebuffDisplay: { @@ -252,17 +248,7 @@ CalamityClientConfig: { SetBonusDoubleTap: { Label: "[i:VortexHelmet] Allow Double Tap for Armor Set Bonuses" - Tooltip: - ''' - Allows all armor set bonuses to be triggered by the vanilla double-tap {$Key.DOWN} hotkey (or {$Key.UP} depending on your settings). - Set to Auto to automatically turn off double-tap as long as Calamity's {$Keybinds.ArmorSetBonus.DisplayName} hotkey is bound. - ''' - - Options: { - On: Always On - Auto: Auto - Off: Always Off - } + Tooltip: Allows all armor set bonuses to be triggered by the vanilla double-tap {$Key.DOWN} hotkey (or {$Key.UP} depending on your settings). } ShopNewAlert: { @@ -572,3 +558,41 @@ CalamityServerConfig: { ''' } } + +CooldownDisplayOptions: { + Tooltip: "" + + Full: { + Label: Full + Tooltip: Displays a circular bar around an icon which indicates cooldown duration + } + + Compact: { + Label: Compact + Tooltip: Displays a gradient over an icon which indicates cooldown duration + } + + Hidden: { + Label: Hidden + Tooltip: "" + } +} + +SetBonusDoubleTapOptions: { + Tooltip: "" + + On: { + Label: Always On + Tooltip: Always enables double-tap. Can be used in conjunction with Calamity's {$Keybinds.ArmorSetBonus.DisplayName} hotkey. + } + + Auto: { + Label: Auto + Tooltip: Automatically turns off double-tap as long as Calamity's {$Keybinds.ArmorSetBonus.DisplayName} hotkey is bound. + } + + Off: { + Label: Always Off + Tooltip: Always disables double-tap. Can be used to completely disable set bonus activation. + } +} diff --git a/UI/CooldownRackUI.cs b/UI/CooldownRackUI.cs index 8c0469ba29..99b82c736b 100644 --- a/UI/CooldownRackUI.cs +++ b/UI/CooldownRackUI.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using CalamityMod.Cooldowns; +using CalamityMod.Enums; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -19,7 +20,7 @@ namespace CalamityMod.UI get { // Option 1: Always use compact icons if configured to do so. - if (CalamityClientConfig.Instance.CooldownDisplay == 1) + if (CalamityClientConfig.Instance.CooldownDisplay == CooldownDisplayOptions.Compact) return true; // Option 2: If there are too many cooldowns, auto switch to compact mode. @@ -43,7 +44,7 @@ namespace CalamityMod.UI // 1 - The game isn't even on the game screen yet. // 2 - The player's inventory is open. // 3 - Cooldown display is completely disabled. - if (Main.gameMenu || Main.playerInventory || CalamityClientConfig.Instance.CooldownDisplay < 1) + if (Main.gameMenu || Main.playerInventory || CalamityClientConfig.Instance.CooldownDisplay == CooldownDisplayOptions.Hidden) return; IList cooldownsToDraw = Main.LocalPlayer.GetDisplayedCooldowns();