Files
Upsilon/quiz/src/runner.cpp
Émilie Feral 9d0354f3bd [kandinsky] Add a default font size : large
Change-Id: I6b9f1a7b09292f120074c8957e328ddc33023c67
2017-01-27 12:03:06 +01:00

31 lines
632 B
C++

#include "symbols.h"
#include <string.h>
#include <kandinsky.h>
#include <ion.h>
void print(const char * message) {
static int line_y = 0;
KDContext * ctx = KDIonContext::sharedContext();
int line_height = KDText::stringSize("M").height();
ctx->drawString(message, KDPoint(0, line_y));
line_y += line_height;
if (line_y > Ion::Display::Height) {
line_y = 0;
// Clear screen maybe?
}
}
void ion_app() {
int i = 0;
while (quiz_cases[i] != NULL) {
QuizCase c = quiz_cases[i];
c();
print(quiz_case_names[i]);
i++;
}
print("ALL TESTS FINISHED");
while (1) {
Ion::msleep(1000);
}
}