- WiFi Connect app is now hidden by default, but accessible at the bottom of the WiFi Manage app when WiFi is turned on. - WiFi service now turns on WiFi when calling connect() and WiFi is not on. - Removed `blocking` option for `service::loader::startApp()`. This feature was unused and complex. - Various apps: Moved private headers into Private/ folder. - Various apps: created start() function for easy starting. - Added documentation to all TactilityC APIs - Refactored various `enum` into `class enum` - Refactor M5Stack `initBoot()` (but VBus is still 0V for some reason)
30 lines
845 B
C++
30 lines
845 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
#include "Bundle.h"
|
|
|
|
/**
|
|
* Start the app by its ID and provide:
|
|
* - a title
|
|
* - a text
|
|
* - 0, 1 or more buttons
|
|
*/
|
|
namespace tt::app::alertdialog {
|
|
|
|
/**
|
|
* Show a dialog with the provided title, message and 0, 1 or more buttons.
|
|
* @param[in] title the title to show in the toolbar
|
|
* @param[in] message the message to display
|
|
* @param[in] buttonLabels the buttons to show
|
|
*/
|
|
void start(const std::string& title, const std::string& message, const std::vector<std::string>& buttonLabels);
|
|
|
|
/**
|
|
* Get the index of the button that the user selected.
|
|
*
|
|
* @return a value greater than 0 when a selection was done, or -1 when the app was closed clicking one of the selection buttons.
|
|
*/
|
|
int32_t getResultIndex(const Bundle& bundle);
|
|
}
|