Build a layout programmatically. Primarily for use by layout builders
registered with the system.
Inheritance
InputControlLayout.Builder
Properties
List of control items set up by the layout.
Declaration
public ReadOnlyArray<InputControlLayout.ControlItem> controls { get; }
Property Value
Display name to assign to the layout.
Declaration
public string displayName { get; set; }
Property Value
Type |
Description |
String |
Display name to assign to the layout
|
Which layout to base this layout on.
Declaration
public string extendsLayout { get; set; }
Property Value
Type |
Description |
String |
Name of base layout.
|
Name to assign to the layout.
Declaration
public string name { get; set; }
Property Value
Type |
Description |
String |
Name to assign to the layout.
|
Memory format FourCC code to apply to state memory used by the
layout.
Declaration
public FourCC stateFormat { get; set; }
Property Value
Type |
Description |
FourCC |
FourCC memory format tag.
|
Total size of memory used by the layout.
Declaration
public int stateSizeInBytes { get; set; }
Property Value
Type |
Description |
Int32 |
Size of memory used by the layout.
|
Declaration
public Type type { get; set; }
Property Value
Type |
Description |
Type |
Control type to instantiate for the layout.
|
For device layouts, whether the device wants an extra update
before rendering.
Declaration
public bool? updateBeforeRender { get; set; }
Property Value
Type |
Description |
Nullable<Boolean> |
True if before-render updates should be enabled for the device.
|
Methods
Add a new control to the layout.
Declaration
public InputControlLayout.Builder.ControlBuilder AddControl(string name)
Parameters
Type |
Name |
Description |
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
Declaration
public InputControlLayout Build()
Returns
Declaration
public InputControlLayout.Builder Extend(string baseLayoutName)
Parameters
Type |
Name |
Description |
String |
baseLayoutName |
|
Returns
Declaration
public InputControlLayout.Builder WithDisplayName(string displayName)
Parameters
Type |
Name |
Description |
String |
displayName |
|
Returns
Declaration
public InputControlLayout.Builder WithFormat(string format)
Parameters
Type |
Name |
Description |
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 |
String |
name |
|
Returns
Declaration
public InputControlLayout.Builder WithSizeInBytes(int sizeInBytes)
Parameters
Type |
Name |
Description |
Int32 |
sizeInBytes |
|
Returns
Declaration
public InputControlLayout.Builder WithType<T>()
where T : InputControl
Returns
Type Parameters
See Also