55#include "gui_style.h"
66#include "pax_types.h"
77
8-
9-
108typedef enum {
11- MSG_DIALOG_RETURN_OK ,
12- MSG_DIALOG_RETURN_NO ,
13- MSG_DIALOG_RETURN_CANCEL ,
9+ MSG_DIALOG_RETURN_OK ,
10+ MSG_DIALOG_RETURN_NO ,
11+ MSG_DIALOG_RETURN_CANCEL ,
1412} message_dialog_return_type_t ;
1513
16-
17-
1814void render_base_screen (pax_buf_t * buffer , gui_theme_t * theme , bool background , bool header , bool footer ,
1915 gui_header_field_t * header_left , size_t header_left_count , gui_header_field_t * header_right ,
2016 size_t header_right_count , gui_header_field_t * footer_left , size_t footer_left_count ,
@@ -27,47 +23,37 @@ void render_base_screen_statusbar(pax_buf_t* buffer, gui_theme_t* theme, bool ba
2723bsp_input_navigation_key_t message_dialog (pax_buf_t * buffer , gui_theme_t * theme , const char * title , const char * message ,
2824 gui_header_field_t * headers , int header_count );
2925
30-
31-
32- message_dialog_return_type_t message_dialog_ok (pax_buf_t * buffer , gui_theme_t * theme , const char * title , const char * message );
33- message_dialog_return_type_t message_dialog_yes_no ( pax_buf_t * buffer , gui_theme_t * theme , const char * title , const char * message );
34- message_dialog_return_type_t message_dialog_yes_no_cancel (pax_buf_t * buffer , gui_theme_t * theme , const char * title , const char * message );
35-
26+ message_dialog_return_type_t message_dialog_ok ( pax_buf_t * buffer , gui_theme_t * theme , const char * title ,
27+ const char * message );
28+ message_dialog_return_type_t message_dialog_yes_no (pax_buf_t * buffer , gui_theme_t * theme , const char * title ,
29+ const char * message );
30+ message_dialog_return_type_t message_dialog_yes_no_cancel (pax_buf_t * buffer , gui_theme_t * theme , const char * title ,
31+ const char * message );
3632
3733#if defined(CONFIG_BSP_TARGET_TANMATSU ) || defined(CONFIG_BSP_TARGET_KONSOOL ) || \
3834 defined(CONFIG_BSP_TARGET_HACKERHOTEL_2026 )
39- #define MESSAGE_DIALOG_FOOTER_OK ((gui_header_field_t[]){ \
40- {get_icon(ICON_ESC), "/"}, \
41- {get_icon(ICON_F1), "OK"}}), 2
42- #define MESSAGE_DIALOG_FOOTER_GOBACK ((gui_header_field_t[]){ \
43- {get_icon(ICON_ESC), "/"}, \
44- {get_icon(ICON_F1), "Go back"}}), 2
45- #define MESSAGE_DIALOG_FOOTER_YES_NO ((gui_header_field_t[]){ \
46- {get_icon(ICON_ESC), "/"}, \
47- {get_icon(ICON_F1), "No"}, \
48- {get_icon(ICON_F4), "Yes"}}), 3
49- #define MESSAGE_DIALOG_FOOTER_YES_NO_CANCEL ((gui_header_field_t[]){ \
50- {get_icon(ICON_ESC), "/"}, \
51- {get_icon(ICON_F1), "No"}, \
52- {get_icon(ICON_F4), "Yes"}, \
53- {get_icon(ICON_F6), "Cancel"}}), 4
35+ #define MESSAGE_DIALOG_FOOTER_OK ((gui_header_field_t[]){{get_icon(ICON_ESC), "/"}, {get_icon(ICON_F1), "OK"}}), 2
36+ #define MESSAGE_DIALOG_FOOTER_GOBACK \
37+ ((gui_header_field_t[]){{get_icon(ICON_ESC), "/"}, {get_icon(ICON_F1), "Go back"}}), 2
38+ #define MESSAGE_DIALOG_FOOTER_YES_NO \
39+ ((gui_header_field_t[]){{get_icon(ICON_ESC), "/"}, {get_icon(ICON_F1), "No"}, {get_icon(ICON_F4), "Yes"}}), 3
40+ #define MESSAGE_DIALOG_FOOTER_YES_NO_CANCEL \
41+ ((gui_header_field_t[]){{get_icon(ICON_ESC), "/"}, \
42+ {get_icon(ICON_F1), "No"}, \
43+ {get_icon(ICON_F4), "Yes"}, \
44+ {get_icon(ICON_F6), "Cancel"}}), \
45+ 4
5446
5547#elif defined(CONFIG_BSP_TARGET_MCH2022 )
56- #define MESSAGE_DIALOG_FOOTER_OK ((gui_header_field_t[]){ \
57- {NULL, "🅱"}, {NULL, "Ok"}}), 2
58- #define MESSAGE_DIALOG_FOOTER_GOBACK ((gui_header_field_t[]){ \
59- {NULL, "🅱"}, {NULL, "Go back"}}), 2
60- #define MESSAGE_DIALOG_FOOTER_YES_NO ((gui_header_field_t[]){ \
61- {NULL, "🅰"}, {NULL, "Yes"}, \
62- {NULL, "🅱"}, {NULL, "No"}}), 4
63- #define MESSAGE_DIALOG_FOOTER_YES_NO_CANCEL ((gui_header_field_t[]){ \
64- {NULL, "🅰"}, {NULL, "Yes"}, \
65- {NULL, "🅱"}, {NULL, "No"}, \
66- {NULL, "Menu Cancel"}}), 5
48+ #define MESSAGE_DIALOG_FOOTER_OK ((gui_header_field_t[]){{NULL, "🅱"}, {NULL, "Ok"}}), 2
49+ #define MESSAGE_DIALOG_FOOTER_GOBACK ((gui_header_field_t[]){{NULL, "🅱"}, {NULL, "Go back"}}), 2
50+ #define MESSAGE_DIALOG_FOOTER_YES_NO ((gui_header_field_t[]){{NULL, "🅰"}, {NULL, "Yes"}, {NULL, "🅱"}, {NULL, "No"}}), 4
51+ #define MESSAGE_DIALOG_FOOTER_YES_NO_CANCEL \
52+ ((gui_header_field_t[]){{NULL, "🅰"}, {NULL, "Yes"}, {NULL, "🅱"}, {NULL, "No"}, {NULL, "Menu Cancel"}}), 5
6753
6854#else
69- #define MESSAGE_DIALOG_FOOTER_OK NULL, 0
70- #define MESSAGE_DIALOG_FOOTER_GOBACK NULL, 0
71- #define MESSAGE_DIALOG_FOOTER_YES_NO NULL, 0
55+ #define MESSAGE_DIALOG_FOOTER_OK NULL, 0
56+ #define MESSAGE_DIALOG_FOOTER_GOBACK NULL, 0
57+ #define MESSAGE_DIALOG_FOOTER_YES_NO NULL, 0
7258#define MESSAGE_DIALOG_FOOTER_YES_NO_CANCEL NULL, 0
7359#endif
0 commit comments