예제 #1
0
 public static void ChangeActiveSkin(string skinName)
 {
     if (activeSkin != null) {
         activeSkin.Unload();
     }
     activeSkin = new Skin();
     activeSkin.LoadSkin(skinName);
     IO.Options.ActiveSkin = skinName;
     if (screenBackground != null) {
         screenBackground.Close();
         screenBackground = null;
     }
     screenBackground = LoadGui("General/Background");
     if (screenBackground != null) {
         //lock (screenBackground) {
         //    screenBackground = screenBackground.CreateStretchedSurface(SdlDotNet.Graphics.Video.Screen.Size);
         //}
     }
     SdlDotNet.Widgets.Widgets.ResourceDirectory = IO.Paths.SkinPath + ActiveSkin.Name + "/Widgets/";
 }
예제 #2
0
 void cmbSkinSelect_ItemSelected(object sender, EventArgs e)
 {
     if (loadedSkin != null) {
         loadedSkin.Unload();
     }
     loadedSkin = new Skin();
     if (cmbSkinSelect.SelectedItem != null) {
         loadedSkin.LoadSkin(cmbSkinSelect.SelectedItem.TextIdentifier);
         picSkinPreview.Image = Logic.Graphics.SurfaceManager.LoadSurface(IO.Paths.SkinPath + loadedSkin.Name + "/Configuration/preview.png");
     }
 }