コード例 #1
0
ファイル: CC_SkinsLibrary.cs プロジェクト: yadenisyur/CapCom
 /// <summary>
 /// Copies a skin so you can make a new custom skin from an already defined one
 /// </summary>
 /// <param name="SkinID">The string ID of the custom skin</param>
 /// <returns>The new copy of the skin</returns>
 internal static GUISkin CopySkin(String SkinID)
 {
     if (List.ContainsKey(SkinID))
     {
         return((GUISkin)CC_MBE.Instantiate(List[SkinID]));
     }
     else
     {
         CC_MBE.LogFormatted("Unable to copy GUISkin to {0}, GUISkin not found", SkinID);
         throw new SystemException(String.Format("Unable to copy GUISkin to {0}, GUISkin not found", SkinID));
     }
 }
コード例 #2
0
ファイル: CC_SkinsLibrary.cs プロジェクト: yadenisyur/CapCom
        /// <summary>
        /// Copies a skin so you can make a new custom skin from an already defined one
        /// </summary>
        /// <param name="DefaultSkin">Which predefined skin to use</param>
        /// <returns>The new copy of the skin</returns>
        internal static GUISkin CopySkin(DefSkinType DefaultSkin)
        {
            switch (DefaultSkin)
            {
            case DefSkinType.Unity: return((GUISkin)CC_MBE.Instantiate(DefUnitySkin));

            case DefSkinType.KSP: return((GUISkin)CC_MBE.Instantiate(DefKSPSkin));

            //case DefSkinType.None: return new GUISkin();
            default: return((GUISkin)CC_MBE.Instantiate(DefKSPSkin));
            }
        }