Make a bunch of BaseControls SupportsMultiEdit

This commit is contained in:
Garry Newman
2025-12-19 16:37:45 +00:00
parent d84f64c2c3
commit 30f85d5270
10 changed files with 20 additions and 0 deletions

View File

@@ -7,6 +7,8 @@ public partial class ColorAlphaControl : BaseControl
{
readonly Panel _handle;
public override bool SupportsMultiEdit => true;
public ColorAlphaControl()
{
_handle = AddChild<Panel>( "handle" );

View File

@@ -9,6 +9,8 @@ public partial class ColorControl : BaseControl
readonly TextEntry _textEntry;
readonly Panel _colorSwatch;
public override bool SupportsMultiEdit => true;
public ColorControl()
{
_colorSwatch = AddChild<Panel>( "colorswatch" );

View File

@@ -7,6 +7,8 @@ public partial class ColorHueControl : BaseControl
{
readonly Panel _handle;
public override bool SupportsMultiEdit => true;
float _hue = 0;
public ColorHueControl()

View File

@@ -9,6 +9,8 @@ public partial class ColorPickerControl : BaseControl
readonly ColorHueControl _hueControl;
readonly ColorAlphaControl _alphaControl;
public override bool SupportsMultiEdit => true;
public ColorPickerControl()
{
_svControl = AddChild<ColorSaturationValueControl>( "sv" );

View File

@@ -9,6 +9,8 @@ public partial class ColorSaturationValueControl : BaseControl
float _hue = 0;
public override bool SupportsMultiEdit => true;
public ColorSaturationValueControl()
{
_handle = AddChild<Panel>( "handle" );

View File

@@ -6,6 +6,8 @@
[CustomEditor( typeof( Enum ) )]
public partial class EnumControl : BaseControl
{
public override bool SupportsMultiEdit => true;
public EnumControl()
{

View File

@@ -41,6 +41,8 @@
@code
{
public override bool SupportsMultiEdit => true;
[Parameter] public Action<float> OnValueChanged { get; set; }
/// <summary>

View File

@@ -21,6 +21,8 @@
@code
{
public override bool SupportsMultiEdit => true;
public RenderFragment Label { get; set; }
public Action<bool> OnValueChanged { get; set; }

View File

@@ -10,6 +10,8 @@ namespace Sandbox.UI;
[CustomEditor( typeof( string ) )]
public partial class TextEntry : BaseControl
{
public override bool SupportsMultiEdit => true;
/// <summary>
/// Called when the text of this text entry is changed.
/// </summary>

View File

@@ -8,6 +8,8 @@
[CustomEditor( typeof( Vector4 ) )]
public partial class VectorControl : BaseControl
{
public override bool SupportsMultiEdit => true;
NumberEntry _x;
NumberEntry _y;
NumberEntry _z;