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 param tab layout.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Jan 22, 2023
1 parent 1c7bb2b commit 4e7fefc
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 70 deletions.
12 changes: 6 additions & 6 deletions RotationSolver/Localization/Localization.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@
"Configwindow_Param_NeverReplaceIconDesc": "Icon replacement: Repose is automatically displayed as the next skill to be used",
"Configwindow_Param_UseOverlayWindow": "Display top overlay",
"Configwindow_Param_UseOverlayWindowDesc": "This window is currently used to cue the body position in advance.",
"Configwindow_Param_BasicSettings": "Basic settings",
"Configwindow_Param_Basic": "Basic",
"Configwindow_Param_WeaponDelay": "Set the random interval between GCD (seconds)",
"Configwindow_Param_WeaponFaster": "Set the time advance of use actions",
"Configwindow_Param_WeaponInterval": "Set the interval between abilities using",
"Configwindow_Param_InterruptibleTime": "Set the delay of interrupting",
"Configwindow_Param_SpecialDuration": "Set the duration of special windows set by commands",
"Configwindow_Param_AddDotGCDCount": "Set GCD advance of DOT refresh",
"Configwindow_Param_AutoOffBetweenArea": "Turn off when player is between area.",
"Configwindow_Param_DisplayEnhancement": "Display enhancement",
"Configwindow_Param_Display": "Display",
"Configwindow_Param_PoslockCasting": "Lock the movement when casting",
"Configwindow_Param_PoslockModifier": "Set the modifier key to unlock the movement temporary",
"Configwindow_Param_PoslockDescription": "LT is for gamepad player",
Expand All @@ -80,7 +80,7 @@
"Configwindow_Param_SayOutStateChanged": "Saying the state changes out",
"Configwindow_Param_ShowInfoOnDtr": "Display plugin state on dtrbar",
"Configwindow_Param_ShowInfoOnToast": "Display plugin state changed on toast",
"Configwindow_Param_Action": "Use of actions",
"Configwindow_Param_Action": "Action",
"Configwindow_Param_UseAOEWhenManual": "Use AOE actions in manual mode",
"Configwindow_Param_AutoBreak": "Automatic breaking",
"Configwindow_Param_UseAbility": "Auto-use abilities",
Expand All @@ -99,7 +99,7 @@
"Configwindow_Param_LessMPNoRaise": "Nerver raise player if MP is less than the set value",
"Configwindow_Param_UseItem": "Use items",
"Configwindow_Param_UseItemDesc": "Use poison, WIP",
"Configwindow_Param_Conditon": "Trigger conditions",
"Configwindow_Param_Conditon": "Condition",
"Configwindow_Param_StartOnCountdown": "Turn on auto-rotation on countdown",
"Configwindow_Param_HealthDifference": "Set the HP standard deviation threshold for using AOE heal (ability & spell)",
"Configwindow_Param_HealthAreaAbility": "Set the HP threshold for using AOE healing ability",
Expand All @@ -109,7 +109,7 @@
"Configwindow_Param_HealthSingleSpell": "Set the HP threshold for using single healing spell",
"Configwindow_Param_HealingOfTimeSubtractSingle": "Set the HP threshold reduce with hot effect(single)",
"Configwindow_Param_HealthForDyingTank": "Set the HP threshold for tank to use invincibility",
"Configwindow_Param_Target": "Target selection",
"Configwindow_Param_Target": "Target",
"Configwindow_Param_RightNowTargetToHostileType": "Hostile target filtering condition",
"Configwindow_Param_TargetToHostileType1": "All targets can attack",
"Configwindow_Param_TargetToHostileType2": "Targets have a target or all targets can attack",
Expand All @@ -128,7 +128,7 @@
"Configwindow_Param_MoveTowardsScreenDesc": "Using movement actions towards the object in the center of the screen, otherwise toward the facing object.",
"Configwindow_Param_RaiseAll": "Raise all (include passerby)",
"Configwindow_Param_RaiseBrinkofDeath": "Raise player even has Brink of Death",
"Configwindow_Param_Hostile": "Hostile target filtering options",
"Configwindow_Param_Hostile": "Hostile",
"Configwindow_Param_HostileDesc": "You can set the logic of hostile target selection to allow flexibility in switching the logic of selecting hostile in battle.",
"Configwindow_Param_AddHostileCondition": "Add selection condition",
"Configwindow_Param_HostileCondition": "Hostile target selection condition",
Expand Down
12 changes: 6 additions & 6 deletions RotationSolver/Localization/Strings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@ internal class Strings
public string Configwindow_Param_NeverReplaceIconDesc { get; set; } = "Icon replacement: Repose is automatically displayed as the next skill to be used";
public string Configwindow_Param_UseOverlayWindow { get; set; } = "Display top overlay";
public string Configwindow_Param_UseOverlayWindowDesc { get; set; } = "This window is currently used to cue the body position in advance.";
public string Configwindow_Param_BasicSettings { get; set; } = "Basic settings";
public string Configwindow_Param_Basic { get; set; } = "Basic";
public string Configwindow_Param_WeaponDelay { get; set; } = "Set the random interval between GCD (seconds)";
public string Configwindow_Param_WeaponFaster { get; set; } = "Set the time advance of use actions";
public string Configwindow_Param_WeaponInterval { get; set; } = "Set the interval between abilities using";
public string Configwindow_Param_InterruptibleTime { get; set; } = "Set the delay of interrupting";
public string Configwindow_Param_SpecialDuration { get; set; } = "Set the duration of special windows set by commands";
public string Configwindow_Param_AddDotGCDCount { get; set; } = "Set GCD advance of DOT refresh";
public string Configwindow_Param_AutoOffBetweenArea { get; set; } = "Turn off when player is between area.";
public string Configwindow_Param_DisplayEnhancement { get; set; } = "Display enhancement";
public string Configwindow_Param_Display { get; set; } = "Display";
public string Configwindow_Param_PoslockCasting { get; set; } = "Lock the movement when casting";
public string Configwindow_Param_PoslockModifier { get; set; } = "Set the modifier key to unlock the movement temporary";
public string Configwindow_Param_PoslockDescription { get; set; } = "LT is for gamepad player";
Expand All @@ -127,7 +127,7 @@ internal class Strings
public string Configwindow_Param_SayOutStateChanged { get; set; } = "Saying the state changes out";
public string Configwindow_Param_ShowInfoOnDtr { get; set; } = "Display plugin state on dtrbar";
public string Configwindow_Param_ShowInfoOnToast { get; set; } = "Display plugin state changed on toast";
public string Configwindow_Param_Action { get; set; } = "Use of actions";
public string Configwindow_Param_Action { get; set; } = "Action";
public string Configwindow_Param_UseAOEWhenManual { get; set; } = "Use AOE actions in manual mode";
public string Configwindow_Param_AutoBreak { get; set; } = "Automatic breaking";
public string Configwindow_Param_UseAbility { get; set; } = "Auto-use abilities";
Expand All @@ -146,7 +146,7 @@ internal class Strings
public string Configwindow_Param_LessMPNoRaise { get; set; } = "Nerver raise player if MP is less than the set value";
public string Configwindow_Param_UseItem { get; set; } = "Use items";
public string Configwindow_Param_UseItemDesc { get; set; } = "Use poison, WIP";
public string Configwindow_Param_Conditon { get; set; } = "Trigger conditions";
public string Configwindow_Param_Conditon { get; set; } = "Condition";
public string Configwindow_Param_StartOnCountdown { get; set; } = "Turn on auto-rotation on countdown";
public string Configwindow_Param_HealthDifference { get; set; } = "Set the HP standard deviation threshold for using AOE heal (ability & spell)";
public string Configwindow_Param_HealthAreaAbility { get; set; } = "Set the HP threshold for using AOE healing ability";
Expand All @@ -156,7 +156,7 @@ internal class Strings
public string Configwindow_Param_HealthSingleSpell { get; set; } = "Set the HP threshold for using single healing spell";
public string Configwindow_Param_HealingOfTimeSubtractSingle { get; set; } = "Set the HP threshold reduce with hot effect(single)";
public string Configwindow_Param_HealthForDyingTank { get; set; } = "Set the HP threshold for tank to use invincibility";
public string Configwindow_Param_Target { get; set; } = "Target selection";
public string Configwindow_Param_Target { get; set; } = "Target";
public string Configwindow_Param_RightNowTargetToHostileType { get; set; } = "Hostile target filtering condition";
public string Configwindow_Param_TargetToHostileType1 { get; set; } = "All targets can attack";
public string Configwindow_Param_TargetToHostileType2 { get; set; } = "Targets have a target or all targets can attack";
Expand All @@ -175,7 +175,7 @@ internal class Strings
public string Configwindow_Param_MoveTowardsScreenDesc { get; set; } = "Using movement actions towards the object in the center of the screen, otherwise toward the facing object.";
public string Configwindow_Param_RaiseAll { get; set; } = "Raise all (include passerby)";
public string Configwindow_Param_RaiseBrinkofDeath { get; set; } = "Raise player even has Brink of Death";
public string Configwindow_Param_Hostile { get; set; } = "Hostile target filtering options";
public string Configwindow_Param_Hostile { get; set; } = "Hostile";
public string Configwindow_Param_HostileDesc { get; set; } = "You can set the logic of hostile target selection to allow flexibility in switching the logic of selecting hostile in battle.";
public string Configwindow_Param_AddHostileCondition { get; set; } = "Add selection condition";
public string Configwindow_Param_HostileCondition { get; set; } = "Hostile target selection condition";
Expand Down
92 changes: 36 additions & 56 deletions RotationSolver/Windows/RotationConfigWindow_Param.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,71 +10,52 @@ namespace RotationSolver.Windows.RotationConfigWindow;

