box
This commit is contained in:
@@ -7,9 +7,27 @@
|
||||
|
||||
#include "questionbox.h"
|
||||
|
||||
void questionBoxSetOptions(char *title, char *options[QUESTION_BOX_OPTIONS_MAX]) {
|
||||
uint8_t QUESTION_BOX_OPTION_COUNT;
|
||||
uint8_t QUESTION_BOX_OPTION_CURRENT;
|
||||
|
||||
void questionBoxSetOptions(char *title, char **options, uint8_t count) {
|
||||
uint8_t i;
|
||||
char buffer[TEXTBOX_CHARS_MAX + 1];
|
||||
sprintf(buffer, "Hello World");
|
||||
sprintf(buffer, title);
|
||||
|
||||
i = 0;
|
||||
QUESTION_BOX_OPTION_CURRENT = 0;
|
||||
QUESTION_BOX_OPTION_COUNT = count;
|
||||
|
||||
// For each row...
|
||||
for(i = 0; i < count; i++) {
|
||||
if((i & 1) == 0) {
|
||||
sprintf(buffer, "%s\n %s", buffer, options[i]);
|
||||
} else {
|
||||
sprintf(buffer, "%s %s", buffer, options[i]);
|
||||
}
|
||||
}
|
||||
|
||||
conversationTextboxSetText(buffer);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user