aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Engine
diff options
context:
space:
mode:
authorlempamo <[email protected]>2017-07-31 15:40:59 -0400
committerlempamo <[email protected]>2017-07-31 15:40:59 -0400
commit10ae6bcf8fc9168bfda105de31b9525ec34d1b3d (patch)
tree9e611a48e01a4f1655061103d88eae7eefd4f8fe /TimeHACK.Engine
parent93702450a4d0a1830807e985acccc616f3bf1b62 (diff)
downloadhistacom2-10ae6bcf8fc9168bfda105de31b9525ec34d1b3d.tar.gz
histacom2-10ae6bcf8fc9168bfda105de31b9525ec34d1b3d.tar.bz2
histacom2-10ae6bcf8fc9168bfda105de31b9525ec34d1b3d.zip
more themey things
Diffstat (limited to 'TimeHACK.Engine')
-rw-r--r--TimeHACK.Engine/Properties/Resources.Designer.cs9
-rw-r--r--TimeHACK.Engine/Properties/Resources.resx3
-rw-r--r--TimeHACK.Engine/Resources/Win95PlusInsideComputerAsterisk.wavbin0 -> 9006 bytes
-rw-r--r--TimeHACK.Engine/SaveSystem.cs3
-rw-r--r--TimeHACK.Engine/Template/WinClassic.Designer.cs20
-rw-r--r--TimeHACK.Engine/Template/WinClassic.cs17
-rw-r--r--TimeHACK.Engine/Theme.cs22
-rw-r--r--TimeHACK.Engine/TimeHACK.Engine.csproj1
-rw-r--r--TimeHACK.Engine/WindowManager.cs3
9 files changed, 67 insertions, 11 deletions
diff --git a/TimeHACK.Engine/Properties/Resources.Designer.cs b/TimeHACK.Engine/Properties/Resources.Designer.cs
index b2fabb2..ea06c47 100644
--- a/TimeHACK.Engine/Properties/Resources.Designer.cs
+++ b/TimeHACK.Engine/Properties/Resources.Designer.cs
@@ -266,6 +266,15 @@ namespace TimeHACK.Engine.Properties {
/// <summary>
/// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// </summary>
+ public static System.IO.UnmanagedMemoryStream Win95PlusInsideComputerAsterisk {
+ get {
+ return ResourceManager.GetStream("Win95PlusInsideComputerAsterisk", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
+ /// </summary>
public static System.IO.UnmanagedMemoryStream Win95PlusInsideComputerStart {
get {
return ResourceManager.GetStream("Win95PlusInsideComputerStart", resourceCulture);
diff --git a/TimeHACK.Engine/Properties/Resources.resx b/TimeHACK.Engine/Properties/Resources.resx
index a17e929..94b3988 100644
--- a/TimeHACK.Engine/Properties/Resources.resx
+++ b/TimeHACK.Engine/Properties/Resources.resx
@@ -226,4 +226,7 @@
<data name="Win95Question" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\WinClassic\Window\Win95Question.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
+ <data name="Win95PlusInsideComputerAsterisk" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\Win95PlusInsideComputerAsterisk.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </data>
</root> \ No newline at end of file
diff --git a/TimeHACK.Engine/Resources/Win95PlusInsideComputerAsterisk.wav b/TimeHACK.Engine/Resources/Win95PlusInsideComputerAsterisk.wav
new file mode 100644
index 0000000..a606841
--- /dev/null
+++ b/TimeHACK.Engine/Resources/Win95PlusInsideComputerAsterisk.wav
Binary files differ
diff --git a/TimeHACK.Engine/SaveSystem.cs b/TimeHACK.Engine/SaveSystem.cs
index 21a301a..29e230a 100644
--- a/TimeHACK.Engine/SaveSystem.cs
+++ b/TimeHACK.Engine/SaveSystem.cs
@@ -647,6 +647,9 @@ namespace TimeHACK.Engine
[Order]
public int BytesLeft { get; set; }
+
+ [Order]
+ public Theme customTheme { get; set; }
}
public class FileSystemFolderInfo
diff --git a/TimeHACK.Engine/Template/WinClassic.Designer.cs b/TimeHACK.Engine/Template/WinClassic.Designer.cs
index b1d4b82..8f7540c 100644
--- a/TimeHACK.Engine/Template/WinClassic.Designer.cs
+++ b/TimeHACK.Engine/Template/WinClassic.Designer.cs
@@ -82,7 +82,7 @@
//
// programtopbar
//
- this.programtopbar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(170)))));
+ this.programtopbar.BackColor = System.Drawing.Color.Navy;
this.programtopbar.Controls.Add(this.programIcon);
this.programtopbar.Controls.Add(this.maximizebutton);
this.programtopbar.Controls.Add(this.minimizebutton);
@@ -159,7 +159,7 @@
this.toprightcorner.Name = "toprightcorner";
this.toprightcorner.Size = new System.Drawing.Size(4, 4);
this.toprightcorner.TabIndex = 6;
- this.toprightcorner.MouseDown += new System.Windows.Forms.MouseEventHandler(border_MouseDown);
+ this.toprightcorner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.border_MouseDown);
//
// bottomrightcorner
//
@@ -170,7 +170,7 @@
this.bottomrightcorner.Name = "bottomrightcorner";
this.bottomrightcorner.Size = new System.Drawing.Size(4, 4);
this.bottomrightcorner.TabIndex = 4;
- this.bottomrightcorner.MouseDown += new System.Windows.Forms.MouseEventHandler(border_MouseDown);
+ this.bottomrightcorner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.border_MouseDown);
//
// bottomleftcorner
//
@@ -180,7 +180,7 @@
this.bottomleftcorner.Name = "bottomleftcorner";
this.bottomleftcorner.Size = new System.Drawing.Size(4, 4);
this.bottomleftcorner.TabIndex = 2;
- this.bottomleftcorner.MouseDown += new System.Windows.Forms.MouseEventHandler(border_MouseDown);
+ this.bottomleftcorner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.border_MouseDown);
//
// topleftcorner
//
@@ -189,7 +189,7 @@
this.topleftcorner.Name = "topleftcorner";
this.topleftcorner.Size = new System.Drawing.Size(4, 4);
this.topleftcorner.TabIndex = 1;
- this.topleftcorner.MouseDown += new System.Windows.Forms.MouseEventHandler(border_MouseDown);
+ this.topleftcorner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.border_MouseDown);
//
// left
//
@@ -199,7 +199,7 @@
this.left.Name = "left";
this.left.Size = new System.Drawing.Size(4, 292);
this.left.TabIndex = 3;
- this.left.MouseDown += new System.Windows.Forms.MouseEventHandler(border_MouseDown);
+ this.left.MouseDown += new System.Windows.Forms.MouseEventHandler(this.border_MouseDown);
//
// bottom
//
@@ -211,7 +211,7 @@
this.bottom.Name = "bottom";
this.bottom.Size = new System.Drawing.Size(296, 4);
this.bottom.TabIndex = 5;
- this.bottom.MouseDown += new System.Windows.Forms.MouseEventHandler(border_MouseDown);
+ this.bottom.MouseDown += new System.Windows.Forms.MouseEventHandler(this.border_MouseDown);
//
// right
//
@@ -222,7 +222,7 @@
this.right.Name = "right";
this.right.Size = new System.Drawing.Size(4, 296);
this.right.TabIndex = 7;
- this.right.MouseDown += new System.Windows.Forms.MouseEventHandler(border_MouseDown);
+ this.right.MouseDown += new System.Windows.Forms.MouseEventHandler(this.border_MouseDown);
//
// top
//
@@ -233,7 +233,7 @@
this.top.Name = "top";
this.top.Size = new System.Drawing.Size(300, 4);
this.top.TabIndex = 8;
- this.top.MouseDown += new System.Windows.Forms.MouseEventHandler(border_MouseDown);
+ this.top.MouseDown += new System.Windows.Forms.MouseEventHandler(this.border_MouseDown);
//
// WinClassic
//
@@ -244,6 +244,8 @@
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "WinClassic";
this.Text = "WinClassic";
+ this.Activated += new System.EventHandler(this.WinClassic_Activated);
+ this.Deactivate += new System.EventHandler(this.WinClassic_Deactivate);
this.program.ResumeLayout(false);
this.programtopbar.ResumeLayout(false);
this.programtopbar.PerformLayout();
diff --git a/TimeHACK.Engine/Template/WinClassic.cs b/TimeHACK.Engine/Template/WinClassic.cs
index 55ebb9a..3f69115 100644
--- a/TimeHACK.Engine/Template/WinClassic.cs
+++ b/TimeHACK.Engine/Template/WinClassic.cs
@@ -13,9 +13,10 @@ namespace TimeHACK.Engine.Template
DoubleBuffered = true;
}
- public System.Drawing.Font fnt;
+ public Font fnt;
public bool closeDisabled = false;
+ public bool isActive = true;
public const int WM_NCLBUTTONDOWN = 0xA1;
public const int WM_SYSCOMMAND = 0x0112;
@@ -51,6 +52,20 @@ namespace TimeHACK.Engine.Template
if (!closeDisabled) this.Close();
}
+ private void WinClassic_Activated(object sender, EventArgs e)
+ {
+ isActive = true;
+ programtopbar.BackColor = SaveSystem.currentTheme.activeTitleBarColor;
+ Title.ForeColor = SaveSystem.currentTheme.activeTitleTextColor;
+ }
+
+ private void WinClassic_Deactivate(object sender, EventArgs e)
+ {
+ isActive = false;
+ programtopbar.BackColor = SaveSystem.currentTheme.inactiveTitleBarColor;
+ Title.ForeColor = SaveSystem.currentTheme.inactiveTitleTextColor;
+ }
+
public bool max = false;
private void maximizebutton_Click(object sender, EventArgs e)
diff --git a/TimeHACK.Engine/Theme.cs b/TimeHACK.Engine/Theme.cs
index 8e75756..43d9661 100644
--- a/TimeHACK.Engine/Theme.cs
+++ b/TimeHACK.Engine/Theme.cs
@@ -19,6 +19,11 @@ namespace TimeHACK.Engine
public Stream progErrorSound { get; set; }
public Stream questionSound { get; set; }
+ public Color activeTitleBarColor { get; set; }
+ public Color activeTitleTextColor { get; set; }
+ public Color inactiveTitleBarColor { get; set; }
+ public Color inactiveTitleTextColor { get; set; }
+
public Image defaultWallpaper { get; set; }
public string themeName { get; set; }
@@ -37,6 +42,11 @@ namespace TimeHACK.Engine
progErrorSound = Properties.Resources.CHORD;
questionSound = Properties.Resources.CHORD;
+ activeTitleBarColor = Color.Navy;
+ activeTitleTextColor = Color.White;
+ inactiveTitleBarColor = Color.Gray;
+ inactiveTitleTextColor = Color.Silver;
+
defaultWallpaper = null;
themeName = "default95";
}
@@ -73,6 +83,11 @@ namespace TimeHACK.Engine
progErrorSound = Properties.Resources.Win95PlusDangerousCreaturesProgError;
questionSound = Properties.Resources.Win95PlusDangerousCreaturesQuestion;
+ activeTitleBarColor = Color.Teal;
+ activeTitleTextColor = Color.White;
+ inactiveTitleBarColor = Color.FromArgb(72, 72, 72);
+ inactiveTitleTextColor = Color.Gray;
+
defaultWallpaper = Properties.Resources.Win95PlusDangerousCreaturesWallpaper;
themeName = "dangeranimals";
}
@@ -85,6 +100,13 @@ namespace TimeHACK.Engine
startSound = Properties.Resources.Win95PlusInsideComputerStart;
stopSound = Properties.Resources.Win95PlusInsideComputerStop;
+ asteriskSound = Properties.Resources.Win95PlusInsideComputerAsterisk;
+
+ activeTitleBarColor = Color.FromArgb(224, 0, 0);
+ activeTitleTextColor = Color.White;
+ inactiveTitleBarColor = Color.FromArgb(96, 168, 128);
+ inactiveTitleTextColor = Color.FromArgb(216, 224, 216);
+
defaultWallpaper = Properties.Resources.Win95PlusInsideComputerWallpaper;
themeName = "insidepc";
}
diff --git a/TimeHACK.Engine/TimeHACK.Engine.csproj b/TimeHACK.Engine/TimeHACK.Engine.csproj
index a176c81..f326107 100644
--- a/TimeHACK.Engine/TimeHACK.Engine.csproj
+++ b/TimeHACK.Engine/TimeHACK.Engine.csproj
@@ -123,6 +123,7 @@
<None Include="Resources\Win95PlusDangerousCreaturesExclamation.wav" />
<None Include="Resources\Win95PlusDangerousCreaturesProgError.wav" />
<None Include="Resources\Win95PlusDangerousCreaturesQuestion.wav" />
+ <None Include="Resources\Win95PlusInsideComputerAsterisk.wav" />
<Content Include="Resources\WinClassic\Window\BottomLeft.png" />
<Content Include="Resources\WinClassic\Window\BottomRight.png" />
<Content Include="Resources\WinClassic\Window\BottomSide.png" />
diff --git a/TimeHACK.Engine/WindowManager.cs b/TimeHACK.Engine/WindowManager.cs
index 4aa82d7..da1b5dd 100644
--- a/TimeHACK.Engine/WindowManager.cs
+++ b/TimeHACK.Engine/WindowManager.cs
@@ -51,7 +51,8 @@ namespace TimeHACK.Engine
app.minimizebutton.Location = new Point(app.minimizebutton.Location.X, app.minimizebutton.Location.Y);
}
- // Time for the taskbar
+ // Time for the colors
+ app.programtopbar.BackColor = SaveSystem.currentTheme.activeTitleBarColor;
// Convert an image to an icon (for the taskbar)
if (icon != null)