firmware: Add Valorant font

This commit is contained in:
2024-12-11 21:18:18 +00:00
parent 680edbfd81
commit 8bdd1c018f
9 changed files with 18 additions and 11 deletions

View File

@@ -1,3 +1,3 @@
idf_component_register(
SRCS "valconomy.c" "ui.c" "lcd.c" "usb.c"
SRCS "valconomy.c" "ui.c" "lcd.c" "usb.c" "font/tungsten_120.c"
INCLUDE_DIRS ".")

View File

View File

@@ -12,6 +12,10 @@ static void b_cfg_cb(lv_event_t *e) {
}
static void ui_home() {
lv_obj_t *l_test = lv_label_create(lv_screen_active());
lv_obj_set_style_text_font(l_test, &lv_font_tungsten_120, 0);
lv_label_set_text(l_test, "VAL TIME");
lv_obj_t *b_cfg = lv_button_create(lv_screen_active());
lv_obj_align(b_cfg, LV_ALIGN_BOTTOM_RIGHT, -10, -10);
lv_obj_add_event_cb(b_cfg, b_cfg_cb, LV_EVENT_CLICKED, NULL);

View File

@@ -2,4 +2,6 @@
#include "lvgl.h"
LV_FONT_DECLARE(lv_font_tungsten_120)
void val_lvgl_ui(lv_display_t *disp);