Add default font bundling (optional) and setup UI Style to match editor logic
#641
This commit is contained in:
@@ -278,19 +278,30 @@ namespace FlaxEngine
|
||||
BackgroundNormal = Color.FromBgra(0xFF3F3F46),
|
||||
BorderNormal = Color.FromBgra(0xFF54545C),
|
||||
TextBoxBackground = Color.FromBgra(0xFF333337),
|
||||
ProgressNormal = Color.FromBgra(0xFF0ad328),
|
||||
TextBoxBackgroundSelected = Color.FromBgra(0xFF3F3F46),
|
||||
CollectionBackgroundColor = Color.FromBgra(0x14CCCCCC),
|
||||
SharedTooltip = new Tooltip(),
|
||||
Statusbar = new Style.StatusbarStyle()
|
||||
ProgressNormal = Color.FromBgra(0xFF0ad328),
|
||||
Statusbar = new Style.StatusbarStyle
|
||||
{
|
||||
PlayMode = Color.FromBgra(0xFF2F9135),
|
||||
Failed = Color.FromBgra(0xFF9C2424),
|
||||
Loading = Color.FromBgra(0xFF2D2D30)
|
||||
}
|
||||
Loading = Color.FromBgra(0xFF2D2D30),
|
||||
},
|
||||
|
||||
SharedTooltip = new Tooltip(),
|
||||
};
|
||||
style.DragWindow = style.BackgroundSelected * 0.7f;
|
||||
|
||||
// Use optionally bundled default font (matches Editor)
|
||||
var defaultFont = Content.LoadAsyncInternal<FontAsset>("Editor/Fonts/Roboto-Regular");
|
||||
if (defaultFont)
|
||||
{
|
||||
style.FontTitle = defaultFont.CreateFont(18);
|
||||
style.FontLarge = defaultFont.CreateFont(14);
|
||||
style.FontMedium = defaultFont.CreateFont(9);
|
||||
style.FontSmall = defaultFont.CreateFont(9);
|
||||
}
|
||||
|
||||
Style.Current = style;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user