Skip to content

Commit

Permalink
Merge pull request #387 from CodeMonkey626/delete_plan
Browse files Browse the repository at this point in the history
Add button to delete cooldown plan
  • Loading branch information
awgil authored Jul 18, 2024
2 parents 6042389 + 56aa8c6 commit cac6c4c
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 cac6c4c

Please sign in to comment.