Open thyttan opened 3 hours ago
l
for Bangle.js 1 appsE\.showMenu\(
over all files in BangleApps(\.select\()|(\.move\()|(\.lastIdx)|(\.back\()
apps/sokoban/app.js|401 col 12| map.move(max_direction);
apps/fileman/fileman.app.js|87 col 6| m.move(-1);
apps/acmaze/app.js|194 col 18| return this.move(-1, 0);
apps/acmaze/app.js|196 col 18| return this.move(1, 0);
apps/acmaze/app.js|202 col 18| return this.move(0,1);
apps/acmaze/app.js|204 col 18| return this.move(0,-1);
apps/touchmenu/touchmenu.boot.js|129 col 10| m.back();
apps/touchmenu/touchmenu.boot.js|132 col 8| m.select(d.x, d.y);
apps/qmsched/app.js|94 col 11| delete m.lastIdx; // force redraw
apps/qmsched/app.js|132 col 11| delete m.lastIdx; // force redraw
apps/qmsched/app.js|134 col 8| if (m.lastIdx===undefined) m.draw(); // applyTheme didn't redraw menu, but we need to show updated mode
apps/chess/app.js|161 col 20| const res = state.move(from, to);
E.showMenu
.
Background
_Originally posted by @gfwilliams in https://github.com/espruino/Espruino/pull/2565#discussion_r1794955761_
Commenting on this:
I did some digging below.
Conclusions based on findings below
draw
,select
andmove
(+back
andlastIdx
).Method
Grep for
E\.showMenu
over all files in BangleApps.Grep again over the files from (1.) with
(\.scroller)|(\.draw\(\))
.Copy matches to quickfix list for inspection, resulting in findings below.
E.showMenu
were omitted from findings sections below.Apps using the object from
E.showMenu
Summary
No app seem to use the option to look at the scroller object as a parameter to any of the entry mapped callback functions.
Findings per app
Apps that replaces
E.showMenu
with it's own imlementation.Summary
~There are inconsistencies between the returned objects constitution of the standard and custom implementations~ (Edit: It's that they correspond more to the Bangle.js 1 standard implementations).
The custom implementations mostly contain
draw
,select
andmove
entries. But also e.g.info
,scroll
,selected
,lastIdx
. They most often return the object as well as send it as an argument to the callback functions.The standard implementation contains
draw
andscroller
(Edit: For Bangle.js 2):Findings per app