fixing text scroll on simulator
This commit is contained in:
parent
ad98c1aaa6
commit
db4692843f
@ -105,9 +105,7 @@ namespace input {
|
||||
* @param body TODO
|
||||
*/
|
||||
//% help=input/on-button-pressed weight=85
|
||||
//% blockId=device_button_event
|
||||
//% block="on button|%NAME|pressed"
|
||||
//% icon="\uf192"
|
||||
//% blockId=device_button_event block="on button|%NAME|pressed" icon="\uf192"
|
||||
void onButtonPressed(Button button, Action body) {
|
||||
registerWithDal((int)button, MICROBIT_BUTTON_EVT_CLICK, body);
|
||||
}
|
||||
|
4
libs/microbit/shims.d.ts
vendored
4
libs/microbit/shims.d.ts
vendored
@ -201,9 +201,7 @@ declare namespace input {
|
||||
* @param body TODO
|
||||
*/
|
||||
//% help=input/on-button-pressed weight=85
|
||||
//% blockId=device_button_event
|
||||
//% block="on button|%NAME|pressed"
|
||||
//% icon="\uf192" shim=input::onButtonPressed
|
||||
//% blockId=device_button_event block="on button|%NAME|pressed" icon="\uf192" shim=input::onButtonPressed
|
||||
function onButtonPressed(button: Button, body: () => void): void;
|
||||
|
||||
/**
|
||||
|
@ -197,9 +197,8 @@ namespace pxsim.basic {
|
||||
clearScreen();
|
||||
pause(interval * 5);
|
||||
} else {
|
||||
let leds = createImageFromString(s);
|
||||
if (s.length == 1) showLeds(leds, interval * 5)
|
||||
else ImageMethods.scrollImage(leds, interval, 1);
|
||||
if (s.length == 1) showLeds(createImageFromString(s), interval * 5)
|
||||
else ImageMethods.scrollImage(createImageFromString(s + ' '), interval, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user