mirror of
https://github.com/Facepunch/sbox-public.git
synced 2025-12-23 22:48:07 -05:00
Add [Parameter] to BaseControl.Property
This commit is contained in:
@@ -1,11 +1,10 @@
|
|||||||
using System;
|
namespace Sandbox.UI;
|
||||||
|
|
||||||
namespace Sandbox.UI;
|
|
||||||
|
|
||||||
public class BaseControl : Panel
|
public class BaseControl : Panel
|
||||||
{
|
{
|
||||||
SerializedProperty _property;
|
SerializedProperty _property;
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
public SerializedProperty Property
|
public SerializedProperty Property
|
||||||
{
|
{
|
||||||
get => _property;
|
get => _property;
|
||||||
@@ -56,7 +55,7 @@ public class BaseControl : Panel
|
|||||||
var type = property.PropertyType;
|
var type = property.PropertyType;
|
||||||
|
|
||||||
var allAttributes = Game.TypeLibrary.GetTypesWithAttribute<CustomEditorAttribute>( false )
|
var allAttributes = Game.TypeLibrary.GetTypesWithAttribute<CustomEditorAttribute>( false )
|
||||||
.Where( x => x.Type.TargetType.IsAssignableTo( typeof( BaseControl ) ))
|
.Where( x => x.Type.TargetType.IsAssignableTo( typeof( BaseControl ) ) )
|
||||||
.ToArray();
|
.ToArray();
|
||||||
|
|
||||||
var allEditors = allAttributes
|
var allEditors = allAttributes
|
||||||
|
|||||||
Reference in New Issue
Block a user