add font centering, minor fixes
This commit is contained in:
@@ -2,9 +2,10 @@
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <analog.h>
|
||||
#include <firehazard.h>
|
||||
|
||||
#include "analog.h"
|
||||
#include "firehazard.h"
|
||||
#include "graphics/bitmaps.h"
|
||||
#include "liquid.h"
|
||||
#include "graphics/drawing.h"
|
||||
#include "graphics/display_spec.h"
|
||||
@@ -74,8 +75,8 @@ static void paint(struct MenuScene *self)
|
||||
char buf[10];
|
||||
sprintf(buf, "%.0f", analog_read());
|
||||
// TODO centering
|
||||
LCD_setStrEx(buf, 0, 0, BLACK, (struct TextStyle) {.size = FONT_DOUBLE});
|
||||
LCD_setStrEx("°C", 0, 17, BLACK, (struct TextStyle) {.size = FONT_BOLD});
|
||||
LCD_setStrEx(buf, XLINE/2, 0, BLACK, (struct TextStyle) {.size = FONT_DOUBLE, .align = ALIGN_CENTER});
|
||||
LCD_setStrEx("°C", XLINE/2, 17, BLACK, (struct TextStyle) {.align = ALIGN_CENTER}); //.size = FONT_BOLD,
|
||||
|
||||
if (fire_enabled()) {
|
||||
strcpy(buf, "RUN");
|
||||
|
||||
Reference in New Issue
Block a user