Beispiel #1
0
 /// <summary>
 /// Add a new button to the H Scene "trespassing" menu (red button below position selections on the right, originally used when having H near another girl so you can start 3P).
 /// After user clicks the button, a confirmation dialog will be shown.
 /// </summary>
 /// <inheritdoc cref="AddHsceneTrespassingButton"/>
 /// <param name="confirmBoxTitle">Title of the confirmation box after user clicked the button.</param>
 /// <param name="confirmBoxSentence">Explanation text of the confirmation box after user clicked the button. Can have newlines but try to keep it short.</param>
 /// <param name="onConfirmed">Called when user clicks the button and presses "Yes" in the confirmation box. If the user presses "No" nothing is done.</param>
 public static IDisposable AddHsceneTrespassingButtonWithConfirmation(
     string buttonText, Func <HSprite, bool> spawnConditionCheck,
     string confirmBoxTitle, string confirmBoxSentence, Action <HSprite> onConfirmed)
 {
     return(AddHsceneTrespassingButton(buttonText, spawnConditionCheck,
                                       hSprite =>
     {
         var confirmBox = ConfirmDialog.status;
         confirmBox.Title = confirmBoxTitle;
         confirmBox.Sentence = confirmBoxSentence;
         confirmBox.Yes = () => onConfirmed(hSprite);
         confirmBox.No = () => { };
         ConfirmDialog.Load();
     }));
 }