aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Engine
diff options
context:
space:
mode:
authorlempamo <[email protected]>2017-08-08 10:42:48 -0400
committerlempamo <[email protected]>2017-08-08 10:42:48 -0400
commitebe1b011db93d47b7a29b8b4d1e371b1a97bffce (patch)
tree81408da6b7fd97e36ac8e1a396ce52567b7b5705 /TimeHACK.Engine
parentb33a6b68aeca7cee4f4a9abf6eb012b100a04a39 (diff)
downloadhistacom2-ebe1b011db93d47b7a29b8b4d1e371b1a97bffce.tar.gz
histacom2-ebe1b011db93d47b7a29b8b4d1e371b1a97bffce.tar.bz2
histacom2-ebe1b011db93d47b7a29b8b4d1e371b1a97bffce.zip
custom minesweeper tables AND painted separators
Diffstat (limited to 'TimeHACK.Engine')
-rw-r--r--TimeHACK.Engine/Paintbrush.cs19
1 files changed, 18 insertions, 1 deletions
diff --git a/TimeHACK.Engine/Paintbrush.cs b/TimeHACK.Engine/Paintbrush.cs
index 087b87f..a8a6b54 100644
--- a/TimeHACK.Engine/Paintbrush.cs
+++ b/TimeHACK.Engine/Paintbrush.cs
@@ -10,7 +10,6 @@ namespace TimeHACK.Engine
{
public class Paintbrush
{
-
public static void PaintClassicBorders(object sender, PaintEventArgs e, int borderwidth)
{
ControlPaint.DrawBorder(e.Graphics, ((Control)sender).ClientRectangle,
@@ -28,5 +27,23 @@ namespace TimeHACK.Engine
Color.White, borderwidth, ButtonBorderStyle.Solid,
Color.White, borderwidth, ButtonBorderStyle.Solid);
}
+
+ public static void ExtendedToolStripSeparator_Paint(object sender, PaintEventArgs e)
+ {
+ // Get the separator's width and height.
+ ToolStripSeparator toolStripSeparator = (ToolStripSeparator)sender;
+ int width = toolStripSeparator.Width;
+ int height = toolStripSeparator.Height;
+
+ // Choose the colors for drawing.
+ Color foreColor = Color.Gray;
+ Color backColor = Color.Silver;
+
+ // Fill the background.
+ e.Graphics.FillRectangle(new SolidBrush(backColor), 0, 0, width, height);
+
+ // Draw the line.
+ e.Graphics.DrawLine(new Pen(foreColor), 4, height / 2, width - 4, height / 2);
+ }
}
}