aboutsummaryrefslogtreecommitdiffstats
path: root/api.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'api.hpp')
-rw-r--r--api.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/api.hpp b/api.hpp
index 7f5015c..2930759 100644
--- a/api.hpp
+++ b/api.hpp
@@ -47,6 +47,12 @@ class Api {
// \param body String containing the popup's body. The zone has a size of 13×6 characters, so body should not be longer than 78 characters. Newline allows going to the next line and the text is automatically wrapped.
// \note Strings longer than 13 and 78 respectively will be truncated.
bool gui_popup_text(std::string title, std::string body);
+ // Display a popup over the current view and wait for select or mode (cancel) button to be pressed. The choice done (yes/no) by the user is returned as a bool.
+ // This is a blocking function and should be used only in the app's render method.
+ // \param title Popup's title. The title is prefixed with "Choice|", so the `title` argument cannot exceed 6 characters.
+ // \param body String containing the popup's body. The zone has a size of 13×6 characters, so body should not be longer than 78 characters. Newline allows going to the next line and the text is automatically wrapped.
+ // \note Strings longer than 13 and 78 respectively will be truncated.
+ bool gui_popup_booleanchoice(std::string title, std::string body);
// Display text at the bottom of the screen.
// The font size is automatically choosen based on the text lenght.
// \param text Text to display. Text longer than 21 will be truncated.