mirror of
https://github.com/NoelFB/blah.git
synced 2024-11-29 17:08:56 +08:00
added pressed()
check for Stick & Axis bindings
Shorthand for checking the individual buttons in the stuck or axis
This commit is contained in:
parent
6e7e730243
commit
f68e4cd8ed
|
@ -615,6 +615,9 @@ namespace Blah
|
||||||
// updates the Binding
|
// updates the Binding
|
||||||
void update();
|
void update();
|
||||||
|
|
||||||
|
// checks if the axis was pressed this frame (ie. went from 0 to -1 or 1)
|
||||||
|
bool pressed() const { return negative.pressed() || positive.pressed(); }
|
||||||
|
|
||||||
// consumes the press buffer
|
// consumes the press buffer
|
||||||
void consume_press();
|
void consume_press();
|
||||||
|
|
||||||
|
@ -677,6 +680,9 @@ namespace Blah
|
||||||
// Updates the Binding
|
// Updates the Binding
|
||||||
void update();
|
void update();
|
||||||
|
|
||||||
|
// checks if the stick was pressed this frame
|
||||||
|
bool pressed() const { return x.pressed() || y.pressed(); }
|
||||||
|
|
||||||
// Consumes the Press Buffer
|
// Consumes the Press Buffer
|
||||||
void consume_press();
|
void consume_press();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user