Gamepad: PadInput reads pad events in one fixed layout (sticks move and look, triggers aim and fire, bumpers step slots and build pieces, Start pauses), fed through ClientInput alongside the keys and mouse. Menus take South to choose and East or Start to go back. The tutorial names pad buttons once the pad is used. Aim assist (option, on by default, pad only): friction across an opponent in plain sight near the look, and a pull of at most 9 deg/s while aiming. Client look only; never through cover. Accessibility (new Access tab): colour-vision sets for the signal colours (red-green, blue-yellow), checked by simulated colour vision in test_palette; interface size 90-130%, with the HUD hotbar refitting at the larger sizes; captions for key sounds with direction; reduce motion (calmer aim zoom and hurt flash). Tests for the pad, aim assist, captions, palettes, settings, the menus driven from a pad, and a pad playing through a real offline session. make access-captures renders the new screens and options. Closes #53 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
41 lines
1.8 KiB
GDScript
41 lines
1.8 KiB
GDScript
## Capture scenario for the menus (A10): one screen of Menus, as a player would first see
|
|
## it, with default settings and nothing saved. `screen` is one of Menus.SCREENS; the
|
|
## join screen lists two made-up servers, and the results screen a made-up finish.
|
|
## `over_match` puts the ink wash over a plain stand-in for a match instead of the
|
|
## backdrop.
|
|
extends Control
|
|
|
|
@export var screen: String = "main"
|
|
@export var over_match: bool = false
|
|
@export var settings_tab: int = 0
|
|
## A13: the interface size (GameSettings.UI_SCALES).
|
|
@export var ui_scale: float = 1.0
|
|
|
|
|
|
func _ready() -> void:
|
|
get_tree().root.content_scale_factor = ui_scale
|
|
set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
|
|
if over_match:
|
|
var stand_in: MenuBackdrop = MenuBackdrop.new()
|
|
stand_in.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
|
|
add_child(stand_in)
|
|
var menus: Menus = Menus.new()
|
|
menus.use_settings(GameSettings.new(), "user://capture_unsaved.cfg")
|
|
add_child(menus)
|
|
menus.over_match = over_match
|
|
match screen:
|
|
"join":
|
|
menus.show_screen("join", false)
|
|
menus.show_servers([
|
|
{"name": "Harbour Lights", "players": 11, "max_players": 24, "address": "192.0.2.10", "port": 24650, "source": "lan", "compatible": true},
|
|
{"name": "Saltmarsh", "players": 2, "max_players": 24, "address": "192.0.2.11", "port": 24650, "source": "list", "compatible": true},
|
|
{"name": "Old Pier", "players": 0, "max_players": 24, "address": "192.0.2.12", "port": 24650, "source": "lan", "compatible": false},
|
|
] as Array[Dictionary])
|
|
"results":
|
|
menus.show_results(3, 24, 4, ["Ada drowned", "You took Thole with a dock carbine", "Gannet fell"] as Array[String])
|
|
"settings":
|
|
menus.show_screen("settings", false)
|
|
menus._tabs.current_tab = settings_tab
|
|
_:
|
|
menus.show_screen(screen, false)
|