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

Commit

Permalink
fix: add some status showing on control window.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Aug 17, 2023
1 parent 1e28b35 commit e3123a1
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion RotationSolver/UI/ControlWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public ControlWindow()
SizeCondition = ImGuiCond.FirstUseEver;
}

public override void Draw()
public override unsafe void Draw()
{
ImGui.Columns(3, "Control Bolder", false);
var gcd = Service.Config.GetValue(PluginConfigFloat.ControlWindowGCDSize)
Expand Down Expand Up @@ -72,6 +72,33 @@ public override void Draw()
columnWidth = Math.Max(columnWidth, ImGui.GetCursorPosX());
ImGui.NewLine();

var color = *ImGui.GetStyleColorVec4(ImGuiCol.TextDisabled);

var isAoe = Service.Config.GetValue(PluginConfigBool.UseAOEAction)
&& (!DataCenter.IsManual
|| Service.Config.GetValue(PluginConfigBool.UseAOEWhenManual));

if (!isAoe) ImGui.PushStyleColor( ImGuiCol.Text, color);
if (ImGuiHelper.SelectableButton("AOE"))
{
Service.Config.SetValue(PluginConfigBool.UseAOEAction, !isAoe);
Service.Config.SetValue(PluginConfigBool.UseAOEWhenManual, !isAoe);
}
if(!isAoe) ImGui.PopStyleColor();

ImGui.SameLine();

var isBurst = Service.Config.GetValue(PluginConfigBool.AutoBurst);
if (!isBurst) ImGui.PushStyleColor(ImGuiCol.Text, color);
if (ImGuiHelper.SelectableButton("Burst"))
{
Service.Config.SetValue(PluginConfigBool.AutoBurst, !isBurst);
}
if (!isBurst) ImGui.PopStyleColor();
ImGui.SameLine();
columnWidth = Math.Max(columnWidth, ImGui.GetCursorPosX());
ImGui.NewLine();

ImGui.SetColumnWidth(0, columnWidth);

ImGui.NextColumn();
Expand Down

0 comments on commit e3123a1

Please sign in to comment.