Hide DAL.x behind Enum
This commit is contained in:
@ -15,9 +15,9 @@ namespace pxsim.input {
|
||||
b.usesButtonAB = true;
|
||||
runtime.queueDisplayUpdate();
|
||||
}
|
||||
pxtcore.registerWithDal(button, DAL.MICROBIT_BUTTON_EVT_CLICK, handler);
|
||||
pxtcore.registerWithDal(button, ButtonEvent.Click, handler);
|
||||
}
|
||||
|
||||
|
||||
export function buttonIsPressed(button: number): boolean {
|
||||
let b = board().buttonPairState;
|
||||
if (button == b.abBtn.id && !b.usesButtonAB) {
|
||||
|
@ -13,7 +13,7 @@ namespace pxsim.input {
|
||||
if (!pin) return;
|
||||
pin.isTouched();
|
||||
runtime.queueDisplayUpdate();
|
||||
pxtcore.registerWithDal(pin.id, DAL.MICROBIT_BUTTON_EVT_CLICK, handler);
|
||||
pxtcore.registerWithDal(pin.id, ButtonEvent.Click, handler);
|
||||
}
|
||||
|
||||
// Deprecated
|
||||
|
Reference in New Issue
Block a user