Plugin: Captions Selector

This commit is contained in:
Fermin Cirella
2022-10-22 01:00:15 -03:00
parent 77173c1347
commit c281b8ba98
3 changed files with 59 additions and 0 deletions

View File

@ -0,0 +1,15 @@
const { ipcMain, dialog } = require("electron");
module.exports = () => {
ipcMain.handle('captionsSelector', async (_, captionLabels, currentIndex) => {
return await dialog.showMessageBox({
type: "question",
buttons: captionLabels,
defaultId: currentIndex,
title: "Choose Caption",
message: "Choose Caption:",
detail: `Current Caption: ${captionLabels[currentIndex]}`,
cancelId: -1
})
})
};