Game Player Control Edit Screen - cressie176/Load64 GitHub Wiki

Primary Purpose

Add or edit a control for a specific player in a game, including its system input and host input assignments.

Main Screen Design

When adding a new control:

┌──────────────────────────────────────────────────────────────────────────────┐
│ TOP BAR                                                                      │
│  <Game Title> > Controls > Player <n> Controls > Add                         │
├──────────────────────────────────────────────────────────────────────────────┤
│                                                                              │
│  FORM                                                                        │
│  ┌────────────────────────────────────────────────────────────────────────┐  │
│  │                   ┌─────────────────────────────────────────────────┐  │  │
│  │  Description      │ _                                               │  │  │
│  │                   └─────────────────────────────────────────────────┘  │  │
│  │                                                                        │  │
│  │                   ┌─────────────────────────────────────────────────┐  │  │
│  │  System Input     │ —                                            \/ │  │  │
│  │                   └─────────────────────────────────────────────────┘  │  │
│  │                                                                        │  │
│  │                   ┌──────────────────────────────────┐                 │  │
│  │  Host Inputs      │ —                                │ [Capture]  [X]  │  │
│  │                   └──────────────────────────────────┘                 │  │
│  │                                                                        │  │
│  │  [Save]   [Cancel]                                                     │  │
│  └────────────────────────────────────────────────────────────────────────┘  │
│                                                                              │
├──────────────────────────────────────────────────────────────────────────────┤
│ BOTTOM BAR                                                                   │
└──────────────────────────────────────────────────────────────────────────────┘

When editing an existing control:

┌──────────────────────────────────────────────────────────────────────────────┐
│ TOP BAR                                                                      │
│  <Game Title> > Controls > Player <n> Controls > <Description>               │
├──────────────────────────────────────────────────────────────────────────────┤
│                                                                              │
│  FORM                                                                        │
│  ┌────────────────────────────────────────────────────────────────────────┐  │
│  │                   ┌─────────────────────────────────────────────────┐  │  │
│  │  Description      │ Attack_                                         │  │  │
│  │                   └─────────────────────────────────────────────────┘  │  │
│  │                                                                        │  │
│  │                   ┌─────────────────────────────────────────────────┐  │  │
│  │  System Input     │ Fire                                         \/ │  │  │
│  │                   └─────────────────────────────────────────────────┘  │  │
│  │                                                                        │  │
│  │                   ┌──────────────────────────────────┐                 │  │
│  │  Host Inputs      │ Button South, Enter              │ [Capture]  [X]  │  │
│  │                   └──────────────────────────────────┘                 │  │
│  │                                                                        │  │
│  │  [Save]   [Cancel]                                                     │  │
│  └────────────────────────────────────────────────────────────────────────┘  │
│                                                                              │
├──────────────────────────────────────────────────────────────────────────────┤
│ BOTTOM BAR                                                                   │
└──────────────────────────────────────────────────────────────────────────────┘

TOP BAR

Focusable: No
Interactive: No
Purpose: Identify the game and player context for this control

FORM

Type: Form
Focusable: Yes (primary focus region)
Interactive: Yes
Purpose: Define the control description, system input, and host input assignments

Fields are pre-populated when editing an existing control, or empty when adding a new one.

Description

Free-text label describing what this control does (e.g. Move Up, Attack). Shown to the user on the Game Controls screen.

System Input

Dropdown of all available inputs for this player, listed in groups:

  1. Joystick actionsUp, Down, Left, Right, Fire. Only actions not already used by another control for this player are shown.
  2. System keys — all system keys in human-readable form, sub-grouped as Special Keys, Function Keys, Letter Keys, Number Keys, Symbol Keys (e.g. F1, RUN/STOP, .). Only keys not already used by another control for this player are shown.

Host Inputs

Displays the currently assigned controller buttons and host keys as a comma-separated list (e.g. Button South, Enter). Shows if none assigned.

[Capture] enters capture mode. While active, the entire form is non-interactive. LoadC64 detects the next controller button pressed or keyboard key pressed, resolves it to its canonical name or keyboard key, and adds it to the list if not already present. Any input is a valid capture target — including Escape — so there is no cancel mechanism; press [Cancel] (form footer) to discard the whole form, or use [X] after exiting capture mode to clear unwanted additions. If the detected input is a keyboard key and it is already mapped to any other control in this game — across all players and general controls — it is rejected. If the detected input is a controller button and it is already mapped to any other control for this player — it is rejected. In either case, the bottom bar shows the conflict message and capture mode remains active waiting for the next input. Capture mode exits automatically after each accepted capture, restoring normal form interaction.

[X] removes all host input assignments for this control.

[Save] / [Cancel]

BOTTOM BAR

Focusable: No
Interactive: No
Purpose: Display capture mode instructions, conflict errors, and validation errors

When capture mode is active:

├──────────────────────────────────────────────────────────────────────────────┤
│ BOTTOM BAR                                                                   │
│  Press a button or key to capture.                                           │
└──────────────────────────────────────────────────────────────────────────────┘

When a captured input is already mapped:

├──────────────────────────────────────────────────────────────────────────────┤
│ BOTTOM BAR                                                                   │
│  <Input> is already mapped to <Control FQN>                                  │
└──────────────────────────────────────────────────────────────────────────────┘

Where <Control FQN> is:

  • Player <n> – <Description> for a player control (e.g. Player 1 – Attack)
  • <Description> for a general control (e.g. Start 1 Player)

After a validation error:

├──────────────────────────────────────────────────────────────────────────────┤
│ BOTTOM BAR                                                                   │
│  <Error message>                                                             │
└──────────────────────────────────────────────────────────────────────────────┘

Behaviour

  • When adding: all fields are empty on entry.
  • When editing: all fields are pre-populated.
  • If validation fails, the error is shown in the bottom bar and the form remains open.

Validation Rules

Name Type Required Notes
Description String Yes Must not be empty.
System Input Dropdown Yes Must be selected. Must not duplicate an existing control for this player.
⚠️ **GitHub.com Fallback** ⚠️