Files
sbox-public/game/addons/tools/Code/Widgets/ControlWidgets/ParticleVector3ControlWidget.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

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()
{
}
}