Exemple #1
0
        public override void DrawListItem(GuiRenderer renderer, StringList stringList, Rectangle bounds, bool isActive, bool isHovered,
                                          string text)
        {
            if (isActive)
            {
                DrawSelectionBox(renderer, bounds, SelectionStyle.ItemActive);
            }
            else if (isHovered)
            {
                DrawSelectionBox(renderer, bounds, SelectionStyle.ItemHover);
            }

            var color = ((isActive ? stringList.ItemsActiveColor : stringList.ItemsColor) ?? StyleColor.Default)
                        .GetColor(isActive ? Color.White : Color.Black);
            var font = stringList.Font.GetFont(this.GetFont(stringList));

            renderer.DrawString(font, text, bounds.Location, color);
        }