Skip to content

Commit

Permalink
Don't allow to delete brush if there are no brushes
Browse files Browse the repository at this point in the history
  • Loading branch information
kaczy93 committed Oct 6, 2024
1 parent c1aeb3c commit 6cbc558
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CentrED/UI/Windows/LandBrushManagerWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,12 @@ protected override void InternalDraw()
ImGui.OpenPopup("LandBrushAdd");
}
ImGui.SameLine();
ImGui.BeginDisabled(LandBrushNames.Length <= 0);
if (ImGui.Button("Remove"))
{
ImGui.OpenPopup("LandBrushDelete");
}
ImGui.EndDisabled();
ImGui.Separator();
if (Selected != null)
{
Expand Down Expand Up @@ -208,10 +210,12 @@ private void DrawTransitions()
ImGui.OpenPopup("TransitionsAdd");
}
ImGui.SameLine();
ImGui.BeginDisabled(TransitionNames.Length <= 0);
if (ImGui.Button("Remove"))
{
ImGui.OpenPopup("TransitionsDelete");
}
ImGui.EndDisabled();
ImGui.Separator();

if(TransitionNames.Length == 0)
Expand Down

0 comments on commit 6cbc558

Please sign in to comment.