Button event down (#1189)
* support for button_down events * support for AB button
This commit is contained in:
1 parent
1767e3d10c
commit
47634d52e8
2 files changed
+13
No files matched your search
@@ -62,6 +62,13 @@ namespace pxsim.control {
|
||||
}
|
||||
|
||||
export function onEvent(id: number, evid: number, handler: RefAction) {
|
||||
if (id == DAL.MICROBIT_ID_BUTTON_AB) {
|
||||
const b = board().buttonPairState;
|
||||
if (!b.usesButtonAB) {
|
||||
b.usesButtonAB = true;
|
||||
runtime.queueDisplayUpdate();
|
||||
}
|
||||
}
|
||||
pxtcore.registerWithDal(id, evid, handler)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user