internal partial class RotationConfigWindow
{
private void DrawParamTab()
private static void DrawParamTabItem(string name, Action act)
{
ImGui.TextWrapped(LocalizationManager.RightLang.Configwindow_Params_Description);

ImGui.PushStyleVar(ImGuiStyleVar.ItemSpacing, new Vector2(0f, 5f));

if (ImGui.BeginChild("Param", new Vector2(0f, -1f), true))
if (act == null) return;
if (ImGui.BeginTabItem(name))
{
//Never Repalce Icon
DrawCheckBox(LocalizationManager.RightLang.Configwindow_Param_NeverReplaceIcon,
ref Service.Configuration.NeverReplaceIcon,
LocalizationManager.RightLang.Configwindow_Param_NeverReplaceIconDesc);

//Use Overlay Window
DrawCheckBox(LocalizationManager.RightLang.Configwindow_Param_UseOverlayWindow,
ref Service.Configuration.UseOverlayWindow,
LocalizationManager.RightLang.Configwindow_Param_UseOverlayWindowDesc);

if (ImGui.CollapsingHeader(LocalizationManager.RightLang.Configwindow_Param_BasicSettings))
{
DrawParamBasic();
}

ImGui.Separator();

if (ImGui.CollapsingHeader(LocalizationManager.RightLang.Configwindow_Param_DisplayEnhancement))
{
DrawParamDisplay();
}

ImGui.Separator();

if (ImGui.CollapsingHeader(LocalizationManager.RightLang.Configwindow_Param_Action))
{
DrawParamAction();
}

ImGui.Separator();

if (ImGui.CollapsingHeader(LocalizationManager.RightLang.Configwindow_Param_Conditon))
{
DrawParamCondition();
}

ImGui.Separator();

if (ImGui.CollapsingHeader(LocalizationManager.RightLang.Configwindow_Param_Target))
if (ImGui.BeginChild("Param", new Vector2(0f, -1f), true))
{
DrawParamTarget();
act();
ImGui.EndChild();
}
ImGui.EndTabItem();
}
}

ImGui.Separator();
private void DrawParamTab()
{
ImGui.TextWrapped(LocalizationManager.RightLang.Configwindow_Params_Description);

if (ImGui.CollapsingHeader(LocalizationManager.RightLang.Configwindow_Param_Hostile))
{
DrawParamHostile();
}
ImGui.PushStyleVar(ImGuiStyleVar.ItemSpacing, new Vector2(0f, 5f));

ImGui.EndChild();
if (ImGui.BeginTabBar("Param Items"))
{
DrawParamTabItem(LocalizationManager.RightLang.Configwindow_Param_Basic, DrawParamBasic);
DrawParamTabItem(LocalizationManager.RightLang.Configwindow_Param_Display, DrawParamDisplay);
DrawParamTabItem(LocalizationManager.RightLang.Configwindow_Param_Action, DrawParamAction);
DrawParamTabItem(LocalizationManager.RightLang.Configwindow_Param_Conditon, DrawParamCondition);
DrawParamTabItem(LocalizationManager.RightLang.Configwindow_Param_Target, DrawParamTarget);
DrawParamTabItem(LocalizationManager.RightLang.Configwindow_Param_Hostile, DrawParamHostile);

ImGui.EndTabBar();
}
ImGui.PopStyleVar();
}

private void DrawParamBasic()
{
//Never Repalce Icon
DrawCheckBox(LocalizationManager.RightLang.Configwindow_Param_NeverReplaceIcon,
ref Service.Configuration.NeverReplaceIcon,
LocalizationManager.RightLang.Configwindow_Param_NeverReplaceIconDesc);

//Use Overlay Window
DrawCheckBox(LocalizationManager.RightLang.Configwindow_Param_UseOverlayWindow,
ref Service.Configuration.UseOverlayWindow,
LocalizationManager.RightLang.Configwindow_Param_UseOverlayWindowDesc);

DrawRangedFloat(LocalizationManager.RightLang.Configwindow_Param_WeaponDelay,
ref Service.Configuration.WeaponDelayMin, ref Service.Configuration.WeaponDelayMax);

Expand Down Expand Up @@ -154,12 +135,11 @@ private void DrawParamDisplay()
DrawCheckBox(LocalizationManager.RightLang.Configwindow_Param_PoslockCasting,
ref Service.Configuration.PoslockCasting);


ImGui.SameLine();
ImGuiHelper.Spacing();

if (Service.Configuration.PoslockCasting)
{
ImGui.SameLine();
ImGuiHelper.Spacing();

DrawCombo(LocalizationManager.RightLang.Configwindow_Param_PoslockModifier,
ref Service.Configuration.PoslockModifier, EnumTranslations.ToName,
ConfigurationHelper.Keys,
Expand Down
4 changes: 2 additions & 2 deletions RotationSolver/Windows/RotationConfigWindow_Rotation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ private void DrawRotationTab()
ImGui.TextWrapped(LocalizationManager.RightLang.Configwindow_AttackItem_Description);

ImGui.SameLine();
if (ImGui.Button("Wiki"))
if (ImGui.Button("Dev Wiki"))
{
Util.OpenLink("https://archidog1998.github.io/RotationSolver/RotationDev");
Util.OpenLink("https://archidog1998.github.io/RotationSolver/#/RotationDev/");
}

ImGui.PushStyleVar(ImGuiStyleVar.ItemSpacing, new Vector2(0f, 5f));
Expand Down

0 comments on commit 4e7fefc

Please sign in to comment.