Merge branch 'ThePhantomMask-Improve-HighlightedPopUpColor'

This commit is contained in:
Wojtek Figat
2026-03-12 22:54:54 +01:00
3 changed files with 7 additions and 1 deletions

View File

@@ -106,6 +106,7 @@ namespace FlaxEditor.Windows
"Chandler Cox",
"Ari Vuollet",
"Vincent Saarmann",
"Michael Salvini",
});
authors.Sort();
var authorsLabel = new Label(4, topParentControl.Bottom + 20, Width - 8, 70)

View File

@@ -82,6 +82,11 @@ namespace FlaxEngine
}
}
/// <summary>
/// Gets the brightness of the color
/// </summary>
public float Brightness => R * 0.299f + G * 0.587f + B * 0.114f;
/// <summary>
/// Returns the minimum color component value: Min(r,g,b).
/// </summary>

View File

@@ -595,7 +595,7 @@ namespace FlaxEngine.GUI
Size = new Float2(size.X - margin, size.Y),
Font = Font,
TextColor = TextColor * 0.9f,
TextColorHighlighted = TextColorHighlighted,
TextColorHighlighted = TextColorHighlighted.Brightness < 0.05f ? Color.Lerp(TextColorHighlighted, Color.White, 0.3f) : TextColorHighlighted,
HorizontalAlignment = HorizontalAlignment,
VerticalAlignment = VerticalAlignment,
Text = _items[i],