示例#1
0
            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;
                }
            }
示例#2
0
            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;
                    }
                }
            }