17 Commits

Author SHA1 Message Date
Gordon Williams
529fb0779e Bangle.js: setUI now has a 'redraw' argument to allow apps to provide a way to redraw themselves
Also fixes for scroller.isActive (and redraw checks) that break if there is a back icon
2023-06-20 11:00:23 +01:00
Gordon Williams
a0e2d9231d Bangle.js: showMenu now won't redraw menu items if the onchange handler changed the menu
https://github.com/espruino/BangleApps/issues/2816

Also change builtin unicode string escapes to \x## - faster and encodes as a single byte so doesn't break when Unicode enabl;ed on builds
2023-06-13 09:21:23 +01:00
Gordon Williams
2d3c34ef7c Bangle.js1/2: Fix showMenu/showScroller spacing with back if no widgets loaded (ref #2286) 2022-12-05 16:35:01 +00:00
Martin Boonk
d3d3615ab3 Implement passing through remove methods for E.show* 2022-11-07 23:55:59 +01:00
Gordon Williams
728fe64c50 Bangle.js: Allow E.showMenu to be given an array and title option (fix #2175) 2022-06-08 14:18:23 +01:00
Gordon Williams
7c15a764a9 Add #2186 tweak to Bangle.js 1 2022-04-29 09:57:46 +01:00
Richard de Boer
a14e6166c8
Bangle.js1: try harder to only show E.showMenu submenu for option lists 2022-04-28 20:29:23 +02:00
Richard de Boer
5c187d45c5
Merge branch 'b1-menu-back-button' into b1-submenu 2022-04-27 21:47:23 +02:00
Richard de Boer
0c8b7c1c20
Bangle.js1: add submenu to E.subMenu
Only for numeric values with <20 options, otherwise use in-place edit mode
2022-04-27 21:24:38 +02:00
Richard de Boer
195f0549f8
Bangle.js1: show back button for "< Back" item in E.showMenu
Simply by pass it on to setUI.
This also works for options.back, because that adds a "< Back" item.
2022-04-27 18:14:47 +02:00
Gordon Williams
de6c3f63e3 Bangle.js1: E.showMenu now displays boolean values with no format as a checkbox 2022-04-26 10:43:57 +01:00
Gordon Williams
78ee733bc9 Add E.showMenu({"":{back:function}, ...}) for easy specification of 'back' menu item 2022-02-22 13:37:43 +00:00
James Stanley
219d26fdb9 Fix menu arrow behaviour on Bangle.js 1 2022-01-28 11:27:16 +00:00
Gordon Williams
c1e2a603ec Bangle.js: Fix E.showMenu clear if background color is set (https://github.com/espruino/BangleApps/issues/1024)
Bangle.js: Re-add E.showMenu predraw callback (fix #2108)
2021-12-08 14:39:27 +00:00
Richard de Boer
0f1476cede E_showMenu improvements
- remove unused variable
- remove unused parameter from `select()`
- shave a few bytes off `move()`

If a numerical item has `item.wrap` we no longer check if `item.min/max` is set,
because your menu will be broken either way.
2021-11-01 19:43:26 +01:00
Richard de Boer
a27ce44b01 Bangle.js: add wrap option for numerical E.showMenu items
Same as EspruinoDocs `graphical_menu.js`
2021-10-29 18:11:32 +02:00
Gordon Williams
35e46ef6a1 Bangle.js: Add Bangle.appRect to allow apps to see how much space is available for them 2021-10-27 10:14:33 +01:00