/** * Copyright (c) 2026 Dominic Masters * * This software is released under the MIT License. * https://opensource.org/licenses/MIT */ #include "uitestlabel.h" #include "ui/widget/uilabel.h" #include "display/text/text.h" #include "display/screen/screen.h" #include "engine/engine.h" uilabel_t UI_TEST_LABEL; errorret_t uiTestLabelInit() { uiLabelInit(&UI_TEST_LABEL, &FONT_DEFAULT); uiLabelSetText(&UI_TEST_LABEL, "duskrpg"); errorOk(); } errorret_t uiTestLabelDraw() { int32_t versionWidth, versionHeight; textMeasure(ENGINE.version, &FONT_DEFAULT, &versionWidth, &versionHeight); errorChain(uiLabelDraw( &UI_TEST_LABEL, (float_t)(SCREEN.scanX + SCREEN.scanWidth - UI_TEST_LABEL.width), (float_t)( SCREEN.scanY + SCREEN.scanHeight - versionHeight - UI_TEST_LABEL.height ) )); errorOk(); }