private static void popup_test() { GameUI.ShowMessage(ScreenMessageLocation.TOP_LEFT, "hey", 5f); PopUpMessage.DisplayOkOnly("ok only", null); PopUpMessage.Display("ok and cancel", null); PopUpMessage.Display("ok and cancel", null, () => {}); PopUpWarning.Display("PopUpWarning"); PopUpTwoChoices.Display( "PopUpTwoChoices", "aaa", "bbb", () => { return; }, () => { return; }); PopupInputField.Display( "PopUpInputField", "default", (result) => { uConsole.Log("You typed: " + result); } ); }
public void Display() { PopUpTwoChoices.Display( message, choiceA, choiceB, callbackA, callbackB, PopUpWarningCategory.NONE ); GameUI.m_Instance.m_PopUpTwoChoices.m_NeverShowAgainToggle.transform.parent.gameObject.SetActive(false); }
void wrongSettings(string name, string version, string settings, PolyTechMod currMod) { ptfInstance.ptfLogger.LogWarning("Mod in layout but settings are not correct."); PopUpTwoChoices.Display( $"Mod ({name}) but settings are not correct.", "Fix Settings Automatically", "Ignore Warning", () => { currMod.setSettings(settings); }, () => { ptfInstance.ptfLogger.LogWarning("Ignored the mod being disabled"); } ); }
void notEnabled(string name, string version, string settings, PolyTechMod currMod) { ptfInstance.ptfLogger.LogWarning("Mod in layout present but not enabled."); PopUpTwoChoices.Display( $"Mod ({name}) in layout present but not enabled.", "Enable Mod", "Ignore Warning", () => { currMod.enableMod(); checkMods(3, name, version, settings, currMod); }, () => { ptfInstance.ptfLogger.LogWarning("Ignored the mod being disabled"); checkMods(3, name, version, settings, currMod); } ); }