Skip to content

Commit

Permalink
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Source/ModuleRangeSafety.cs
Original file line number Diff line number Diff line change
@@ -10,7 +10,17 @@ public class ModuleRangeSafety : PartModule
[KSPEvent(guiActive = true, guiName = "Range Safety")]
public void BoomEvent()
{
Boom();
SpawnConfirmationDialog();
}

private void SpawnConfirmationDialog()
{
var options = new DialogGUIBase[] {
new DialogGUIButton("Yes", Boom),
new DialogGUIButton("No", () => {})
};
var dialog = new MultiOptionDialog("ConfirmRangeSafety", "Destroy Vessel?", "Range Safety", HighLogic.UISkin, 300, options);
PopupDialog.SpawnPopupDialog(dialog, true, HighLogic.UISkin);
}

[KSPAction("Range Safety")]

0 comments on commit ed56524

Please sign in to comment.