Suggestion: double number scroller #6943
Replies: 1 comment
-
Posted at 2024-06-13 by @thyttan You can overwrite This PR for a custom date and time picker might be interesting to you as well: espruino/BangleApps#3443 Posted at 2024-06-14 by @gfwilliams Hi, this sounds like a neat idea. However I don't think it needs to be an addition to E.showMenu... What about just making it a library: https://github.com/espruino/BangleApps/tree/master/modules For instance you could then just do:
This way it'd end up working without anyone needing a firmware update. And you can prototype it without the library - just put the code in place in the IDE. Also worth noting there's this PR currently: espruino/BangleApps#3443 Which adds a configurable date/time chooser that can be installed. So once you'd done it, you could for instance make a similar app to that which provided a Posted at 2024-06-14 by Pologram Thanks for the suggestion @gfwilliams ! I have a question with the code format. If I prototype my custom picker like this :
Later do I need to call it like this in my menu:
or like this:
? Posted at 2024-06-14 by Pologram Alright, I'm almost done, check the attached video. My only remaining question is: how can I go back to the original menu when I validate my input or click the back button? Currently I pass the original menu in a
and then call But I imagine there are more elegant ways to do it? Attachments: Posted at 2024-06-14 by @gfwilliams Great! I'd probably put the original menu in a function, and then pass that function in, so:
Because maybe someone doesn't want to call your picker from a menu, but they want to call it direct from some other part of their app. Posted at 2024-06-15 by Pologram Thanks, that's indeed more elegant. I think I'm all set now. I also created a triple int picker because why not. (see attachments) I don't think I can make more than 3 columns though because the screen is not that big. The result looks pretty similar to the "stock" picker. I also added the possibility to add custom separators like In code it can be used quite easily with a syntax that is very similar to the stock one:
Next order of business is to whip a MR :) Attachments: Posted at 2024-06-17 by @gfwilliams That looks great - thanks! Did you want to make a PR on GitHub to add them to the modules folder so others can include them? Posted at 2024-06-17 by Pologram Thanks for the feedback! Yes, that's what I did: espruino/BangleApps#3455 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2024-06-13 by Pologram
Hello,
I was thinking that it would be neat to have a menu that allows to select two numbers at the same time. The most typical usecase would be to select a time, with the hours and minutes next to each other. It could be a small but nice QOL update.
I tried and made a quick mockup (see attachment), and the result looks nice, because the watch screen has enough real estate for that.
In the code, it could be easy to set up as well. An example could be:
My understanding is that in order to achieve that I need to tweak the
Espruino/libs/js/banglejs /E_showMenu_Q3.js
file, and then build a custom firmware and upload it to the watch. Is that correct?Thank you for your insights
Attachments:
Beta Was this translation helpful? Give feedback.
All reactions