Files
sbox-public/engine/Sandbox.Tools/EngineTools.cs
s&box team 71f266059a Open source release
This commit imports the C# engine code and game files, excluding C++ source code.

[Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
2025-11-24 09:05:18 +00:00

34 lines
1.1 KiB
C#

namespace Editor
{
internal static class EngineTools
{
public record ToolDescription( string Name, string Description, string Library, string Icon );
static List<ToolDescription> AllTools = new()
{
new ToolDescription( "Hammer", "For editing maps", "hammer", "handyman" ),
new ToolDescription( "Material Editor", "For editing materials", "met", "insert_photo" ),
new ToolDescription( "Model Editor", "For editing models", "modeldoc_editor", "view_in_ar" ),
new ToolDescription( "Animgraph Editor", "For editing animation graphs", "animgraph_editor", "directions_run" ),
};
/// <summary>
/// Accessor to get tools available on this machine.
/// </summary>
public static IReadOnlyList<ToolDescription> All
{
get
{
return AllTools.AsReadOnly();
}
}
public static void ShowTool( string name )
{
var tool = All.FirstOrDefault( x => x.Name == name );
Native.ToolGlue.ShowTool( $"tools/{tool.Library}.dll" );
}
}
}