36 Commits

Author SHA1 Message Date
Gordon Williams
2ac6e8b4fa Bangle.js2: Remove buzz when going back in a menu using the button (not the widget)
fix https://github.com/espruino/Espruino/issues/2670
2025-12-08 16:03:01 +00:00
Gordon Williams
bf293ba289 Bangle.js2: Menus now buzz when back button pressed or icon tapped (fix #2642) 2025-07-22 13:54:18 +01:00
Gordon Williams
8b2e5a57b6 Bangle.js2: Fix issue using touch handler with Bangle.setUI({mode:"updown",...}) (fix #2648) 2025-07-22 13:54:18 +01:00
Gordon Williams
a454207e03 Bangle.js: Fix back handler not removed when using E.setUI with a back button but without widgets (#2636) 2025-06-10 10:24:15 +01:00
Gordon Williams
ba74d7eff3
remove isBtnBackFunc logic as not needed 2025-06-05 16:41:44 +01:00
thyttan
ed46a278ee Bangle_setUI_Q3: fix btn back handler was not always rm:ed correctly 2025-05-26 22:57:50 +02:00
Gordon Williams
57e709dc2c use pretokenised minified code (and add comments - for #2626) 2025-04-22 10:58:30 +01:00
thyttan
bdd4d70a7b Bangle.setUI: fix back btn not drawn in leftmost position
The bug seems to have snuck in when the back widget was no longer set
with Object.assign in commit 453def81645c08e46195ad0627c1b77c8a59ee2a .
2025-04-20 21:54:56 +02:00
Gordon Williams
453def8164 Bangle.js: setUI/etc now don't draw a 'back' icon if there is no widget bar (or it's hidden)
Also tidy up setUI touch handling - now we have stopEventPropagation and prependListener it's easier
2025-04-01 11:22:41 +01:00
Gordon Williams
7386f49f1c Bangle.js: .setUI now only clears back widget if it hasn't been hidden by widget_utils 2024-11-07 10:11:00 +00:00
thyttan
269b3e3e80 Bangle_setUI_Q3: tweaks (read below)
- Add custom handlers on top of the standard modes as well. Previously this was only possible for mode == "custom".
  - The goal here is to make it possible to move all input handling inside `setUI` where today some apps add on extra handlers outside of `setUI` calls.
- Change the default behaviour of the hardware button to act immediately on press down. Previously it has been acting on button release.
  - This makes the interaction slightly snappier.
  - In addition to the existing `btn` key a new `btnRelease` key can now be specified. `btnRelease` will let you listen to the rising edge of the hardware button.
2024-10-15 22:48:38 +02:00
Gordon Williams
8f18a3002e Bangle.js: Bangle.setUI's back widget now uses stopEventPropagation to stop other touch handlers getting called
https://github.com/espruino/BangleApps/pull/3233#issuecomment-1975384171
2024-03-04 11:15:57 +00:00
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
4adadf7b26 formatting 2022-12-08 10:48:38 +00:00
Gordon Williams
039ffb5441 Bangle.js2: setUI(updown/leftright) now responds to button on falling (not rising) edge 2022-12-01 10:29:06 +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
Gordon Williams
83d485e076 Bangle.js 2: Bangle.setUI remove unused 'touch' mode, ensure 'back' button doesn't overlap if button is already used (fix #2287)
Also fix https://github.com/espruino/EspruinoDocs/issues/682
2022-11-09 10:32:43 +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
Gordon Williams
4edb72a8f7 Bangle.js2: Fix exception when using 'back' and physical button with Bangle.setUI (fix https://github.com/espruino/BangleApps/issues/1904) 2022-06-09 09:50:24 +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
68b19612d2
Bangle.js2: don't make setUI redraw widgets if we replace the back button with a new one 2022-04-27 22:16:45 +02:00
Gordon Williams
13390a3318 Bangle.js2: setUI (now doesn't forward touch events if tapping over the back button (fix #2170) 2022-03-14 14:05:30 +00:00
Richard de Boer
8200329e35
Bangle.js2: clean up setUI custom swipeHandler 2022-03-12 21:32:52 +01: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
Gordon Williams
6206534fae Bangle.js2: Add 'back' option to E.showScroller and Bangle.setUI 2022-02-22 14:23:12 +00:00
Gordon Williams
712cf34ac6 Bangle.js2: include new touchscreen E.showMenu system 2022-02-11 11:02:28 +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
58685d4884 Bangle.js2: Bangle.dragHandler is now cleared by setUI (fix #2078) 2021-10-28 09:14:46 +01:00
Gordon Williams
20ae5fa96c Bangle.js2: Fix setUI clockupdown handling of 'up' 2021-10-21 08:33:30 +01:00
Gordon Williams
d557c8f191 Change default highlight colour in theme, add custom showPrompt (which uses touch) 2021-06-30 11:53:24 +01:00
Gordon Williams
1d7abbe3b4 Rename SMAQ3 board to BANGLEJS2 2021-06-24 16:32:43 +01:00