mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-04-19 13:59:22 -04:00
This commit imports the C# engine code and game files, excluding C++ source code. [Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
31 lines
787 B
C#
31 lines
787 B
C#
namespace Editor;
|
|
|
|
[CustomEditor( typeof( ParticleVector3 ) )]
|
|
public class ParticleVector3ControlWidget : ControlWidget
|
|
{
|
|
SerializedObject Target;
|
|
|
|
public ParticleVector3ControlWidget( SerializedProperty property ) : base( property )
|
|
{
|
|
SetSizeMode( SizeMode.Ignore, SizeMode.Default );
|
|
|
|
if ( !property.TryGetAsObject( out Target ) )
|
|
return;
|
|
|
|
Layout = Layout.Row();
|
|
Layout.Spacing = 3;
|
|
|
|
var x = Layout.Add( new ParticleFloatControlWidget( Target.GetProperty( "X" ), "X", Theme.Red ) );
|
|
var y = Layout.Add( new ParticleFloatControlWidget( Target.GetProperty( "Y" ), "Y", Theme.Green ) );
|
|
var z = Layout.Add( new ParticleFloatControlWidget( Target.GetProperty( "Z" ), "Z", Theme.Blue ) );
|
|
|
|
Layout.AddStretchCell();
|
|
}
|
|
|
|
protected override void OnPaint()
|
|
{
|
|
|
|
}
|
|
|
|
}
|