Game.UI.Editor.BuildingLotDepthField
Assembly:
Assembly-CSharp
Namespace:
Game.UI.Editor
Type:
class
Base:
BuildingLotFieldBase
Summary:
A small UI helper class used by the editor to create a field for editing a building lot's depth. It overrides the TryCreate method to force a non-horizontal (vertical) layout when creating the FieldBuilder, delegating the actual creation work to the base class.
Fields
- This class declares no explicit fields.
The class only contains an override method and relies on its base class for storage and behavior.
Properties
- This class declares no properties.
All relevant state and properties are expected to be defined on BuildingLotFieldBase or the returned FieldBuilder.
Constructors
public BuildingLotDepthField()
Default parameterless constructor (compiler-generated). No special initialization is performed in this class.
Methods
public override FieldBuilder TryCreate(Type memberType, object[] attributes)
Attempts to create and return a FieldBuilder for the given member type and attributes. This override forces the call to the underlying creation implementation to use a vertical (non-horizontal) layout by calling TryCreate(memberType, attributes, horizontal: false) on the base class (or the overload available in the inheritance chain). It returns the created FieldBuilder or null if creation is not applicable.
Usage Example
// Create a depth field builder for an int member (for example)
var depthFieldFactory = new Game.UI.Editor.BuildingLotDepthField();
FieldBuilder fieldBuilder = depthFieldFactory.TryCreate(typeof(int), new object[] { /* any attributes */ });
if (fieldBuilder != null)
{
// Add the returned FieldBuilder to your editor UI container
// container.Add(fieldBuilder.Build());
}
Notes: - This class is a small specialization of BuildingLotFieldBase intended to ensure the field uses a vertical layout. If you need a horizontal layout variant, look for or implement a corresponding class that passes horizontal: true.