private void GainFocus(object sender, EventArgs args) { if (UseFocusFormatting) { if (!MouseInput.IsMousedOver) { lastBackgroundColor = Color; lastTextColor = name.Format.Color; } Color = FocusColor; name.TextBoard.SetFormatting(name.Format.WithColor(FocusTextColor)); divider.Color = FocusTextColor.SetAlphaPct(0.8f); arrow.Color = FocusTextColor; } }
protected override void CursorExit(object sender, EventArgs args) { if (HighlightEnabled) { if (UseFocusFormatting && MouseInput.HasFocus) { Color = FocusColor; name.TextBoard.SetFormatting(name.Format.WithColor(FocusTextColor)); divider.Color = FocusTextColor.SetAlphaPct(0.8f); arrow.Color = FocusTextColor; } else { Color = lastBackgroundColor; name.TextBoard.SetFormatting(name.Format.WithColor(lastTextColor)); divider.Color = lastTextColor.SetAlphaPct(0.8f); arrow.Color = lastTextColor; } } }