Build a layout programmatically. Primarily for use by layout builders
registered with the system.
Inheritance
System.Object
InputControlLayout.Builder
Properties
Declaration
public ReadOnlyArray<InputControlLayout.ControlItem> controls { get; }
Property Value
Declaration
public string displayName { get; set; }
Property Value
Type |
Description |
System.String |
|
Declaration
public string extendsLayout { get; set; }
Property Value
Type |
Description |
System.String |
|
Declaration
public string name { get; set; }
Property Value
Type |
Description |
System.String |
|
Declaration
public FourCC stateFormat { get; set; }
Property Value
Declaration
public int stateSizeInBytes { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
Declaration
public Type type { get; set; }
Property Value
Type |
Description |
System.Type |
|
Declaration
public bool? updateBeforeRender { get; set; }
Property Value
Type |
Description |
System.Nullable<System.Boolean> |
|
Methods
Add a new control to the layout.
Declaration
public InputControlLayout.Builder.ControlBuilder AddControl(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
Name or path of the control. If it is a path (e.g. "leftStick/x" ,
then the control either modifies the setup of a child control of another control in the layout
or adds a new child control to another control in the layout. Modifying child control is useful,
for example, to alter the state format of controls coming from the base layout. Likewise,
adding child controls to another control is useful to modify the setup of of the control layout
being used without having to create and register a custom control layout.
|
Returns
Exceptions
Type |
Condition |
System.ArgumentException |
name is null or empty.
|
Declaration
public InputControlLayout Build()
Returns
Declaration
public InputControlLayout.Builder Extend(string baseLayoutName)
Parameters
Type |
Name |
Description |
System.String |
baseLayoutName |
|
Returns
Declaration
public InputControlLayout.Builder WithDisplayName(string displayName)
Parameters
Type |
Name |
Description |
System.String |
displayName |
|
Returns
Declaration
public InputControlLayout.Builder WithFormat(string format)
Parameters
Type |
Name |
Description |
System.String |
format |
|
Returns
Declaration
public InputControlLayout.Builder WithFormat(FourCC format)
Parameters
Type |
Name |
Description |
FourCC |
format |
|
Returns
Declaration
public InputControlLayout.Builder WithName(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
Declaration
public InputControlLayout.Builder WithSizeInBytes(int sizeInBytes)
Parameters
Type |
Name |
Description |
System.Int32 |
sizeInBytes |
|
Returns
Declaration
public InputControlLayout.Builder WithType<T>()
where T : InputControl
Returns
Type Parameters
See Also