Ejemplo n.º 1
0
        protected override bool DrawButton(ConfirmButtonAttribute attribute, string label, string methodName)
        {
            if (!MightyGUIUtilities.DrawButton(label, attribute.Height))
            {
                return(false);
            }

            if (MightyGUIUtilities.ConfirmDialog(attribute.DialogTitle ?? label,
                                                 attribute.ConfirmMessage ?? $"Do you want to run {methodName}?"))
            {
                return(true);
            }

            throw MightyExceptionUtilities.AbortAfterConfirmDialog;
        }