Initial Setup
Expose all settings as individual items and overhaul all icons. Sorted all SpriteHandle fields alphabetically.
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
|
||||
|
||||
using System;
|
||||
using FlaxEngine;
|
||||
|
||||
namespace FlaxEditor.Content
|
||||
{
|
||||
/// <summary>
|
||||
/// Content item that contains <see cref="FlaxEditor.Content.Settings.AndroidPlatformSettings"/> data.
|
||||
/// </summary>
|
||||
/// <seealso cref="FlaxEditor.Content.JsonAssetItem" />
|
||||
public sealed class AndroidPlatformSettingsItem : JsonAssetItem
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="AndroidPlatformSettingsItem"/> class.
|
||||
/// </summary>
|
||||
/// <param name="path">The asset path.</param>
|
||||
/// <param name="id">The asset identifier.</param>
|
||||
/// <param name="typeName"></param>
|
||||
public AndroidPlatformSettingsItem(string path, Guid id, string typeName)
|
||||
: base(path, id, typeName)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override SpriteHandle DefaultThumbnail => Editor.Instance.Icons.AndroidSettings;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
|
||||
|
||||
using System;
|
||||
using FlaxEngine;
|
||||
|
||||
namespace FlaxEditor.Content
|
||||
{
|
||||
/// <summary>
|
||||
/// Content item that contains <see cref="FlaxEditor.Content.Settings.GameSettings"/> data.
|
||||
/// </summary>
|
||||
/// <seealso cref="FlaxEditor.Content.JsonAssetItem" />
|
||||
public sealed class AudioSettingsItem : JsonAssetItem
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="AudioSettingsItem"/> class.
|
||||
/// </summary>
|
||||
/// <param name="path">The asset path.</param>
|
||||
/// <param name="id">The asset identifier.</param>
|
||||
/// <param name="typeName"></param>
|
||||
public AudioSettingsItem(string path, Guid id, string typeName)
|
||||
: base(path, id, typeName)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override SpriteHandle DefaultThumbnail => Editor.Instance.Icons.AudioSettings;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
|
||||
|
||||
using System;
|
||||
using FlaxEngine;
|
||||
|
||||
namespace FlaxEditor.Content
|
||||
{
|
||||
/// <summary>
|
||||
/// Content item that contains <see cref="FlaxEditor.Content.Settings.BuildSettings"/> data.
|
||||
/// </summary>
|
||||
/// <seealso cref="FlaxEditor.Content.JsonAssetItem" />
|
||||
public sealed class BuildSettingsItem : JsonAssetItem
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="BuildSettingsItem"/> class.
|
||||
/// </summary>
|
||||
/// <param name="path">The asset path.</param>
|
||||
/// <param name="id">The asset identifier.</param>
|
||||
/// <param name="typeName"></param>
|
||||
public BuildSettingsItem(string path, Guid id, string typeName)
|
||||
: base(path, id, typeName)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override SpriteHandle DefaultThumbnail => Editor.Instance.Icons.BuildSettings;
|
||||
}
|
||||
}
|
||||
28
Source/Editor/Content/Items/SettingsItem/GameSettingsItem.cs
Normal file
28
Source/Editor/Content/Items/SettingsItem/GameSettingsItem.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
|
||||
|
||||
using System;
|
||||
using FlaxEngine;
|
||||
|
||||
namespace FlaxEditor.Content
|
||||
{
|
||||
/// <summary>
|
||||
/// Content item that contains <see cref="FlaxEditor.Content.Settings.GameSettings"/> data.
|
||||
/// </summary>
|
||||
/// <seealso cref="FlaxEditor.Content.JsonAssetItem" />
|
||||
public sealed class GameSettingsItem : JsonAssetItem
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GameSettingsItem"/> class.
|
||||
/// </summary>
|
||||
/// <param name="path">The asset path.</param>
|
||||
/// <param name="id">The asset identifier.</param>
|
||||
/// <param name="typeName"></param>
|
||||
public GameSettingsItem(string path, Guid id, string typeName)
|
||||
: base(path, id, typeName)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override SpriteHandle DefaultThumbnail => Editor.Instance.Icons.Document64;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
|
||||
|
||||
using System;
|
||||
using FlaxEngine;
|
||||
|
||||
namespace FlaxEditor.Content
|
||||
{
|
||||
/// <summary>
|
||||
/// Content item that contains <see cref="FlaxEditor.Content.Settings.GraphicsSettings"/> data.
|
||||
/// </summary>
|
||||
/// <seealso cref="FlaxEditor.Content.JsonAssetItem" />
|
||||
public sealed class GraphicsSettingsItem : JsonAssetItem
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GraphicsSettingsItem"/> class.
|
||||
/// </summary>
|
||||
/// <param name="path">The asset path.</param>
|
||||
/// <param name="id">The asset identifier.</param>
|
||||
/// <param name="typeName"></param>
|
||||
public GraphicsSettingsItem(string path, Guid id, string typeName)
|
||||
: base(path, id, typeName)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override SpriteHandle DefaultThumbnail => Editor.Instance.Icons.Document64;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
|
||||
|
||||
using System;
|
||||
using FlaxEngine;
|
||||
|
||||
namespace FlaxEditor.Content
|
||||
{
|
||||
/// <summary>
|
||||
/// Content item that contains <see cref="FlaxEditor.Content.Settings.InputSettings"/> data.
|
||||
/// </summary>
|
||||
/// <seealso cref="FlaxEditor.Content.JsonAssetItem" />
|
||||
public sealed class InputSettingsItem : JsonAssetItem
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InputSettingsItem"/> class.
|
||||
/// </summary>
|
||||
/// <param name="path">The asset path.</param>
|
||||
/// <param name="id">The asset identifier.</param>
|
||||
/// <param name="typeName"></param>
|
||||
public InputSettingsItem(string path, Guid id, string typeName)
|
||||
: base(path, id, typeName)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override SpriteHandle DefaultThumbnail => Editor.Instance.Icons.InputSettings;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
|
||||
|
||||
using System;
|
||||
using FlaxEngine;
|
||||
|
||||
namespace FlaxEditor.Content
|
||||
{
|
||||
/// <summary>
|
||||
/// Content item that contains <see cref="FlaxEditor.Content.Settings.LayersAndTagsSettings"/> data.
|
||||
/// </summary>
|
||||
/// <seealso cref="FlaxEditor.Content.JsonAssetItem" />
|
||||
public sealed class LayersAndTagsSettingsItem : JsonAssetItem
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LayersAndTagsSettingsItem"/> class.
|
||||
/// </summary>
|
||||
/// <param name="path">The asset path.</param>
|
||||
/// <param name="id">The asset identifier.</param>
|
||||
/// <param name="typeName"></param>
|
||||
public LayersAndTagsSettingsItem(string path, Guid id, string typeName)
|
||||
: base(path, id, typeName)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override SpriteHandle DefaultThumbnail => Editor.Instance.Icons.LayersAndTagsSettings;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
|
||||
|
||||
using System;
|
||||
using FlaxEngine;
|
||||
|
||||
namespace FlaxEditor.Content
|
||||
{
|
||||
/// <summary>
|
||||
/// Content item that contains <see cref="FlaxEditor.Content.Settings.LinuxPlatformSettings"/> data.
|
||||
/// </summary>
|
||||
/// <seealso cref="FlaxEditor.Content.JsonAssetItem" />
|
||||
public sealed class LinuxPlatformSettingsItem : JsonAssetItem
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LinuxPlatformSettingsItem"/> class.
|
||||
/// </summary>
|
||||
/// <param name="path">The asset path.</param>
|
||||
/// <param name="id">The asset identifier.</param>
|
||||
/// <param name="typeName">Name of the resource type.</param>
|
||||
public LinuxPlatformSettingsItem(string path, Guid id, string typeName)
|
||||
: base(path, id, typeName)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override SpriteHandle DefaultThumbnail => Editor.Instance.Icons.LinuxSettings;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
|
||||
|
||||
using System;
|
||||
using FlaxEngine;
|
||||
|
||||
namespace FlaxEditor.Content
|
||||
{
|
||||
/// <summary>
|
||||
/// Content item that contains <see cref="FlaxEditor.Content.Settings.NavigationSettings"/> data.
|
||||
/// </summary>
|
||||
/// <seealso cref="FlaxEditor.Content.JsonAssetItem" />
|
||||
public sealed class NavigationSettingsItem : JsonAssetItem
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="NavigationSettingsItem"/> class.
|
||||
/// </summary>
|
||||
/// <param name="path">The asset path.</param>
|
||||
/// <param name="id">The asset identifier.</param>
|
||||
/// <param name="typeName"></param>
|
||||
public NavigationSettingsItem(string path, Guid id, string typeName)
|
||||
: base(path, id, typeName)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override SpriteHandle DefaultThumbnail => Editor.Instance.Icons.NavigationSettings;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
|
||||
|
||||
using System;
|
||||
using FlaxEngine;
|
||||
|
||||
namespace FlaxEditor.Content
|
||||
{
|
||||
/// <summary>
|
||||
/// Content item that contains <see cref="FlaxEditor.Content.Settings.PhysicsSettings"/> data.
|
||||
/// </summary>
|
||||
/// <seealso cref="FlaxEditor.Content.JsonAssetItem" />
|
||||
public sealed class PhysicsSettingsItem : JsonAssetItem
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="PhysicsSettingsItem"/> class.
|
||||
/// </summary>
|
||||
/// <param name="path">The asset path.</param>
|
||||
/// <param name="id">The asset identifier.</param>
|
||||
/// <param name="typeName"></param>
|
||||
public PhysicsSettingsItem(string path, Guid id, string typeName)
|
||||
: base(path, id, typeName)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override SpriteHandle DefaultThumbnail => Editor.Instance.Icons.PhysicsSettings;
|
||||
}
|
||||
}
|
||||
28
Source/Editor/Content/Items/SettingsItem/TimeSettingsItem.cs
Normal file
28
Source/Editor/Content/Items/SettingsItem/TimeSettingsItem.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
|
||||
|
||||
using System;
|
||||
using FlaxEngine;
|
||||
|
||||
namespace FlaxEditor.Content
|
||||
{
|
||||
/// <summary>
|
||||
/// Content item that contains <see cref="FlaxEditor.Content.Settings.TimeSettings"/> data.
|
||||
/// </summary>
|
||||
/// <seealso cref="FlaxEditor.Content.JsonAssetItem" />
|
||||
public sealed class TimeSettingsItem : JsonAssetItem
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TimeSettingsItem"/> class.
|
||||
/// </summary>
|
||||
/// <param name="path">The asset path.</param>
|
||||
/// <param name="id">The asset identifier.</param>
|
||||
/// <param name="typeName"></param>
|
||||
public TimeSettingsItem(string path, Guid id, string typeName)
|
||||
: base(path, id, typeName)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override SpriteHandle DefaultThumbnail => Editor.Instance.Icons.Document64;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
|
||||
|
||||
using System;
|
||||
using FlaxEngine;
|
||||
|
||||
namespace FlaxEditor.Content
|
||||
{
|
||||
/// <summary>
|
||||
/// Content item that contains <see cref="FlaxEditor.Content.Settings.UWPPlatformSettings"/> data.
|
||||
/// </summary>
|
||||
/// <seealso cref="FlaxEditor.Content.JsonAssetItem" />
|
||||
public sealed class UWPPlatformSettingsItem : JsonAssetItem
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="UWPPlatformSettingsItem"/> class.
|
||||
/// </summary>
|
||||
/// <param name="path">The asset path.</param>
|
||||
/// <param name="id">The asset identifier.</param>
|
||||
/// <param name="typeName">Name of the resource type.</param>
|
||||
public UWPPlatformSettingsItem(string path, Guid id, string typeName)
|
||||
: base(path, id, typeName)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override SpriteHandle DefaultThumbnail => Editor.Instance.Icons.UWPSettings;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
|
||||
|
||||
using System;
|
||||
using FlaxEngine;
|
||||
|
||||
namespace FlaxEditor.Content
|
||||
{
|
||||
/// <summary>
|
||||
/// Content item that contains <see cref="FlaxEditor.Content.Settings.WindowsPlatformSettings"/> data.
|
||||
/// </summary>
|
||||
/// <seealso cref="FlaxEditor.Content.JsonAssetItem" />
|
||||
public sealed class WindowsPlatformSettingsItem : JsonAssetItem
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="WindowsPlatformSettingsItem"/> class.
|
||||
/// </summary>
|
||||
/// <param name="path">The asset path.</param>
|
||||
/// <param name="id">The asset identifier.</param>
|
||||
/// <param name="typeName">Name of the resource type.</param>
|
||||
public WindowsPlatformSettingsItem(string path, Guid id, string typeName)
|
||||
: base(path, id, typeName)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override SpriteHandle DefaultThumbnail => Editor.Instance.Icons.WindowsSettings;
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
using System;
|
||||
using FlaxEditor.Content.Create;
|
||||
using FlaxEditor.Content.Settings;
|
||||
using FlaxEditor.Modules;
|
||||
|
||||
namespace FlaxEditor.Content
|
||||
{
|
||||
@@ -44,6 +45,28 @@ namespace FlaxEditor.Content
|
||||
Editor.Instance.ContentImporting.Create(new SettingsCreateEntry(outputPath));
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override AssetItem ConstructItem(string path, string typeName, ref Guid id)
|
||||
{
|
||||
switch (typeName.Substring(typeName.LastIndexOf('.')+1))
|
||||
{
|
||||
case "GameSettings": return new GameSettingsItem(path, id, typeName);
|
||||
case "AndroidPlatformSettings": return new AndroidPlatformSettingsItem(path, id, typeName);
|
||||
case "AudioSettings": return new AudioSettingsItem(path, id, typeName);
|
||||
case "BuildSettings": return new BuildSettingsItem(path, id, typeName);
|
||||
case "GraphicsSettings": return new GraphicsSettingsItem(path, id, typeName);
|
||||
case "InputSettings": return new InputSettingsItem(path, id, typeName);
|
||||
case "LayersAndTagsSettings": return new LayersAndTagsSettingsItem(path, id, typeName);
|
||||
case "LinuxPlatformSettings": return new LinuxPlatformSettingsItem(path, id, typeName);
|
||||
case "NavigationSettings": return new NavigationSettingsItem(path, id, typeName);
|
||||
case "PhysicsSettings": return new PhysicsSettingsItem(path, id, typeName);
|
||||
case "TimeSettings": return new TimeSettingsItem(path, id, typeName);
|
||||
case "UWPPlatformSettings": return new UWPPlatformSettingsItem(path, id, typeName);
|
||||
case "WindowsPlatformSettings": return new WindowsPlatformSettingsItem(path, id, typeName);
|
||||
}
|
||||
return base.ConstructItem(path, typeName, ref id);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool IsProxyFor<T>()
|
||||
{
|
||||
|
||||
@@ -220,7 +220,7 @@ namespace FlaxEditor
|
||||
GameProject = ProjectInfo.Load(Internal_GetProjectPath());
|
||||
|
||||
Icons = new EditorIcons();
|
||||
Icons.GetIcons();
|
||||
Icons.LoadIcons();
|
||||
|
||||
// Create common editor modules
|
||||
RegisterModule(Options = new OptionsModule(this));
|
||||
|
||||
@@ -16,102 +16,120 @@ namespace FlaxEditor
|
||||
[HideInEditor]
|
||||
public sealed class EditorIcons
|
||||
{
|
||||
public SpriteHandle FolderClosed12;
|
||||
public SpriteHandle FolderOpened12;
|
||||
public SpriteHandle DragBar12;
|
||||
// 12px
|
||||
public SpriteHandle ArrowDown12;
|
||||
public SpriteHandle ArrowRight12;
|
||||
public SpriteHandle Search12;
|
||||
public SpriteHandle Settings12;
|
||||
public SpriteHandle Cross12;
|
||||
public SpriteHandle CheckBoxIntermediate12;
|
||||
public SpriteHandle CheckBoxTick12;
|
||||
public SpriteHandle Cross12;
|
||||
public SpriteHandle DragBar12;
|
||||
public SpriteHandle FolderClosed12;
|
||||
public SpriteHandle FolderOpened12;
|
||||
public SpriteHandle Search12;
|
||||
public SpriteHandle Settings12;
|
||||
public SpriteHandle StatusBarSizeGrip12;
|
||||
|
||||
// 16px
|
||||
public SpriteHandle ArrowRightBorder16;
|
||||
public SpriteHandle World16;
|
||||
public SpriteHandle ScaleStep16;
|
||||
public SpriteHandle RotateStep16;
|
||||
public SpriteHandle Grid16;
|
||||
public SpriteHandle Translate16;
|
||||
public SpriteHandle Rotate16;
|
||||
public SpriteHandle Scale16;
|
||||
public SpriteHandle Link16;
|
||||
public SpriteHandle Docs16;
|
||||
public SpriteHandle Grid16;
|
||||
public SpriteHandle Link16;
|
||||
public SpriteHandle Rotate16;
|
||||
public SpriteHandle RotateStep16;
|
||||
public SpriteHandle Scale16;
|
||||
public SpriteHandle ScaleStep16;
|
||||
public SpriteHandle Translate16;
|
||||
public SpriteHandle World16;
|
||||
|
||||
public SpriteHandle Save32;
|
||||
public SpriteHandle Undo32;
|
||||
public SpriteHandle Redo32;
|
||||
public SpriteHandle Translate32;
|
||||
public SpriteHandle Rotate32;
|
||||
public SpriteHandle Scale32;
|
||||
public SpriteHandle Play32;
|
||||
public SpriteHandle Pause32;
|
||||
public SpriteHandle Step32;
|
||||
public SpriteHandle Stop32;
|
||||
public SpriteHandle PageScale32;
|
||||
public SpriteHandle Bone32;
|
||||
public SpriteHandle Docs32;
|
||||
public SpriteHandle Import32;
|
||||
// 32px
|
||||
public SpriteHandle AddDoc32;
|
||||
public SpriteHandle RemoveDoc32;
|
||||
public SpriteHandle BracketsSlash32;
|
||||
public SpriteHandle Find32;
|
||||
public SpriteHandle Reload32;
|
||||
public SpriteHandle ArrowDown32;
|
||||
public SpriteHandle ArrowLeft32;
|
||||
public SpriteHandle ArrowRight32;
|
||||
public SpriteHandle ArrowDown32;
|
||||
public SpriteHandle ArrowUp32;
|
||||
public SpriteHandle Bone32;
|
||||
public SpriteHandle BracketsSlash32;
|
||||
public SpriteHandle Build32;
|
||||
public SpriteHandle Camera32;
|
||||
public SpriteHandle Docs32;
|
||||
public SpriteHandle Error32;
|
||||
public SpriteHandle Warning32;
|
||||
public SpriteHandle Info32;
|
||||
public SpriteHandle UV32;
|
||||
public SpriteHandle Find32;
|
||||
public SpriteHandle Image32;
|
||||
public SpriteHandle Import32;
|
||||
public SpriteHandle Info32;
|
||||
public SpriteHandle Link32;
|
||||
public SpriteHandle Next32;
|
||||
public SpriteHandle Camera32;
|
||||
public SpriteHandle Build32;
|
||||
public SpriteHandle PageScale32;
|
||||
public SpriteHandle Pause32;
|
||||
public SpriteHandle Play32;
|
||||
public SpriteHandle Redo32;
|
||||
public SpriteHandle Reload32;
|
||||
public SpriteHandle RemoveDoc32;
|
||||
public SpriteHandle Rotate32;
|
||||
public SpriteHandle Save32;
|
||||
public SpriteHandle Scale32;
|
||||
public SpriteHandle Step32;
|
||||
public SpriteHandle Stop32;
|
||||
public SpriteHandle Translate32;
|
||||
public SpriteHandle Undo32;
|
||||
public SpriteHandle UV32;
|
||||
public SpriteHandle Warning32;
|
||||
|
||||
// 48px
|
||||
public SpriteHandle Add48;
|
||||
public SpriteHandle Paint48;
|
||||
public SpriteHandle Foliage48;
|
||||
public SpriteHandle Mountain48;
|
||||
public SpriteHandle Paint48;
|
||||
|
||||
public SpriteHandle Plugin64;
|
||||
public SpriteHandle Document64;
|
||||
public SpriteHandle CSharpScript64;
|
||||
public SpriteHandle CppScript64;
|
||||
public SpriteHandle Folder64;
|
||||
public SpriteHandle Scene64;
|
||||
// 64px
|
||||
public SpriteHandle CodeScript64;
|
||||
public SpriteHandle CppScript64;
|
||||
public SpriteHandle CSharpScript64;
|
||||
public SpriteHandle Document64;
|
||||
public SpriteHandle Folder64;
|
||||
public SpriteHandle Plugin64;
|
||||
public SpriteHandle Scene64;
|
||||
|
||||
// 128px
|
||||
public SpriteHandle Logo128;
|
||||
|
||||
public SpriteHandle VisjectBoxOpen;
|
||||
public SpriteHandle VisjectBoxClose;
|
||||
// Visject
|
||||
public SpriteHandle VisjectArrowOpen;
|
||||
public SpriteHandle VisjectArrowClose;
|
||||
public SpriteHandle VisjectBoxOpen;
|
||||
public SpriteHandle VisjectBoxClose;
|
||||
|
||||
// Platforms
|
||||
public SpriteHandle Android;
|
||||
public SpriteHandle AssetShadow;
|
||||
public SpriteHandle ColorWheel;
|
||||
public SpriteHandle Windows;
|
||||
public SpriteHandle XboxOne;
|
||||
public SpriteHandle WindowsStore;
|
||||
public SpriteHandle Linux;
|
||||
public SpriteHandle PS4;
|
||||
public SpriteHandle WindowsStore;
|
||||
public SpriteHandle Windows;
|
||||
public SpriteHandle XboxOne;
|
||||
public SpriteHandle XboxSeriesX;
|
||||
public SpriteHandle Android;
|
||||
|
||||
internal void GetIcons()
|
||||
// Settings
|
||||
public SpriteHandle AndroidSettings;
|
||||
public SpriteHandle AudioSettings;
|
||||
public SpriteHandle BuildSettings;
|
||||
public SpriteHandle GameSettings;
|
||||
public SpriteHandle PhysicsSettings;
|
||||
public SpriteHandle GraphicsSettings;
|
||||
public SpriteHandle InputSettings;
|
||||
public SpriteHandle LayersAndTagsSettings;
|
||||
public SpriteHandle LinuxSettings;
|
||||
public SpriteHandle NavigationSettings;
|
||||
public SpriteHandle TimeSettings;
|
||||
public SpriteHandle UWPSettings;
|
||||
public SpriteHandle WindowsSettings;
|
||||
|
||||
internal void LoadIcons()
|
||||
{
|
||||
// Load asset
|
||||
// Load & validate
|
||||
var iconsAtlas = FlaxEngine.Content.LoadAsyncInternal<SpriteAtlas>(EditorAssets.IconsAtlas);
|
||||
if (iconsAtlas == null)
|
||||
{
|
||||
Editor.LogError("Cannot load editor icons atlas.");
|
||||
return;
|
||||
}
|
||||
if (iconsAtlas.WaitForLoaded())
|
||||
if (iconsAtlas == null || iconsAtlas.WaitForLoaded())
|
||||
{
|
||||
Editor.LogError("Failed to load editor icons atlas.");
|
||||
return;
|
||||
@@ -122,11 +140,11 @@ namespace FlaxEditor
|
||||
for (int i = 0; i < fields.Length; i++)
|
||||
{
|
||||
var field = fields[i];
|
||||
|
||||
var sprite = iconsAtlas.FindSprite(field.Name);
|
||||
if (!sprite.IsValid)
|
||||
{
|
||||
Editor.LogWarning(string.Format("Failed to load sprite icon \'{0}\'.", field.Name));
|
||||
}
|
||||
Editor.LogWarning($"Failed to load sprite icon \'{field.Name}\'.");
|
||||
|
||||
field.SetValue(this, sprite);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user