mirror of
https://github.com/Facepunch/sbox-public.git
synced 2025-12-23 22:48:07 -05:00
Added ControlSheet.CreateRow
This commit is contained in:
@@ -33,6 +33,11 @@ public class ControlSheet : GridLayout, IControlSheet
|
|||||||
_filter = default;
|
_filter = default;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Widget CreateRow( SerializedProperty property, bool includeExtraInfo = false )
|
||||||
|
{
|
||||||
|
return ControlSheetRow.Create( property, includeExtraInfo );
|
||||||
|
}
|
||||||
|
|
||||||
Guid FindGuid( SerializedProperty sp )
|
Guid FindGuid( SerializedProperty sp )
|
||||||
{
|
{
|
||||||
return FindGuid( sp?.Parent );
|
return FindGuid( sp?.Parent );
|
||||||
|
|||||||
@@ -2,7 +2,11 @@
|
|||||||
|
|
||||||
namespace Editor;
|
namespace Editor;
|
||||||
|
|
||||||
class ControlSheetGroup : Widget
|
/// <summary>
|
||||||
|
/// Represents a group of related controls within a control sheet, optionally with a collapsible header and property
|
||||||
|
/// name display.
|
||||||
|
/// </summary>
|
||||||
|
public class ControlSheetGroup : Widget
|
||||||
{
|
{
|
||||||
internal List<SerializedProperty> properties;
|
internal List<SerializedProperty> properties;
|
||||||
List<ControlSheetRow> rows = new();
|
List<ControlSheetRow> rows = new();
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
namespace Editor;
|
namespace Editor;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a single row in a control sheet UI, providing editing and validation functionality for a serialized
|
||||||
|
/// property.
|
||||||
|
/// </summary>
|
||||||
class ControlSheetRow : Widget
|
class ControlSheetRow : Widget
|
||||||
{
|
{
|
||||||
public ControlWidget ControlWidget { get; private set; }
|
public ControlWidget ControlWidget { get; private set; }
|
||||||
|
|||||||
Reference in New Issue
Block a user