Scripting API
Scripting API
BindingSource
Record struct in Abyss.Core, from Abyss.Core.
One thing on a device that a binding reads, named as settings/input.json names it.
public readonly record struct BindingSourceConstructors
BindingSource
public BindingSource(SourceKind Kind, string Name)One thing on a device that a binding reads, named as settings/input.json names it.
Parameters
Kind: The device, and what of it.Name: Its name as its enum writes it:Space,South,Motion.
Properties
Kind
public SourceKind Kind { get; init; }The device, and what of it.
Name
public string Name { get; init; }Its name as its enum writes it: Space, South, Motion.
IsVector
public bool IsVector { get; }Whether it is two numbers rather than one: a stick, the mouse's motion, wheel or position.
IsPressed
public bool IsPressed { get; }Whether it is something pressed, zero to one — a key, mouse button or gamepad button — which is what a composite is made of.
Methods
Of
public static BindingSource Of(Key key)A key.
Parameters
key
Of
public static BindingSource Of(MouseInput input)A mouse button, or the mouse's motion, wheel or position.
Parameters
input
Of
public static BindingSource Of(GamepadButton button)A gamepad's button.
Parameters
button
Of
public static BindingSource Of(GamepadAxis axis)One direction of a gamepad's stick.
Parameters
axis
Of
public static BindingSource Of(GamepadStick stick)A gamepad's stick.
Parameters
stick
ToString
public override string ToString()