// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using FlaxEngine;
namespace FlaxEditor
{
///
/// Helper collection of Flax Editor in-build asset names.
///
[HideInEditor]
public static class EditorAssets
{
internal class Cache
{
private static MaterialInstance _highlightMaterial;
///
/// Gets the highlight material instance.
///
public static MaterialInstance HighlightMaterialInstance
{
get
{
if (!_highlightMaterial)
{
var material = FlaxEngine.Content.LoadAsyncInternal(HighlightMaterial);
if (material && !material.WaitForLoaded())
{
_highlightMaterial = material.CreateVirtualInstance();
OnEditorOptionsChanged(Editor.Instance.Options.Options);
}
}
return _highlightMaterial;
}
}
public static void OnEditorOptionsChanged(Options.EditorOptions options)
{
if (!_highlightMaterial)
return;
var param = _highlightMaterial.GetParameter("Color");
if (param != null)
param.Value = options.Visual.HighlightColor;
}
}
///
/// The icons atlas.
///
public static string IconsAtlas = "Editor/IconsAtlas";
///
/// The primary font.
///
public static string PrimaryFont = "Editor/Fonts/Roboto-Regular";
///
/// The secondary (fallback) font to use for missing characters rendering (CJK - Chinese/Japanese/Korean characters).
///
public static string FallbackFont = "Editor/Fonts/NotoSansSC-Regular";
///
/// The Inconsolata Regular font.
///
public static string InconsolataRegularFont = "Editor/Fonts/Inconsolata-Regular";
///
/// The window icon.
///
public static string WindowIcon = "Editor/EditorIcon";
///
/// The window icons font.
///
public static string WindowIconsFont = "Editor/Fonts/SegMDL2";
///
/// The default font material.
///
public static string DefaultFontMaterial = "Editor/DefaultFontMaterial";
///
/// The highlight material.
///
public static string HighlightMaterial = "Editor/Highlight Material";
///
/// The highlight terrain material.
///
public static string HighlightTerrainMaterial = "Editor/Terrain/Highlight Terrain Material";
///
/// The terrain circle brush material.
///
public static string TerrainCircleBrushMaterial = "Editor/Terrain/Circle Brush Material";
///
/// The debug material (wireframe).
///
public static string WiresDebugMaterial = "Editor/Wires Debug Material";
///
/// The default sky cube texture.
///
public static string DefaultSkyCubeTexture = "Editor/SimplySky";
///
/// The default sprite material.
///
public static string DefaultSpriteMaterial = "Editor/SpriteMaterial";
///
/// The IES Profile assets preview material.
///
public static string IesProfilePreviewMaterial = "Editor/IesProfilePreviewMaterial";
///
/// The foliage painting brush material.
///
public static string FoliageBrushMaterial = "Editor/Gizmo/FoliageBrushMaterial";
///
/// The model vertex colors preview material.
///
public static string VertexColorsPreviewMaterial = "Editor/Gizmo/VertexColorsPreviewMaterial";
///
/// The Flax icon texture.
///
public static string FlaxIconTexture = "Engine/Textures/FlaxIcon";
///
/// The Flax icon (blue) texture.
///
public static string FlaxIconBlueTexture = "Engine/Textures/FlaxIconBlue";
///
/// The icon lists used by editor from the SegMDL2 font.
///
///
/// Reference: https://docs.microsoft.com/en-us/windows/uwp/design/style/segoe-ui-symbol-font.
///
public enum SegMDL2Icons
{
#pragma warning disable 1591
Cancel = 0xE711,
ChromeMinimize = 0xE921,
ChromeMaximize = 0xE922,
ChromeRestore = 0xE923,
ChromeClose = 0xE8BB,
#pragma warning restore 1591
}
}
}