private static void Close() { if (instance != null) { UIView.PopModal(); instance.isVisible = false; Destroy(instance.gameObject); instance = null; } }
public static void ShowAt() { if (instance == null) { instance = UIView.GetAView().AddUIComponent(typeof(UIUpdateNoticePopUp)) as UIUpdateNoticePopUp; instance.Show(true); UIView.PushModal(instance); } else { instance.Show(true); } instance.relativePosition += new Vector3(-200, -200); }
public static void ShowAt(UIComponent component) { if (instance == null) { instance = UIView.GetAView().AddUIComponent(typeof(UIQuickMenuPopUp)) as UIQuickMenuPopUp; instance.relativePosition += new Vector3(-200, -450); // UIView.PushModal(instance); } instance.Show(true); // show update notice if (!YetAnotherToolbar.instance.shownUpdateNoticeFlag) { YetAnotherToolbar.instance.shownUpdateNoticeFlag = true; // show update notice if (!Settings.disableUpdateNotice && (ModInfo.updateNoticeDate > Settings.lastUpdateNotice)) { UIUpdateNoticePopUp.ShowAt(); Settings.lastUpdateNotice = ModInfo.updateNoticeDate; XMLUtils.SaveSettings(); } } }