Vixen
02b45cc4
csharp
public sealed class InputActionsView

An action asset, open for editing: maps, actions, bindings and control schemes.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Doc 11's row is "action-map editor", and what that means concretely is the four things a person does to one of these files: name an action and say what shape its value is, hang bindings off it, group those bindings into control schemes, and — the one that cannot be done by typing — press the key you want.

⚠ Listening is a mode rather than a modal, which is KeyBindingsView's argument restated. A dialog that swallows keystrokes to record them cannot be driven by the automation harness. So the button latches, the panel takes keys on the capture leg ahead of the command dispatcher, and Escape is the one control it will not record because Escape is how listening ends.

⚠ It records a control, not a chord. The editor's own keymap binds Ctrl+S; a game's action binds <Keyboard>/s, and the modifier is a composite with a modifier part. Writing a chord into a binding path would produce a path InputControlPath.TryParse refuses, which is a binding that silently never fires.

Fields and properties (14)

  • protected override string TagName

    The element name this type answers to when a caller does not choose one.

  • protected override bool AcceptsFocus

    Whether the focus can rest on this kind of control at all.

  • public TreeView Tree

    The maps, actions and bindings.

  • public UiElement Side

    The column beside it.

  • public UiElement Fields

    The selected row's fields.

  • public UiElement Diagnostics

    What reading the file had to say.

  • public Button AddMap

    Adds a map.

  • public Button AddAction

    Adds an action to the selected map.

  • public Button AddBinding

    Adds a binding to the selected action.

  • public Button AddScheme

    Adds a control scheme.

  • public Button Delete

    Removes whatever is selected.

  • public ToggleButton Listen

    Records the next control pressed into the selected binding.

  • public bool IsListening

    Whether the panel is waiting for a control to be pressed.

  • public InputRow Selected

    What is selected.

Methods (5)

  • protected override void OnCreated()

    Builds whatever this element is made of, once, as it joins a document.

  • public void Show(InputActionsDocument asset)

    Shows an action asset.

  • public void Reload(InputActionsDocument asset)

    Rebuilds the tree from the document.

  • public void Restate()

    Rebuilds the fields for whatever is selected.

  • public void Record(string path)

    Writes a recorded path into whatever is selected, and leaves the mode.

Used by (1)

  • InputActionsEditorFactoryVixen.Editor.AssetEditors