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

44 lines
877 B
C#

using Native;
namespace Editor;
public enum InputOutputType
{
Invalid = -1,
Void,
Int,
Bool,
String,
Float,
Vector,
EHandle,
Color,
Script
}
/// <summary>
/// Represents a variable
/// </summary>
public partial class InputOutputBase
{
public string Name { get; set; }
public string Description { get; set; }
public InputOutputType Type { get; set; } // TODO: Use C# Type?
internal static InputOutputBase FromNative( CClassInputOutputBase native )
{
InputOutputBase inOut = null;
if ( native.IsInput() ) inOut = new Input();
if ( native.IsOutput() ) inOut = new Output();
if ( inOut == null ) return null;
inOut.Name = native.GetName();
inOut.Description = native.GetDescription();
inOut.Type = native.GetType_Native();
return inOut;
}
}
public partial class Input : InputOutputBase { }
public partial class Output : InputOutputBase { }