コード例 #1
0
 /// <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)DMC_MBE.Instantiate(List[SkinID]));
     }
     else
     {
         DMC_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
        /// <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)DMC_MBE.Instantiate(DefUnitySkin));

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

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