Implemented AlertDialog app (#117)

This commit is contained in:
Ken Van Hoeylandt
2024-12-10 00:22:29 +01:00
committed by GitHub
parent 103588948f
commit 77280def1d
7 changed files with 160 additions and 22 deletions
@@ -109,15 +109,3 @@ extern const AppManifest manifest = {
};
}
extern "C" {
extern void tt_app_selectiondialog_start2(const char* title, int argc, const char* argv[]) {
std::vector<std::string> list;
for (int i = 0; i < argc; i++) {
const char* item = argv[i];
list.push_back(item);
}
tt::app::selectiondialog::start(title, list);
}
}
@@ -16,7 +16,10 @@ namespace tt::app::selectiondialog {
void start(std::string title, const std::vector<std::string>& items);
/** App result data */
/**
* Get the index of the item that the user selected.
*
* @return a value greater than 0 when a selection was done, or -1 when the app was closed without selecting an item.
*/
int32_t getResultIndex(const Bundle& bundle);
}