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

Commit

Permalink
fix: changed the help display.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Feb 22, 2023
1 parent fdff209 commit 27032f7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 23 deletions.
22 changes: 14 additions & 8 deletions RotationSolver/Commands/RSCommands_Display.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace RotationSolver.Commands;

internal static partial class RSCommands
{
const float INDENT_WIDTH = 180;
internal static void DisplayCommandHelp<T>(this T command, string extraCommand = "", Func<T, string> getHelp = null, bool sameLine = true) where T : struct, Enum
{
var cmdStr = _command + " " + command.ToString();
Expand All @@ -29,17 +30,22 @@ internal static void DisplayCommandHelp<T>(this T command, string extraCommand =
}
}

if (getHelp != null)
{
var help = getHelp(command);
var help = getHelp?.Invoke(command);

if (!string.IsNullOrEmpty(help))
if (!string.IsNullOrEmpty(help))
{
if (sameLine)
{
if (sameLine) ImGui.SameLine();
else ImGuiHelper.Spacing();
ImGui.Text(" → ");
ImGui.SameLine();
ImGui.TextWrapped(help);
ImGui.Indent(INDENT_WIDTH);
}
else ImGuiHelper.Spacing();
ImGui.Text(" → ");
ImGui.SameLine();
ImGui.TextWrapped(help);
if (sameLine)
{
ImGui.Unindent(INDENT_WIDTH);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/Localization/Localization.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"Configwindow_Param_Advanced": "Advanced",
"Configwindow_Param_PoslockCasting": "Lock the movement when casting.",
"Configwindow_Param_UseStopCasting": "Use stopping casting when target is dead.",
"Configwindow_Param_ShowMeleeActionFlag": "Show action flag when melee.",
"Configwindow_Param_ShowActionFlag": "Show action flag.",
"Configwindow_Param_ShowHealthRatio": "Show the health ratio for the check of Boss, Dying, Dot.",
"Configwindow_Param_HealthRatioBoss": "If target's max health ratio is higher than this, regard it as Boss.",
"Configwindow_Param_HealthRatioDying": "If target's current health ratio is lower than this, regard it is dying.",
Expand Down
1 change: 1 addition & 0 deletions RotationSolver/Rotations/Tank/DRK/DRK_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

namespace RotationSolver.Rotations.Tank.DRK;

[RotationDesc(ActionID.BloodWeapon, ActionID.Delirium)]
internal sealed class DRK_Default : DRK_Base
{
public override string GameVersion => "6.31";
Expand Down
14 changes: 0 additions & 14 deletions RotationSolver/Windows/RotationConfigWindow_Help.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,46 +45,32 @@ private void DrawHelpTab()
ImGui.PushStyleVar(ImGuiStyleVar.ItemSpacing, new Vector2(0f, 5f));

StateCommandType.Smart.DisplayCommandHelp(getHelp: EnumTranslations.ToHelp);
//ImGui.Separator();

StateCommandType.Manual.DisplayCommandHelp(getHelp: EnumTranslations.ToHelp);
//ImGui.Separator();

StateCommandType.Cancel.DisplayCommandHelp(getHelp: EnumTranslations.ToHelp);

ImGui.Separator();
//ImGui.NewLine();
//ImGui.Separator();

SpecialCommandType.EndSpecial.DisplayCommandHelp(getHelp: EnumTranslations.ToHelp);
//ImGui.Separator();

SpecialCommandType.HealArea.DisplayCommandHelp(getHelp: EnumTranslations.ToHelp);
//ImGui.Separator();

SpecialCommandType.HealSingle.DisplayCommandHelp(getHelp: EnumTranslations.ToHelp);
//ImGui.Separator();

SpecialCommandType.DefenseArea.DisplayCommandHelp(getHelp: EnumTranslations.ToHelp);
//ImGui.Separator();

SpecialCommandType.DefenseSingle.DisplayCommandHelp(getHelp: EnumTranslations.ToHelp);
//ImGui.Separator();

SpecialCommandType.MoveForward.DisplayCommandHelp(getHelp: EnumTranslations.ToHelp);
//ImGui.Separator();

SpecialCommandType.MoveBack.DisplayCommandHelp(getHelp: EnumTranslations.ToHelp);
//ImGui.Separator();

SpecialCommandType.EsunaStanceNorth.DisplayCommandHelp(getHelp: EnumTranslations.ToHelp);
//ImGui.Separator();

SpecialCommandType.RaiseShirk.DisplayCommandHelp(getHelp: EnumTranslations.ToHelp);
//ImGui.Separator();

SpecialCommandType.AntiKnockback.DisplayCommandHelp(getHelp: EnumTranslations.ToHelp);
//ImGui.Separator();

SpecialCommandType.Burst.DisplayCommandHelp(getHelp: EnumTranslations.ToHelp);

Expand Down

0 comments on commit 27032f7

Please sign in to comment.