unleashed-firmware/applications/system/js_app/examples/apps/Scripts/dialog.js
MX d573cc06da
js modules updates
by Willy-JL and Sil333033
2024-03-15 07:09:16 +03:00

23 lines
525 B
JavaScript

let dialog = require("dialog");
let result1 = dialog.message("Dialog demo", "Press OK to start");
print(result1);
let dialog_params = ({
header: "Test_header",
text: "Test_text",
button_left: "Left",
button_right: "Files",
button_center: "OK"
});
let result2 = dialog.custom(dialog_params);
if (result2 === "") {
print("Back is pressed");
} else if (result2 === "Files") {
let result3 = dialog.pickFile("/ext", "*");
print("Selected", result3);
} else {
print(result2, "is pressed");
}