コード例 #1
0
        public static bool GetMenuItemSetUP(SceneEdit.SMenuItem mi, string f_strMenuFileName, out string IconTex)
        {
            IconTex = null;

            if (f_strMenuFileName.Contains("_zurashi"))
            {
                return(false);
            }
            if (f_strMenuFileName.Contains("_mekure"))
            {
                return(false);
            }
            f_strMenuFileName    = Path.GetFileName(f_strMenuFileName);
            mi.m_strMenuFileName = f_strMenuFileName;
            mi.m_nMenuFileRID    = f_strMenuFileName.ToLower().GetHashCode();
            try
            {
                if (!GSModMenuLoad.InitMenuItemScript(mi, f_strMenuFileName, out IconTex))
                {
                    Main.logger.LogError("(メニュースクリプトが読めませんでした。) The following menu file could not be read and will be skipped: " + f_strMenuFileName);
                }
            }
            catch (Exception ex)
            {
                Main.logger.LogError(string.Concat(new string[]
                {
                    "GetMenuItemSetUP tossed an exception while reading: ",
                    f_strMenuFileName,
                    "\n\n",
                    ex.Message,
                    "\n",
                    ex.StackTrace
                }));
                return(false);
            }

            return(true);
        }
コード例 #2
0
        public static bool GetMenuItemSetUP(SceneEdit.SMenuItem mi, string f_strMenuFileName, out string IconTex)
        {
            IconTex = null;

            if (f_strMenuFileName.Contains("_zurashi"))
            {
                return(false);
            }
            if (f_strMenuFileName.Contains("_mekure"))
            {
                return(false);
            }
            f_strMenuFileName    = Path.GetFileName(f_strMenuFileName);
            mi.m_strMenuFileName = f_strMenuFileName;
            mi.m_nMenuFileRID    = f_strMenuFileName.ToLower().GetHashCode();
            try
            {
                if (!GSModMenuLoad.InitMenuItemScript(mi, f_strMenuFileName, out IconTex))
                {
                    NDebug.Assert(false, "メニュースクリプトが読めませんでした。" + f_strMenuFileName);
                }
            }
            catch (Exception ex)
            {
                Debug.LogError(string.Concat(new string[]
                {
                    "GetMenuItemSetUP 例外/",
                    f_strMenuFileName,
                    "/",
                    ex.Message,
                    " StackTrace/",
                    ex.StackTrace
                }));
                return(false);
            }
            return(true);
        }