From 1a2fc814aa66bd37e935b82ae5640ee880edbbd8 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 31 Oct 2020 17:55:46 +0100 Subject: [PATCH] initialize the tooltip color to white --- MLEM.Ui/Elements/Tooltip.cs | 3 ++- MLEM.Ui/Style/UiStyle.cs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/MLEM.Ui/Elements/Tooltip.cs b/MLEM.Ui/Elements/Tooltip.cs index 5a0a4f6..06279f8 100644 --- a/MLEM.Ui/Elements/Tooltip.cs +++ b/MLEM.Ui/Elements/Tooltip.cs @@ -70,7 +70,8 @@ namespace MLEM.Ui.Elements { base.InitStyle(style); this.Texture.SetFromStyle(style.TooltipBackground); this.MouseOffset.SetFromStyle(style.TooltipOffset); - this.Paragraph?.TextColor.SetFromStyle(style.TooltipTextColor); + // we can't set from style here since it's a different element + this.Paragraph?.TextColor.Set(style.TooltipTextColor); } /// diff --git a/MLEM.Ui/Style/UiStyle.cs b/MLEM.Ui/Style/UiStyle.cs index 18fc30d..601ad89 100644 --- a/MLEM.Ui/Style/UiStyle.cs +++ b/MLEM.Ui/Style/UiStyle.cs @@ -106,7 +106,7 @@ namespace MLEM.Ui.Style { /// /// The color that the text of a should have /// - public Color TooltipTextColor; + public Color TooltipTextColor = Color.White; /// /// The texture that the element uses for its background ///