From b599dec278467fde3a7657d930ac626c0cf750e2 Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Thu, 29 Jun 2023 18:46:34 +1000 Subject: [PATCH] Start on renderers --- source/UI/UI_Elements.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/UI/UI_Elements.cpp b/source/UI/UI_Elements.cpp index d6799027..47261428 100644 --- a/source/UI/UI_Elements.cpp +++ b/source/UI/UI_Elements.cpp @@ -1,4 +1,5 @@ #include "UI_Elements.h" +#include "FontUtils.h" #include "OLED.hpp" void render_Text(const ElementSettings_t *settings, screen_arg_t *args); void render_Number(const ElementSettings_t *settings, screen_arg_t *args); @@ -48,10 +49,11 @@ void render_Text(const ElementSettings_t *settings, screen_arg_t *args) { OLED::printBounded((const char *)args->ptr, settings->position.x, settings->position.y, settings->size.w, settings->size.h); } void render_Number(const ElementSettings_t *settings, screen_arg_t *args) { - // + // Arg is an int32 of the number to display + OLED::printNumberBounded(args->i32, true, settings->position.x, settings->position.y, settings->size.w, settings->size.h); } void render_Image(const ElementSettings_t *settings, screen_arg_t *args) { - // + // arg is a pointer to the raw image data to display } void render_PowerSource(const ElementSettings_t *settings, screen_arg_t *args) { //