Hide DAL.x behind Enum

This commit is contained in:
Amerlander
2020-02-20 17:00:11 +01:00
parent 004b1d9662
commit 07fe2645cf
56 changed files with 101 additions and 101 deletions

View File

@ -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) {

View File

@ -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