Skip to content

Commit b932af0

Browse files
committed
Fixed bug with cancel button not showing
1 parent 103df48 commit b932af0

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

PolyTechMain.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,21 @@ public void Display(){
469469
public Panel_PopUpMessage.OnChoiceDelegate cancelDelegate;
470470
public PopUpWarningCategory warningCategory;
471471
}
472+
473+
[HarmonyPatch(typeof(PopUpMessage), "Display", new Type[] {
474+
typeof(string),
475+
typeof(Panel_PopUpMessage.OnChoiceDelegate),
476+
})]
477+
[HarmonyPrefix]
478+
public static bool PopupMessageCancelButtonFix(
479+
string message,
480+
Panel_PopUpMessage.OnChoiceDelegate okDelegate
481+
){
482+
PopUpMessage.Display(message, okDelegate, () => {}, PopUpWarningCategory.NONE);
483+
GameUI.m_Instance.m_PopUpMessage.m_NeverShowAgainToggle.transform.parent.gameObject.SetActive(false);
484+
return false;
485+
}
486+
472487
[HarmonyPatch(typeof(PopUpMessage), "Display", new Type[] {
473488
typeof(string),
474489
typeof(Panel_PopUpMessage.OnChoiceDelegate),

0 commit comments

Comments
 (0)