I was following the example at https://www.espruino.com/Reference#l_E_showScroller for how to use the e.showScroller function for Bangle.js 2. I copied this code from the tutorial:
E.showScroller({ h : 40, c : 8, draw : (idx, r) => { g.setBgColor((idx&1)?"#fff":"#ccc").clearRect(r.x,r.y,r.x+r.w-1,r.y+r.h-1); g.setFont("6x8:2").drawString("Item Number\n"+idx,r.x+10,r.y+4); }, select : (idx) => console.log("You selected ", idx) });
It works, but the bottom number gets cuts off as you scroll. The issue is shown in the video below. Is there any way I can fix this?
1 Attachment
@Ronin started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I was following the example at https://www.espruino.com/Reference#l_E_showScroller for how to use the e.showScroller function for Bangle.js 2. I copied this code from the tutorial:
It works, but the bottom number gets cuts off as you scroll. The issue is shown in the video below.
Is there any way I can fix this?
1 Attachment