button-delta ( old? new? -- delta )
Game controller input

Prev:mouse-state
Next:buttons-delta ( old-buttons new-buttons -- delta )


Vocabulary
game.input

Inputs
old?a boolean
new?a boolean


Outputs
deltapressed, released, or f


Word description
Outputs a symbol representing the change in a key or button's state given a "before" and "after" sample of its state. Outputs pressed if old? is false and new? is true, released if old? is true and new? is false, or f if the two inputs have the same boolean value.

See also
buttons-delta, buttons-delta-as

Definition