Changed mouse hover events for some controls

This commit is contained in:
Travis Nickles 2018-08-01 04:03:42 -05:00
parent 0fc4cb1e32
commit bd48966c7d

View File

@ -409,13 +409,28 @@ namespace DS4Windows
foreach (Control control in fLPSettings.Controls) foreach (Control control in fLPSettings.Controls)
{ {
string tempst;
if (control.HasChildren) if (control.HasChildren)
{ {
foreach (Control ctrl in control.Controls) foreach (Control ctrl in control.Controls)
{
if (hoverTextDict.TryGetValue(ctrl, out tempst))
{
ctrl.MouseHover += Items_MouseHover; ctrl.MouseHover += Items_MouseHover;
} }
else
control.MouseHover += Items_MouseHover; {
ctrl.MouseHover += ClearLastMessage;
}
}
}
else
{
if (hoverTextDict.TryGetValue(control, out tempst))
control.MouseEnter += Items_MouseHover;
else
control.MouseHover += ClearLastMessage;
}
} }
} }
@ -447,6 +462,12 @@ namespace DS4Windows
g.DrawImage(shield, new Rectangle(0, 0, finalWidth, finalHeight)); g.DrawImage(shield, new Rectangle(0, 0, finalWidth, finalHeight));
} }
private void ClearLastMessage(object sender, EventArgs e)
{
lbLastMessage.Text = "";
lbLastMessage.ForeColor = SystemColors.GrayText;
}
private void blankControllerTab() private void blankControllerTab()
{ {
for (int Index = 0, PadsLen = Pads.Length; for (int Index = 0, PadsLen = Pads.Length;