From f3dffa49f43f5a66580a1fac4300be494b178369 Mon Sep 17 00:00:00 2001 From: jtsshieh Date: Mon, 3 Jul 2017 15:33:02 -0400 Subject: Added Start Menu Hover Colors Added the start menu hover background color to match the real one (blue, not light blue) but i am unsure how to change to the text color to make it more readable --- TimeHACK.Main/OS/Win95/Win95.cs | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/TimeHACK.Main/OS/Win95/Win95.cs b/TimeHACK.Main/OS/Win95/Win95.cs index 9dbc395..b8970d4 100644 --- a/TimeHACK.Main/OS/Win95/Win95.cs +++ b/TimeHACK.Main/OS/Win95/Win95.cs @@ -13,6 +13,8 @@ using TimeHACK.OS.Win95.Win95Apps.Story; namespace TimeHACK.OS.Win95 { + + public partial class Windows95 : Form { private SoundPlayer startsound; @@ -34,14 +36,17 @@ namespace TimeHACK.OS.Win95 { InitializeComponent(); startmenu.Paint += (sender, args) => Engine.Paintbrush.PaintClassicBorders(sender, args, 2); + } // When New Game is clicked in TitleScreen.cs private void Desktop_Load(object sender, EventArgs e) { + //Start Menu Color + startmenuitems.Renderer = new MyRenderer(); // Make Font Mandatory fontLoad(); - + // Play Windows 95 Start Sound Stream audio = Properties.Resources.Win95Start; startsound = new SoundPlayer(audio); @@ -363,5 +368,29 @@ namespace TimeHACK.OS.Win95 startmenu.Hide(); } } -} + public class MyRenderer : ToolStripProfessionalRenderer + { + public MyRenderer() : base(new MyColors()) { } + } + + public class MyColors : ProfessionalColorTable + { + public override Color MenuItemSelectedGradientBegin + { + get { return Color.Blue; } + } + public override Color MenuItemSelectedGradientEnd + { + get { return Color.Blue; } + } + public override Color MenuItemPressedGradientBegin + { + get { return Color.Blue; } + } + public override Color MenuItemPressedGradientEnd + { + get { return Color.Blue; } + } + } + } -- cgit v1.2.3