FluxDC/components/FluxUI/screens/ui_Batinfo.c

150 lines
6.9 KiB
C
Raw Normal View History

// This file was generated by SquareLine Studio
// SquareLine Studio version: SquareLine Studio 1.5.1
// LVGL version: 8.3.6
// Project name: ESP32S3_UI
#include "../ui.h"
void ui_Batinfo_screen_init(void)
{
ui_Batinfo = lv_obj_create(NULL);
lv_obj_clear_flag(ui_Batinfo, LV_OBJ_FLAG_SCROLLABLE); /// Flags
ui_Panel8 = lv_obj_create(ui_Batinfo);
lv_obj_set_width(ui_Panel8, 320);
lv_obj_set_height(ui_Panel8, 50);
lv_obj_set_align(ui_Panel8, LV_ALIGN_TOP_MID);
lv_obj_clear_flag(ui_Panel8, LV_OBJ_FLAG_SCROLLABLE); /// Flags
lv_obj_set_style_radius(ui_Panel8, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_border_width(ui_Panel8, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Label14 = lv_label_create(ui_Panel8);
lv_obj_set_width(ui_Label14, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Label14, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Label14, 4);
lv_obj_set_y(ui_Label14, 0);
lv_obj_set_align(ui_Label14, LV_ALIGN_LEFT_MID);
lv_label_set_text(ui_Label14, "<");
ui_Label15 = lv_label_create(ui_Panel8);
lv_obj_set_width(ui_Label15, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Label15, LV_SIZE_CONTENT); /// 1
lv_obj_set_align(ui_Label15, LV_ALIGN_CENTER);
lv_label_set_text(ui_Label15, "电池");
lv_obj_set_style_text_font(ui_Label15, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Panel9 = lv_obj_create(ui_Batinfo);
lv_obj_set_width(ui_Panel9, 310);
lv_obj_set_height(ui_Panel9, 221);
lv_obj_set_x(ui_Panel9, 0);
lv_obj_set_y(ui_Panel9, -73);
lv_obj_set_align(ui_Panel9, LV_ALIGN_CENTER);
lv_obj_clear_flag(ui_Panel9, LV_OBJ_FLAG_SCROLLABLE); /// Flags
lv_obj_set_style_bg_color(ui_Panel9, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui_Panel9, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Label16 = lv_label_create(ui_Panel9);
lv_obj_set_width(ui_Label16, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Label16, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Label16, -122);
lv_obj_set_y(ui_Label16, -75);
lv_obj_set_align(ui_Label16, LV_ALIGN_CENTER);
lv_label_set_text(ui_Label16, "电量:");
lv_obj_set_style_text_font(ui_Label16, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_BarBAT = lv_bar_create(ui_Panel9);
lv_bar_set_value(ui_BarBAT, 25, LV_ANIM_OFF);
lv_bar_set_start_value(ui_BarBAT, 0, LV_ANIM_OFF);
lv_obj_set_width(ui_BarBAT, 178);
lv_obj_set_height(ui_BarBAT, 15);
lv_obj_set_x(ui_BarBAT, -3);
lv_obj_set_y(ui_BarBAT, -75);
lv_obj_set_align(ui_BarBAT, LV_ALIGN_CENTER);
lv_obj_add_flag(ui_BarBAT, LV_OBJ_FLAG_CLICKABLE); /// Flags
ui_Label19 = lv_label_create(ui_Panel9);
lv_obj_set_width(ui_Label19, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Label19, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Label19, -97);
lv_obj_set_y(ui_Label19, -42);
lv_obj_set_align(ui_Label19, LV_ALIGN_CENTER);
lv_label_set_text(ui_Label19, "最大采样值:");
lv_obj_set_style_text_font(ui_Label19, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Label22 = lv_label_create(ui_Panel9);
lv_obj_set_width(ui_Label22, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Label22, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Label22, -112);
lv_obj_set_y(ui_Label22, 13);
lv_obj_set_align(ui_Label22, LV_ALIGN_CENTER);
lv_label_set_text(ui_Label22, "总电压:");
lv_obj_set_style_text_font(ui_Label22, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_LabelValue = lv_label_create(ui_Panel9);
lv_obj_set_width(ui_LabelValue, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_LabelValue, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_LabelValue, -33);
lv_obj_set_y(ui_LabelValue, -42);
lv_obj_set_align(ui_LabelValue, LV_ALIGN_CENTER);
lv_label_set_text(ui_LabelValue, "4096");
ui_LabelVoltage = lv_label_create(ui_Panel9);
lv_obj_set_width(ui_LabelVoltage, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_LabelVoltage, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_LabelVoltage, -68);
lv_obj_set_y(ui_LabelVoltage, 14);
lv_obj_set_align(ui_LabelVoltage, LV_ALIGN_CENTER);
lv_label_set_text(ui_LabelVoltage, "4.2v");
ui_labelSampleVoltage = lv_label_create(ui_Panel9);
lv_obj_set_width(ui_labelSampleVoltage, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_labelSampleVoltage, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_labelSampleVoltage, -102);
lv_obj_set_y(ui_labelSampleVoltage, 55);
lv_obj_set_align(ui_labelSampleVoltage, LV_ALIGN_CENTER);
lv_label_set_text(ui_labelSampleVoltage, "采样电压:");
lv_obj_set_style_text_font(ui_labelSampleVoltage, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Label21 = lv_label_create(ui_Panel9);
lv_obj_set_width(ui_Label21, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Label21, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Label21, -81);
lv_obj_set_y(ui_Label21, -14);
lv_obj_set_align(ui_Label21, LV_ALIGN_CENTER);
lv_label_set_text(ui_Label21, "总电量:600mAh");
lv_obj_set_style_text_font(ui_Label21, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_labelSampleVolume = lv_label_create(ui_Panel9);
lv_obj_set_width(ui_labelSampleVolume, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_labelSampleVolume, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_labelSampleVolume, -101);
lv_obj_set_y(ui_labelSampleVolume, 77);
lv_obj_set_align(ui_labelSampleVolume, LV_ALIGN_CENTER);
lv_label_set_text(ui_labelSampleVolume, "采样电量:");
lv_obj_set_style_text_font(ui_labelSampleVolume, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_valueVoltage = lv_label_create(ui_Panel9);
lv_obj_set_width(ui_valueVoltage, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_valueVoltage, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_valueVoltage, 18);
lv_obj_set_y(ui_valueVoltage, 54);
lv_obj_set_align(ui_valueVoltage, LV_ALIGN_CENTER);
lv_label_set_text(ui_valueVoltage, "3.3v");
lv_obj_set_style_text_color(ui_valueVoltage, lv_color_hex(0x808080), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_valueVoltage, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_valueVolume = lv_label_create(ui_Panel9);
lv_obj_set_width(ui_valueVolume, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_valueVolume, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_valueVolume, 19);
lv_obj_set_y(ui_valueVolume, 75);
lv_obj_set_align(ui_valueVolume, LV_ALIGN_CENTER);
lv_label_set_text(ui_valueVolume, "580mAh");
lv_obj_set_style_text_color(ui_valueVolume, lv_color_hex(0x808080), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_valueVolume, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_add_event_cb(ui_Panel8, ui_event_Panel8, LV_EVENT_ALL, NULL);
lv_obj_add_event_cb(ui_Batinfo, ui_event_Batinfo, LV_EVENT_ALL, NULL);
}