mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-12 23:28:36 -07:00
Begone, goofy ahh else-if chain
This commit is contained in:
@@ -140,18 +140,25 @@ void canvas_invert_color(Canvas* canvas) {
|
|||||||
void canvas_set_font(Canvas* canvas, Font font) {
|
void canvas_set_font(Canvas* canvas, Font font) {
|
||||||
furi_assert(canvas);
|
furi_assert(canvas);
|
||||||
u8g2_SetFontMode(&canvas->fb, 1);
|
u8g2_SetFontMode(&canvas->fb, 1);
|
||||||
if(font == FontPrimary) {
|
switch(font) {
|
||||||
u8g2_SetFont(&canvas->fb, u8g2_font_helvB08_tr);
|
case FontPrimary:
|
||||||
} else if(font == FontSecondary) {
|
u8g2_SetFont(&canvas->fb, u8g2_font_helvB08_tr);
|
||||||
u8g2_SetFont(&canvas->fb, u8g2_font_haxrcorp4089_tr);
|
break;
|
||||||
} else if(font == FontKeyboard) {
|
case FontSecondary:
|
||||||
u8g2_SetFont(&canvas->fb, u8g2_font_profont11_mr);
|
u8g2_SetFont(&canvas->fb, u8g2_font_haxrcorp4089_tr);
|
||||||
} else if(font == FontBigNumbers) {
|
break;
|
||||||
u8g2_SetFont(&canvas->fb, u8g2_font_profont22_tn);
|
case FontKeyboard:
|
||||||
} else if(font == FontBatteryPercent) {
|
u8g2_SetFont(&canvas->fb, u8g2_font_profont11_mr);
|
||||||
u8g2_SetFont(&canvas->fb, u8g2_font_5x7_tf); //u8g2_font_micro_tr);
|
break;
|
||||||
} else {
|
case FontBigNumbers:
|
||||||
furi_crash(NULL);
|
u8g2_SetFont(&canvas->fb, u8g2_font_profont22_tn);
|
||||||
|
break;
|
||||||
|
case FontBatteryPercent:
|
||||||
|
u8g2_SetFont(&canvas->fb, u8g2_font_5x7_tf); //u8g2_font_micro_tr);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
furi_crash(NULL);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user