Files
sbox-public/engine/Sandbox.Tools/MapEditor/Tools/PathTool.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

30 lines
815 B
C#

using Native;
namespace Editor.MapEditor;
/// <summary>
/// Interface for the addon layer to implement, this is called from native Hammer.
/// </summary>
public interface IPathTool
{
internal void CreateUI( QWidget container ) => CreateUI( new Widget( container ) );
public void CreateUI( Widget container );
public string GetCurrentEntityClassName();
public float GetRadiusOffset();
public bool IsRadiusOffsetEnabled();
}
/// <summary>
/// Methods called from native to glue the remaining native tool code to here.
/// This will become redundant as the API matures.
/// </summary>
internal static class PathToolGlue
{
internal static IPathTool Create()
{
var entityTool = IToolFactory.Instance.CreatePathTool();
Sandbox.InteropSystem.Alloc( entityTool ); // dirty fucker
return entityTool;
}
}