|
@@ -248,8 +248,14 @@ class LCD(framebuf.FrameBuffer):
|
248
|
248
|
self.arc(int(x0), int(y0), int(w), int(w), c_circle, -90, int(v * 360) - 90)
|
249
|
249
|
self.ring(int(x0), int(y0), int(w / 2), c_border)
|
250
|
250
|
|
251
|
|
- def textC(self, s, x, y, c):
|
252
|
|
- self.text(s, x - int(len(s) * 8 / 2), y - 5, c)
|
|
251
|
+ def textC(self, s, x, y, c, bgColor = None):
|
|
252
|
+ xStart = x - int(len(s) * 8 / 2)
|
|
253
|
+ yStart = y - 5
|
|
254
|
+
|
|
255
|
+ if bgColor != None:
|
|
256
|
+ self.rect(xStart, yStart - 1, len(s) * 8, 10, bgColor, True)
|
|
257
|
+
|
|
258
|
+ self.text(s, xStart, yStart, c)
|
253
|
259
|
|
254
|
260
|
def textLine(self, s, c, off = 0):
|
255
|
261
|
charsPerLine = int(self.width / 8)
|