/// <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). /// </summary> /// <param name="buttonText">Text on the button. The button is styled as a speech bubble, so consider spelling it like the MC is saying this.</param> /// <param name="spawnConditionCheck"> /// Check if the button should be shown in the current H scene. /// Called at scene start. Return true if button should be spawned, false if not. /// Set to null if the button should always be spawned. /// </param> /// <param name="onButtonClicked">Called when user clicks the button and it is interactable.</param> /// <returns>Returns a disposable that when disposed removes this button permanently.</returns> public static IDisposable AddHsceneTrespassingButton( string buttonText, Func <HSprite, bool> spawnConditionCheck, Action <HSprite> onButtonClicked) { var btn = new CustomTrespassingButton(buttonText, spawnConditionCheck, onButtonClicked); _customTrespassingButtons.Add(btn); Hooks.ApplyHooks(); return(Disposable.Create(() => { btn.Dispose(); _customTrespassingButtons.Remove(btn); })); }