Added font color change on hover

This commit is contained in:
lempamo 2017-07-04 13:06:27 -04:00
parent b2314e66f0
commit 3a897bb535
2 changed files with 416 additions and 397 deletions

View file

@ -36,7 +36,26 @@ public Windows95()
{
InitializeComponent();
startmenu.Paint += (sender, args) => Engine.Paintbrush.PaintClassicBorders(sender, args, 2);
foreach (ToolStripMenuItem item in startmenuitems.Items)
{
item.MouseEnter += new EventHandler(MenuItem_MouseEnter);
item.MouseLeave += new EventHandler(MenuItem_MouseLeave);
}
foreach (ToolStripMenuItem item in ProgramsToolStripMenuItem.DropDown.Items)
{
item.MouseEnter += new EventHandler(MenuItem_MouseEnter);
item.MouseLeave += new EventHandler(MenuItem_MouseLeave);
}
}
private void MenuItem_MouseEnter(object sender, EventArgs e)
{
((ToolStripMenuItem)sender).ForeColor = Color.White;
}
private void MenuItem_MouseLeave(object sender, EventArgs e)
{
((ToolStripMenuItem)sender).ForeColor = Color.Black;
}
// When New Game is clicked in TitleScreen.cs
@ -44,6 +63,7 @@ private void Desktop_Load(object sender, EventArgs e)
{
//Start Menu Color
startmenuitems.Renderer = new MyRenderer();
ProgramsToolStripMenuItem.DropDown.Renderer = new MyRenderer();
// Make Font Mandatory
fontLoad();
@ -377,19 +397,19 @@ public class MyColors : ProfessionalColorTable
{
public override Color MenuItemSelectedGradientBegin
{
get { return Color.Blue; }
get { return Color.Navy; }
}
public override Color MenuItemSelectedGradientEnd
{
get { return Color.Blue; }
get { return Color.Navy; }
}
public override Color MenuItemPressedGradientBegin
{
get { return Color.Blue; }
get { return Color.Navy; }
}
public override Color MenuItemPressedGradientEnd
{
get { return Color.Blue; }
get { return Color.Navy; }
}
}
}

View file

@ -38,7 +38,6 @@ private void WinClassicIE4_Load(object sender, EventArgs e)
private void hidePrograms()
{
googlemain.Hide();
googleprototype.Hide();
googlealpha.Hide();
padamsmain.Hide();
hotmailmain.Hide();