[quiz] Update the runner to use the new KDFont API

This commit is contained in:
Romain Goyet
2018-10-10 17:59:02 +02:00
committed by LeaNumworks
parent aeab06513e
commit fd136f71e7

View File

@@ -13,8 +13,9 @@ void quiz_print(const char * message) {
#else
static int line_y = 0;
KDContext * ctx = KDIonContext::sharedContext();
int line_height = KDText::stringSize("M").height();
ctx->drawString(message, KDPoint(0, line_y));
const KDFont * font = KDFont::LargeFont;
int line_height = font->glyphSize().height();
ctx->drawString(message, KDPoint(0, line_y), font);
line_y += line_height;
if (line_y > Ion::Display::Height) {
line_y = 0;