I have created a layout using Layout Library and want to prompt the user to confirm something, after the user selection, the screen goes blank and I can't seem to re-render the app.
function markHalftime(){
isHalftime = true;
E.showPrompt("Are you sure?", {
title:"Confirmation",
buttons: {"No":false, "Yes":true}
}).then(function(result) {
if (result) {
// Code to execute if the user clicks "Yes"
console.log(result);
} else {
// Code to execute if the user clicks "No" or closes the dialog
// This is optional, depending on your application's logic
}
g.clear();
Bangle.loadWidgets();
Bangle.drawWidgets();
layout.render();
});
}
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I have created a layout using Layout Library and want to prompt the user to confirm something, after the user selection, the screen goes blank and I can't seem to re-render the app.