Skip to content

Commit

Permalink
Add the button to delete a cooldown plan
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeMonkey626 committed Jul 17, 2024
1 parent 72ced0d commit 56aa8c6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions BossMod/Autorotation/UIPlanEditorWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ public override void Draw()
if (UIMisc.Button("Save", !_planner.Modified, "No changes"))
Save();
ImGui.SameLine();
if (UIMisc.Button("Delete", !ImGui.GetIO().KeyShift, "Hold shift to delete"))
Delete();
ImGui.SameLine();
_planner.DrawCommonControls();

_selectedPhase = _planner.DrawPhaseControls(_selectedPhase);
Expand All @@ -47,4 +50,10 @@ private void Save()
_original = newPlan;
_planner.Modified = false;
}

private void Delete()
{
_db.ModifyPlan(_original, null);
IsOpen = false;
}
}

0 comments on commit 56aa8c6

Please sign in to comment.