Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: add an option to show gcd cooldown. Does it necessary?
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Apr 2, 2023
1 parent 5edd2e1 commit 635b63a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion RotationSolver.Basic/Configuration/PluginConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ public class PluginConfiguration : IPluginConfiguration
public bool UseKeyboardCommand = false;
public bool UseGamepadCommand = false;
public bool ShowItemsCooldown = false;
public bool ShowGCDCooldown = false;
public bool UseOriginalCooldown = true;
public int CooldownActionOneLine = 15;

public Vector4 ControlWindowLockBg = new Vector4(0, 0, 0, 0.6f);
Expand All @@ -180,7 +182,6 @@ public class PluginConfiguration : IPluginConfiguration
public float ControlWindowNextSizeRatio = 1.5f;
public float ControlProgressHeight = 8;
public bool ShowCooldownWindow = false;
public bool UseOriginalCooldown = true;

public Dictionary<StateCommandType, KeyRecord> KeyState { get; set; } = new Dictionary<StateCommandType, KeyRecord>();
public Dictionary<SpecialCommandType, KeyRecord> KeySpecial { get; set; } = new Dictionary<SpecialCommandType, KeyRecord>();
Expand Down
1 change: 1 addition & 0 deletions RotationSolver/Localization/Localization.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@
"ConfigWindow_Control_IsInfoWindowNoInputs": "No Inputs",
"ConfigWindow_Control_IsInfoWindowNoMove": "No Move",
"ConfigWindow_Control_ShowItemsCooldown": "Show Items' Cooldown",
"ConfigWindow_Control_ShowGCDCooldown": "Show GCD' Cooldown",
"ConfigWindow_Control_UseOriginalCooldown": "Show Original Cooldown",
"ConfigWindow_Control_CooldownActionOneLine": "The count of cooldown actions in one line.",
"ConfigWindow_Control_BackgroundColor": "Control Window's Background",
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/Localization/Strings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ internal partial class Strings
public string ConfigWindow_Control_IsInfoWindowNoMove { get; set; } = "No Move";

public string ConfigWindow_Control_ShowItemsCooldown { get; set; } = "Show Items' Cooldown";
public string ConfigWindow_Control_ShowGCDCooldown { get; set; } = "Show GCD' Cooldown";
public string ConfigWindow_Control_UseOriginalCooldown { get; set; } = "Show Original Cooldown";

public string ConfigWindow_Control_CooldownActionOneLine { get; set; } = "The count of cooldown actions in one line.";
public string ConfigWindow_Control_BackgroundColor { get; set; } = "Control Window's Background";
public string ConfigWindow_Control_InfoWindowBg { get; set; } = "Info Window's Background";
Expand Down
3 changes: 2 additions & 1 deletion RotationSolver/UI/CooldownWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ public override void Draw()
{
foreach (var pair in RotationUpdater.AllGroupedActions)
{
var showItems = pair.Where(i => !(i is IBaseAction a && a.IsGeneralGCD)).OrderBy(a => a.ID);
IEnumerable<IAction> showItems = pair.OrderBy(a => a.ID);
if (!Service.Config.ShowGCDCooldown) showItems = showItems.Where(i => !(i is IBaseAction a && a.IsGeneralGCD));

if (!showItems.Any()) continue;
if (!Service.Config.ShowItemsCooldown && showItems.Any(i => i is IBaseItem)) continue;
Expand Down
3 changes: 3 additions & 0 deletions RotationSolver/UI/RotationConfigWindow_Control.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ private void DrawControlTab()
DrawCheckBox(LocalizationManager.RightLang.ConfigWindow_Control_ShowItemsCooldown,
ref Service.Config.ShowItemsCooldown);

DrawCheckBox(LocalizationManager.RightLang.ConfigWindow_Control_ShowGCDCooldown,
ref Service.Config.ShowGCDCooldown);

DrawCheckBox(LocalizationManager.RightLang.ConfigWindow_Control_UseOriginalCooldown,
ref Service.Config.UseOriginalCooldown);

Expand Down

0 comments on commit 635b63a

Please sign in to comment.