Skip to content

Game.UI.Widgets.BezierFieldBuilders

Assembly: Game
Namespace: Game.UI.Widgets

Type: class

Base: IFieldBuilderFactory

Summary:
Factory class for creating FieldBuilder instances for Bezier4x3 properties in the UI widget system. When the requested member type is Bezier4x3, this factory creates a Bezier4x3Field via the WidgetReflectionUtils helper. For other types it returns null, allowing other factories or fallback logic to handle them.


Fields

  • This class declares no instance or static fields.
    This is a lightweight factory with no stored state.

Properties

  • This class exposes no properties.
    It only implements the single factory method required by IFieldBuilderFactory.

Constructors

  • public BezierFieldBuilders()
    Implicit public parameterless constructor (not declared explicitly in source). The class holds no state, so the default constructor is sufficient.

Methods

  • public FieldBuilder TryCreate(Type memberType, object[] attributes)
    Attempts to create and return a FieldBuilder for the given memberType. Implementation details:
  • If memberType equals typeof(Bezier4x3), it returns the result of WidgetReflectionUtils.CreateFieldBuilder().
  • For any other memberType it returns null.
  • The attributes parameter is present to match the factory interface but is not used by this implementation.
  • Typical use is within the UI/widget reflection pipeline where multiple factories are queried to find an appropriate field editor for a property type.

Usage Example

// Direct usage example: request a FieldBuilder for Bezier4x3
var factory = new BezierFieldBuilders();
FieldBuilder builder = factory.TryCreate(typeof(Bezier4x3), new object[0]);

// builder will be a Bezier4x3Field-backed FieldBuilder when the type matches,
// or null when the type does not match.

Notes: - Bezier4x3 and Bezier4x3Field are types expected to be defined elsewhere in the UI/widget framework. - WidgetReflectionUtils.CreateFieldBuilder() is used to create the appropriate FieldBuilder instance via reflection/generic helpers in the widget system.