mirror of
https://github.com/HistacomUnity/Histacom2-old.git
synced 2025-01-22 17:12:56 -05:00
Merge pull request #113 from jtsshieh/master
Added Start Menu Hover Colors
This commit is contained in:
commit
d30d21eceb
1 changed files with 31 additions and 2 deletions
|
@ -13,6 +13,8 @@
|
|||
|
||||
namespace TimeHACK.OS.Win95
|
||||
{
|
||||
|
||||
|
||||
public partial class Windows95 : Form
|
||||
{
|
||||
private SoundPlayer startsound;
|
||||
|
@ -34,14 +36,17 @@ public Windows95()
|
|||
{
|
||||
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 @@ private void MSDOSPromptToolStripMenuItem1_Click (object sender, EventArgs e)
|
|||
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; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue