From 038e1edf03e8ea802c70f9f5f60c4b420fbb9dd8 Mon Sep 17 00:00:00 2001 From: lempamo Date: Wed, 5 Jul 2017 14:41:23 -0400 Subject: theme things --- TimeHACK.Engine/Properties/Resources.Designer.cs | 10 ++++++++++ TimeHACK.Engine/Properties/Resources.resx | 3 +++ .../Resources/Win95PlusDangerousCreaturesWallpaper.JPG | Bin 0 -> 99357 bytes TimeHACK.Engine/SaveSystem.cs | 17 ++++++++++------- TimeHACK.Engine/Theme.cs | 16 +++++++++++++++- TimeHACK.Engine/TimeHACK.Engine.csproj | 1 + 6 files changed, 39 insertions(+), 8 deletions(-) create mode 100644 TimeHACK.Engine/Resources/Win95PlusDangerousCreaturesWallpaper.JPG (limited to 'TimeHACK.Engine') diff --git a/TimeHACK.Engine/Properties/Resources.Designer.cs b/TimeHACK.Engine/Properties/Resources.Designer.cs index e8b970e..b0186e9 100644 --- a/TimeHACK.Engine/Properties/Resources.Designer.cs +++ b/TimeHACK.Engine/Properties/Resources.Designer.cs @@ -208,6 +208,16 @@ namespace TimeHACK.Engine.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Win95PlusDangerousCreaturesWallpaper { + get { + object obj = ResourceManager.GetObject("Win95PlusDangerousCreaturesWallpaper", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream. /// diff --git a/TimeHACK.Engine/Properties/Resources.resx b/TimeHACK.Engine/Properties/Resources.resx index 4009cc9..aeb1500 100644 --- a/TimeHACK.Engine/Properties/Resources.resx +++ b/TimeHACK.Engine/Properties/Resources.resx @@ -184,6 +184,9 @@ ..\Resources\Win95PlusDangerousCreaturesStart.WAV;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ..\Resources\Win95PlusDangerousCreaturesWallpaper.JPG;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\Win95Start.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 diff --git a/TimeHACK.Engine/Resources/Win95PlusDangerousCreaturesWallpaper.JPG b/TimeHACK.Engine/Resources/Win95PlusDangerousCreaturesWallpaper.JPG new file mode 100644 index 0000000..eb31a05 Binary files /dev/null and b/TimeHACK.Engine/Resources/Win95PlusDangerousCreaturesWallpaper.JPG differ diff --git a/TimeHACK.Engine/SaveSystem.cs b/TimeHACK.Engine/SaveSystem.cs index be3aeb7..078bbee 100644 --- a/TimeHACK.Engine/SaveSystem.cs +++ b/TimeHACK.Engine/SaveSystem.cs @@ -13,10 +13,12 @@ namespace TimeHACK.Engine { public static Save CurrentSave { get; set; } public static FileSystemFolderInfo filesystemflinfo { get; set; } - public static Boolean DevMode = false; + public static bool DevMode = false; public static FileAssociation IconChanger = new FileAssociation(); + public static Theme currentTheme { get; set; } + public static string GameDirectory { get @@ -114,7 +116,6 @@ namespace TimeHACK.Engine public static void NewGame() { - //TODO: User must set a username....somehow var save = new Save(); @@ -124,18 +125,20 @@ namespace TimeHACK.Engine if (ProfileName == "98") { save.CurrentOS = "98"; - save.ThemeName = "98normal"; + save.ThemeName = "default98"; } else { save.CurrentOS = "95"; - save.ThemeName = "95normal"; + save.ThemeName = "default95"; + currentTheme = new Default95Theme(); } } else { save.CurrentOS = "95"; - save.ThemeName = "95normal"; + save.ThemeName = "default95"; + currentTheme = new Default95Theme(); } CurrentSave = save; @@ -180,12 +183,12 @@ namespace TimeHACK.Engine CreateWindowsFile(Path.Combine(ProfileWindowsDirectory, "explorer.exe"), "windowsexplorer"); } - public static void CreateWindowsFile(String filepath, String contents) + public static void CreateWindowsFile(string filepath, string contents) { File.WriteAllText(filepath, contents); } - public static void SaveDirectoryInfo(String directory, Boolean isProtected, String label, Boolean allowback) + public static void SaveDirectoryInfo(string directory, bool isProtected, string label, bool allowback) { if (!Directory.Exists(directory)) Directory.CreateDirectory(directory); diff --git a/TimeHACK.Engine/Theme.cs b/TimeHACK.Engine/Theme.cs index 645e714..cd82fac 100644 --- a/TimeHACK.Engine/Theme.cs +++ b/TimeHACK.Engine/Theme.cs @@ -18,7 +18,9 @@ namespace TimeHACK.Engine public Stream progErrorSound { get; set; } public Stream questionSound { get; set; } - public Image defaultWallpaper; + public Image defaultWallpaper { get; set; } + + public string themeName { get; set; } } public class Default95Theme: Theme @@ -34,6 +36,18 @@ namespace TimeHACK.Engine questionSound = Properties.Resources.CHORD; defaultWallpaper = null; + themeName = "default95"; + } + } + + public class DangerousCreaturesTheme: Theme + { + public DangerousCreaturesTheme() + { + startSound = Properties.Resources.Win95PlusDangerousCreaturesStart; + + defaultWallpaper = Properties.Resources.Win95PlusDangerousCreaturesWallpaper; + themeName = "dangeranimals"; } } } diff --git a/TimeHACK.Engine/TimeHACK.Engine.csproj b/TimeHACK.Engine/TimeHACK.Engine.csproj index a158eb7..0a9a4fa 100644 --- a/TimeHACK.Engine/TimeHACK.Engine.csproj +++ b/TimeHACK.Engine/TimeHACK.Engine.csproj @@ -114,6 +114,7 @@ + -- cgit v1.2.3