protected override void OnVisibilityChanged() { base.OnVisibilityChanged(); if (input != null && !isVisible) { input.Unfocus(); } // do some initialization work when the UI is first shown if (isVisible && !FindIt.instance.firstVisibleFlag) { FindIt.instance.firstVisibleFlag = true; // show update notice if (!Settings.disableUpdateNotice && (ModInfo.updateNoticeDate > Settings.lastUpdateNotice)) { UIUpdateNoticePopUp.ShowAt(); UIUpdateNoticePopUp.instance.relativePosition += new Vector3(0, -100); Settings.lastUpdateNotice = ModInfo.updateNoticeDate; XMLUtils.SaveSettings(); } // set up prop categories for props generated by Elektrix's TVP mod. Need the TVP Patch mod if (FindIt.isTVPPatchEnabled && !AssetTagList.instance.isTVPPatchModProcessed) { AssetTagList.instance.GetTVPProps(); } Search(); } }
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); } }
protected override void OnVisibilityChanged() { base.OnVisibilityChanged(); if (input != null && !isVisible) { input.Unfocus(); } // do some initialization work when the UI is first shown if (isVisible && !FindIt.instance.firstVisibleFlag) { FindIt.instance.firstVisibleFlag = true; // show update notice if (!Settings.disableUpdateNotice && (ModInfo.updateNoticeDate > Settings.lastUpdateNotice)) { UIUpdateNoticePopUp.ShowAt(); UIUpdateNoticePopUp.instance.relativePosition += new Vector3(0, -200); Settings.lastUpdateNotice = ModInfo.updateNoticeDate; XMLUtils.SaveSettings(); } } }