コード例 #1
0
        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();
            }
        }
コード例 #2
0
ファイル: UISearchBox.cs プロジェクト: sway2020/FindIt2
        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();
                }
            }
        }