Fix CheckBox to display check state when created in game without editor icon atlas

#3705
This commit is contained in:
Wojtek Figat
2025-10-03 11:25:25 +02:00
parent 1f3f1ea67e
commit 4c640b915f

View File

@@ -181,8 +181,8 @@ namespace FlaxEngine.GUI
ImageColor = style.BorderSelected * 1.2f;
BorderColor = style.BorderNormal;
BorderColorHighlighted = style.BorderSelected;
CheckedImage = new SpriteBrush(style.CheckBoxTick);
IntermediateImage = new SpriteBrush(style.CheckBoxIntermediate);
CheckedImage = style.CheckBoxTick.IsValid ? new SpriteBrush(style.CheckBoxTick) : new SolidColorBrush(style.Foreground);
IntermediateImage = style.CheckBoxIntermediate.IsValid ? new SpriteBrush(style.CheckBoxIntermediate) : new SolidColorBrush(style.ForegroundGrey);
CacheBox();
}