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

Commit

Permalink
fix: add a bool icon for the conditions.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Oct 24, 2023
1 parent bbfec02 commit 8eb4d29
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
7 changes: 5 additions & 2 deletions RotationSolver/Localization/Localization.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,10 @@
"ConfigWindow_Auto_MoveForwardConditionSet": "Move Forward Forced Condition",
"ConfigWindow_Auto_MoveBackConditionSet": "Move Back Forced Condition",
"ConfigWindow_Auto_AntiKnockbackConditionSet": "Anti Knockback Forced Condition",
"ConfigWindow_Auto_BurstConditionSet": "Burst Forced Condition",
"ConfigWindow_Auto_SpeedConditionSet": "Speed Forced Condition",
"ConfigWindow_ConditionSetDesc": "The Condition set you chose, click to modify."
"ConfigWindow_ConditionSetDesc": "The Condition set you chose, click to modify.",
"ConfigWindow_Basic_UseAdditionalConditions": "Use additional conditions",
"ConfigWindow_Basic_SwitchCancelConditionSet": "Auto turn off conditions",
"ConfigWindow_Basic_SwitchManualConditionSet": "Auto turn manual conditions",
"ConfigWindow_Basic_SwitchAutoConditionSet": "Auto turn auto conditions"
}
3 changes: 0 additions & 3 deletions RotationSolver/UI/RotationConfigWindow_Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,6 @@ private static void DrawBasicTimer()
};
private static void DrawBasicAutoSwitch()
{

foreach (var searchable in _basicSwitchTurnOff)
{
searchable?.Draw(Job);
Expand All @@ -280,8 +279,6 @@ private static void DrawBasicAutoSwitch()
searchable?.Draw(Job);
}

ImGui.Separator();

_autoSwitch?.Draw();
}

Expand Down
18 changes: 17 additions & 1 deletion RotationSolver/UI/SearchableConfigs/CheckBoxSearch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,16 @@ public override void ResetToDefault(Job job)
{
Service.Config.SetBoolRaw(_config, Service.Config.GetBoolRawDefault(_config));
}

protected override void DrawMiddle()
{
if (Service.Config.GetValue(PluginConfigBool.UseAdditionalConditions))
{
ConditionDrawer.DrawCondition(Service.Config.GetValue(_config));
ImGui.SameLine();
}
base.DrawMiddle();
}
}

internal abstract class CheckBoxSearch : Searchable
Expand Down Expand Up @@ -177,9 +187,14 @@ protected virtual void DrawChildren(Job job)
}
}

protected virtual void DrawMiddle()
{

}

protected override void DrawMain(Job job)
{
var hasChild = Children != null && Children.Length > 0;
var hasChild = Children != null && Children.Any(c => c.ShowInChild);
var hasAdditional = AdditionalDraw != null;
var hasSub = hasChild || hasAdditional;
IDalamudTextureWrap texture = null;
Expand Down Expand Up @@ -214,6 +229,7 @@ protected override void DrawMain(Job job)
if (enable || AlwaysShowChildren)
{
var x = ImGui.GetCursorPosX();
DrawMiddle();
var drawBody = ImGui.TreeNode(name);
if (ImGui.IsItemHovered()) ShowTooltip(job);

Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/UI/SearchableConfigs/Searchable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ protected void ShowTooltip(Job job, bool showHand = true)
}
var wholeWidth = ImGui.GetWindowWidth();

if(Tooltips != null) foreach (var tooltip in Tooltips)
if (Tooltips != null) foreach (var tooltip in Tooltips)
{
RotationConfigWindow.DrawLinkDescription(tooltip, wholeWidth, false);
}
Expand Down

0 comments on commit 8eb4d29

Please sign in to comment.