diff options
| -rw-r--r-- | TimeHACK.Engine/Paintbrush.cs | 22 | ||||
| -rw-r--r-- | TimeHACK.Engine/TimeHACK.Engine.csproj | 1 | ||||
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95.Designer.cs | 2 | ||||
| -rw-r--r-- | TimeHACK.Main/OS/Win98/Win98.Designer.cs | 1 | ||||
| -rw-r--r-- | TimeHACK.Main/TitleScreen.Designer.cs | 2 | ||||
| -rw-r--r-- | TimeHACK.Main/TitleScreen.cs | 10 |
6 files changed, 26 insertions, 12 deletions
diff --git a/TimeHACK.Engine/Paintbrush.cs b/TimeHACK.Engine/Paintbrush.cs new file mode 100644 index 0000000..2b640cf --- /dev/null +++ b/TimeHACK.Engine/Paintbrush.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace TimeHACK.Engine +{ + public class Paintbrush + { + public static void paintClassicBorders(object sender, PaintEventArgs e, int borderwidth) + { + ControlPaint.DrawBorder(e.Graphics, ((Control)sender).ClientRectangle, + SystemColors.ControlLightLight, borderwidth, ButtonBorderStyle.Outset, + SystemColors.ControlLightLight, borderwidth, ButtonBorderStyle.Outset, + SystemColors.ControlLightLight, borderwidth, ButtonBorderStyle.Outset, + SystemColors.ControlLightLight, borderwidth, ButtonBorderStyle.Outset); + } + } +} diff --git a/TimeHACK.Engine/TimeHACK.Engine.csproj b/TimeHACK.Engine/TimeHACK.Engine.csproj index 7ee8e6e..6a2dba4 100644 --- a/TimeHACK.Engine/TimeHACK.Engine.csproj +++ b/TimeHACK.Engine/TimeHACK.Engine.csproj @@ -49,6 +49,7 @@ <None Include="packages.config" /> <None Include="Resources\WinClassic\Window\pjBg6mKP.bin" /> <Compile Include="FileDialogBoxManager.cs" /> + <Compile Include="Paintbrush.cs" /> <Compile Include="SaveSystem.cs" /> <Compile Include="TaskBarController.cs" /> <Compile Include="Template\Win9XBSOD.cs"> diff --git a/TimeHACK.Main/OS/Win95/Win95.Designer.cs b/TimeHACK.Main/OS/Win95/Win95.Designer.cs index 5a35e3d..f963251 100644 --- a/TimeHACK.Main/OS/Win95/Win95.Designer.cs +++ b/TimeHACK.Main/OS/Win95/Win95.Designer.cs @@ -223,7 +223,7 @@ namespace TimeHACK.OS.Win95 this.startmenu.Name = "startmenu"; this.startmenu.Size = new System.Drawing.Size(174, 300); this.startmenu.TabIndex = 3; - this.startmenu.Paint += new System.Windows.Forms.PaintEventHandler(this.startmenu_Paint); + this.startmenu.Paint += (sender, args) => Engine.Paintbrush.paintClassicBorders(sender, args, 2); // // startmenuitems // diff --git a/TimeHACK.Main/OS/Win98/Win98.Designer.cs b/TimeHACK.Main/OS/Win98/Win98.Designer.cs index 72f6e10..d1f66dd 100644 --- a/TimeHACK.Main/OS/Win98/Win98.Designer.cs +++ b/TimeHACK.Main/OS/Win98/Win98.Designer.cs @@ -177,6 +177,7 @@ this.startmenu.Name = "startmenu"; this.startmenu.Size = new System.Drawing.Size(174, 300); this.startmenu.TabIndex = 4; + this.startmenu.Paint += (sender, args) => Engine.Paintbrush.paintClassicBorders(sender, args, 2); // // startmenuitems // diff --git a/TimeHACK.Main/TitleScreen.Designer.cs b/TimeHACK.Main/TitleScreen.Designer.cs index 774f7aa..b71f6f3 100644 --- a/TimeHACK.Main/TitleScreen.Designer.cs +++ b/TimeHACK.Main/TitleScreen.Designer.cs @@ -213,7 +213,7 @@ this.startmenu.Name = "startmenu"; this.startmenu.Size = new System.Drawing.Size(165, 187); this.startmenu.TabIndex = 11; - this.startmenu.Paint += new System.Windows.Forms.PaintEventHandler(this.startmenu_Paint); + this.startmenu.Paint += (sender, args) => Engine.Paintbrush.paintClassicBorders(sender, args, 2); // // startmenuitems // diff --git a/TimeHACK.Main/TitleScreen.cs b/TimeHACK.Main/TitleScreen.cs index d23c1d3..54b680f 100644 --- a/TimeHACK.Main/TitleScreen.cs +++ b/TimeHACK.Main/TitleScreen.cs @@ -48,16 +48,6 @@ namespace TimeHACK InitializeComponent(); } - private void startmenu_Paint(object sender, PaintEventArgs e) - { - // Paint the StartMenu - ControlPaint.DrawBorder(e.Graphics, startmenu.ClientRectangle, - SystemColors.ControlLightLight, 2, ButtonBorderStyle.Outset, - SystemColors.ControlLightLight, 2, ButtonBorderStyle.Outset, - SystemColors.ControlLightLight, 2, ButtonBorderStyle.Outset, - SystemColors.ControlLightLight, 2, ButtonBorderStyle.Outset); - } - public void StartGame() { //TODO: You may want to handle story stuff to decide what OS to boot here. |
