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

Commit

Permalink
fix: Better UI and less clutter for rotation view by using a collapsi…
Browse files Browse the repository at this point in the history
…ng header.
  • Loading branch information
RiotNOR committed May 16, 2023
1 parent 1bb2cd6 commit 02ab8f0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
6 changes: 2 additions & 4 deletions RotationSolver/UI/ImGuiHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -580,9 +580,7 @@ public unsafe static void Display(this ICustomRotation rotation, ICustomRotation
}
}, () =>
{
RotationConfigWindow.DrawRotationRole(rotation);

rotation.Configs.Draw(canAddButton);
RotationConfigWindow.DrawRotationRole(rotation, canAddButton);
});

#region IAction
Expand Down Expand Up @@ -716,7 +714,7 @@ public static void DisplayEvent(this ActionEventInfo info)
}

#region Rotation Config Display
static void Draw(this IRotationConfigSet set, bool canAddButton)
internal static void Draw(this IRotationConfigSet set, bool canAddButton)
{
foreach (var config in set.Configs)
{
Expand Down
13 changes: 9 additions & 4 deletions RotationSolver/UI/RotationConfigWindow_Rotation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,17 @@ private static void DrawRotations(CustomRotationGroup[] rotations)
}
}

internal static void DrawRotationRole(ICustomRotation rotation)
internal static void DrawRotationRole(ICustomRotation rotation, bool canAddButton)
{
DrawTargetHostileTYpe(rotation);
DrawSpecialRoleSettings(rotation.Job.GetJobRole(), rotation.JobIDs[0]);

ImGui.Spacing();
if (ImGui.CollapsingHeader($"{rotation.JobIDs[0]} rotation settings##Settings"))
{
ImGui.Indent();
DrawSpecialRoleSettings(rotation.Job.GetJobRole(), rotation.JobIDs[0]);
rotation.Configs.Draw(canAddButton);
ImGui.Unindent();
ImGui.Spacing();
}
}

private static void DrawTargetHostileTYpe(ICustomRotation rotation)
Expand Down

0 comments on commit 02ab8f0

Please sign in to comment.