1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
//! How an action's binding is shown to the player right now:
//! [`ActionMap::hint`] answers with a [`Hint`] — `Space` while the player is
//! on the keyboard, `A` once they pick up an Xbox pad, `Cross` on a
//! PlayStation one.
//!
//! # Which binding
//!
//! **The binding for the device the player last used.** [`ActionMap::hint`]
//! takes the first of the action's bindings whose [`Binding::device`] is
//! [`ActionMap::last_device`]. An action with nothing on that device falls
//! back to the device used before it, and so on back through every device
//! that has spoken — a player who nudged the mouse while playing on the pad is
//! still shown the pad's button for an action the mouse cannot press — and
//! then, before any device has spoken or when none it heard from is bound, to
//! the action's first binding.
//!
//! # Labels, not artwork
//!
//! A hint's [`label`](Hint::label) is text. The engine ships **no glyph
//! images**: what a button looks like on screen is a game's art direction,
//! and the families' own button art is theirs to license, so that is the
//! game's call and not one an engine can make for every game built on it. A
//! game with an icon atlas maps the rest of the hint — the
//! [`binding`](Hint::binding) and the [`pad`](Hint::pad) family — to its own
//! sprites.
//!
//! The default labels are plain ASCII words (`A`, `Cross`, `LB`, `Space`),
//! not symbols such as `Ⓐ`, because a font that lacks a symbol draws nothing
//! or a box where the hint should be. A game whose font has them supplies its
//! own [`HintLabels`] to [`ActionMap::hint_with`], overriding only the entries
//! it prints differently.
//!
//! # Which pad family
//!
//! A pad button is named for the pad that last spoke
//! ([`ActionMap::last_pad_kind`]); before any pad spoke, for the first
//! connected one; with none connected, as [`PadKind::Generic`]'s positional
//! names. Bindings never read the family — buttons are positional
//! (`gamepad.rs`) — so this is the one place it matters.
pub use ;
use crate::;
/// How one action's binding is shown to the player — see the
/// [module docs](self).