#include "question.h"
#include "theme.h"
+#include "ctype.h"
#define WIDTH 375
#define HEIGHT 160
int QuestionYesButton::keypress_event()
{
- if(get_keypress() == 'y') { handle_event(); return 1; }
+ if( toupper(get_keypress()) == *get_text() ) {
+ handle_event();
+ return 1;
+ }
return 0;
}
int QuestionNoButton::keypress_event()
{
- if(get_keypress() == 'n') { handle_event(); return 1; }
+ if( toupper(get_keypress()) == *get_text() ) {
+ handle_event();
+ return 1;
+ }
return 0;
}