Flipper/Applications/Custom (UL, RM)/RogueMaster/Scripts/dialog.js

23 lines
525 B
JavaScript
Raw Normal View History

2024-02-28 05:53:59 +00:00
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",
2024-03-25 01:35:38 +00:00
button_right: "Files",
2024-02-28 05:53:59 +00:00
button_center: "OK"
});
let result2 = dialog.custom(dialog_params);
if (result2 === "") {
print("Back is pressed");
2024-03-25 01:35:38 +00:00
} else if (result2 === "Files") {
let result3 = dialog.pickFile("/ext", "*");
print("Selected", result3);
2024-02-28 05:53:59 +00:00
} else {
print(result2, "is pressed");
}