diff --git a/avr/modules/lcd2/gui2/generic/widget.asm b/avr/modules/lcd2/gui2/generic/widget.asm index 01ce0ee..80f34f0 100644 --- a/avr/modules/lcd2/gui2/generic/widget.asm +++ b/avr/modules/lcd2/gui2/generic/widget.asm @@ -734,6 +734,7 @@ Widget_DrawTextSDRAM: ; @param R5:R4 X relative to widget ; @param R7:R6 Y relative to widget ; @param X pointer to text in SDRAM +; @return R5:R4 X pos behind last written char ; @clobbers any, !Z Widget_DrawColoredTextSDRAM: @@ -756,6 +757,32 @@ Widget_DrawColoredTextSDRAM_loopEnd: +; --------------------------------------------------------------------------- +; @routine Widget_DrawCharAt @global +; +; @param Z byte address of widget object (for LPM!) +; @param +; @param R5:R4 X relative to widget +; @param R7:R6 Y relative to widget +; @param X pointer to text in SDRAM +; @clobbers any, !Z + +Widget_DrawCharAt: + push r16 + rcall Widget_GetSdramPtr ; (none) + rcall Widget_SelectColors ; (R16) + rcall widgetCalcAbsPosAndBorders ; (R16, R17) + pop r16 + push xl + push xh + rcall widgetDrawChar ; (any, !Y, !R6, !R7, !R8, !R9, !R10, !R11) + pop xh + pop xl + ret +; @end + + + ; --------------------------------------------------------------------------- ; @routine widgetCalcAbsPosAndBorders ;