20 Commits

Author SHA1 Message Date
Rob Pilling
a4cb4002de Guard against Bangle.setUI({ <no mode> })
Following on from #2389, this makes it clear that while `setUI()`
can be used to reset the UI, `setUI({})` cannot, and must always
specify `mode` (amongst other options).
2023-07-17 20:07:48 +01:00
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
84675e4368 Bangle.js1: Bangle.setUI({back}) now responds to BTN3 if there were no other watches on buttons 2022-12-07 08:19:56 +00:00
Gordon Williams
512b4daadc Bangle.js: setUI now calls g.reset(), and also protects against recursion in uiRemove 2022-11-15 10:43:58 +00:00
Gordon Williams
7374b6cd10 Fix regression caused by removing 'touch' event type in setUI 2022-11-09 11:39:08 +00:00
Martin Boonk
f70cb81139 Remove Bangle.CLOCK variable on setUI() 2022-10-06 21:56:08 +02:00
Gordon Williams
0e4dcbd3f3 Add support for Bangle.setUI({remove:...}) to allow apps to be unloaded without a full reboot. 2022-09-23 11:52:54 +01:00
storm64
1fee1b2045 [Bangle.setUI] Change to clock property
Feature added to Bangle.setUI reference.
@gfwilliams please update the .min.js-files,
2022-05-24 07:39:06 +02:00
storm64
531c08e64c [Bangle.setUI] Default btnWatches on clockcustom
While thinking about this new mode, I would suggest the default btn behavior should represent the "clock" mode.

The .min.js need to be regenerated...
2022-05-21 12:59:31 +02:00
storm64
b5c79079f0 [Bangle.setUI] Add "clockcustom" mode
Think this might be useful for more complex clocks.
For now it would be necessary to set `Bangle.CLOCK = 1` manually after a custom setUI to show other apps that a clock is used.
2022-05-21 12:44:38 +02:00
Richard de Boer
e455b7ba1d
Bangle.js1: don't make setUI redraw widgets if we replace the back button with a new one 2022-04-27 22:14:02 +02:00
Gordon Williams
95ea8838ff Bangle.js1: Add 'back' option to E.showScroller and Bangle.setUI
Bangle.js1: setUI button handlers now work on falling edge
            Bangle.js: Add setUI custom 'swipe' handler
2022-03-02 15:41:41 +00:00
Andrew Gregory
ebe415a201
Update Bangle_setUI_F18.js
UI select only when button is released, not pressed.
2022-02-22 23:56:16 +08:00
Gordon Williams
6206534fae Bangle.js2: Add 'back' option to E.showScroller and Bangle.setUI 2022-02-22 14:23:12 +00:00
Gordon Williams
ff25ff80df Bangle.setUI is now minified, also calls Bangle.uiRemove if it was set (to clean up custom UI additions)
E.showScroller tweaks to allow redraw requests, get/set initial scroll amount, negative scroll (for titles)
2022-02-09 14:12:47 +00:00
Gordon Williams
db0f4ecf2b Bangle.js1: Bangle.setUI now deletes touchHandler (fix #2095) 2021-11-17 11:01:19 +00:00
Gordon Williams
086690659a Bangle.js: setUI now has 'clock' modes 2021-06-24 13:37:30 +01:00
Gordon Williams
49bcdfb46e Remove buzz in Bangle.js setUI (fix https://github.com/espruino/BangleApps/issues/750) 2021-06-08 09:39:54 +01:00
Gordon Williams
b9df56023d Add Bangle.setUI and use for showMenu 2021-05-26 17:07:35 +01:00