lancaster-university / microbit-dal

http://lancaster-university.github.io/microbit-docs
Other
256 stars 130 forks source link

Fix right scrolling of an image bug! #471

Closed arduino12 closed 3 years ago

arduino12 commented 3 years ago

Hi,

I want to be able to scroll an image from left to right, But apparently- it only works in the web simulator- see my demo of the bug here.

I found that the cause of this is here.

To my thinking - the quick-fix will be to rename image.shiftLeft(int16_t n) into image.shiftHorizontal(int offset) - So it can accept a negative value and shift the image to the right as well.

But a better fix will be to rename it into shift(enum direction) or shift(int x_offset, int y_offset) - So we can shift an image in all directions!

Thanks!

martinwork commented 3 years ago

How about this? https://github.com/lancaster-university/microbit-dal/pull/427

arduino12 commented 3 years ago

Oh sorry I missed your PR @martinwork - it could solve my issue !

But sadly it seems that nobody here want's to merge it after reading the issue #351 from 2018 :(

Shame that people had to re-implemet this in the higher layer like this.

My goal is to add Hebrew font for my students - I wanted to do it in this DAL lower layer - But it looks like I better do it myself in the .ts files so I don't have to wait 1+ years for a PR approvers. Anyway I will close this issue now and will write my scrolling code using the .ts files. :)