Skip to content

Commit 3a2cf87

Browse files
committed
Remove redundant text drawing functions
This is mainly just making most of them call drawTextMultipleLines, as not much extra code runs if there's only one line to draw.
1 parent 6b56b66 commit 3a2cf87

File tree

2 files changed

+59
-77
lines changed

2 files changed

+59
-77
lines changed

ttyd-tools/rel/include/draw.h

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,29 +26,21 @@ void drawIconFromItem(int32_t posX, int32_t posY, int16_t itemNum, float scale);
2626
void drawTextMain(const char *text, int32_t x, int32_t y,
2727
uint32_t color, bool alignRight, float scale, float width);
2828

29+
void drawTextMultipleLines(const char *text, int32_t x, int32_t y,
30+
uint32_t color, bool alignRight, float scale, float width);
31+
2932
void drawText(const char *text, int32_t x, int32_t y, uint32_t color, float scale);
3033

3134
void drawTextWidth(const char *text, int32_t x,
3235
int32_t y, uint32_t color, float scale, float width);
3336

3437
void drawTextAlignRight(const char *text, int32_t x, int32_t y, uint32_t color, float scale);
3538

36-
void drawTextMultipleLinesMain(const char *text, int32_t x, int32_t y,
37-
uint32_t color, bool alignRight, float scale, float width);
38-
39-
void drawTextMultipleLines(const char *text, int32_t x, int32_t y, uint32_t color, float scale);
40-
41-
void drawTextMultipleLinesWidth(const char *text, int32_t x,
42-
int32_t y, uint32_t color, float scale, float width);
43-
4439
void drawTextInit(uint8_t alpha, bool drawFontEdge);
4540

4641
void drawTextAndInit(const char *text, int32_t x, int32_t y,
4742
uint8_t alpha, uint32_t color, bool drawDontEdge, float scale);
4843

49-
void drawTextMultipleLinesAndInit(const char *text, int32_t x, int32_t y,
50-
uint8_t alpha, uint32_t color, bool drawDontEdge, float scale);
51-
5244
void getOnOffTextAndColor(bool valueToCheck, const char **textOut, uint32_t *colorOut);
5345
void getYesNoTextAndColor(bool valueToCheck, const char **textOut, uint32_t *colorOut);
5446
uint32_t getSelectedTextColor(bool valueToCheck);

0 commit comments

Comments
 (0)