NerdNos-Firmware/lib/hansolov2/screens/ui_HomeScreen.c
2024-03-24 15:38:35 +01:00

279 lines
15 KiB
C

// This file was generated by SquareLine Studio
// SquareLine Studio version: SquareLine Studio 1.4.0
// LVGL version: 8.3.6
// Project name: han-wt32
#include "../ui.h"
void ui_HomeScreen_screen_init(void)
{
ui_HomeScreen = lv_obj_create(NULL);
lv_obj_clear_flag(ui_HomeScreen, LV_OBJ_FLAG_SCROLLABLE); /// Flags
lv_obj_set_style_bg_img_src(ui_HomeScreen, &ui_img_sky_png, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_btnconfirm = lv_btn_create(ui_HomeScreen);
lv_obj_set_width(ui_btnconfirm, 100);
lv_obj_set_height(ui_btnconfirm, 50);
lv_obj_set_x(ui_btnconfirm, -59);
lv_obj_set_y(ui_btnconfirm, 124);
lv_obj_set_align(ui_btnconfirm, LV_ALIGN_CENTER);
lv_obj_add_flag(ui_btnconfirm, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
lv_obj_clear_flag(ui_btnconfirm, LV_OBJ_FLAG_SCROLLABLE); /// Flags
lv_obj_set_style_bg_color(ui_btnconfirm, lv_color_hex(0xFAFF00), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui_btnconfirm, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_btnpost = lv_btn_create(ui_HomeScreen);
lv_obj_set_width(ui_btnpost, 100);
lv_obj_set_height(ui_btnpost, 50);
lv_obj_set_x(ui_btnpost, 60);
lv_obj_set_y(ui_btnpost, 124);
lv_obj_set_align(ui_btnpost, LV_ALIGN_CENTER);
lv_obj_add_flag(ui_btnpost, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
lv_obj_clear_flag(ui_btnpost, LV_OBJ_FLAG_SCROLLABLE); /// Flags
lv_obj_set_style_bg_color(ui_btnpost, lv_color_hex(0xFF9400), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui_btnpost, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Image1 = lv_img_create(ui_HomeScreen);
lv_img_set_src(ui_Image1, &ui_img_1552732429);
lv_obj_set_width(ui_Image1, LV_SIZE_CONTENT); /// 100
lv_obj_set_height(ui_Image1, LV_SIZE_CONTENT); /// 100
lv_obj_set_x(ui_Image1, 189);
lv_obj_set_y(ui_Image1, -110);
lv_obj_set_align(ui_Image1, LV_ALIGN_CENTER);
lv_obj_add_flag(ui_Image1, LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(ui_Image1, LV_OBJ_FLAG_SCROLLABLE); /// Flags
ui_barhashrate = lv_bar_create(ui_HomeScreen);
lv_bar_set_range(ui_barhashrate, 0, 1000);
lv_bar_set_value(ui_barhashrate, 800, LV_ANIM_OFF);
lv_bar_set_start_value(ui_barhashrate, 0, LV_ANIM_OFF);
lv_obj_set_width(ui_barhashrate, 363);
lv_obj_set_height(ui_barhashrate, 17);
lv_obj_set_x(ui_barhashrate, -52);
lv_obj_set_y(ui_barhashrate, -74);
lv_obj_set_align(ui_barhashrate, LV_ALIGN_CENTER);
lv_obj_set_style_bg_color(ui_barhashrate, lv_color_hex(0xFAFF00), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui_barhashrate, 50, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_anim_time(ui_barhashrate, 500, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_bg_color(ui_barhashrate, lv_color_hex(0xFAFF20), LV_PART_INDICATOR | LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui_barhashrate, 255, LV_PART_INDICATOR | LV_STATE_DEFAULT);
ui_Label6 = lv_label_create(ui_HomeScreen);
lv_obj_set_width(ui_Label6, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Label6, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Label6, 65);
lv_obj_set_y(ui_Label6, -46);
lv_obj_set_align(ui_Label6, LV_ALIGN_CENTER);
lv_label_set_text(ui_Label6, "Best difficulty");
lv_obj_set_style_text_color(ui_Label6, lv_color_hex(0x2EFF00), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_Label6, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_Label6, &ui_font_start16, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Label4 = lv_label_create(ui_HomeScreen);
lv_obj_set_width(ui_Label4, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Label4, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Label4, -47);
lv_obj_set_y(ui_Label4, -128);
lv_obj_set_align(ui_Label4, LV_ALIGN_CENTER);
lv_label_set_text(ui_Label4, "Hashrate KH/s");
lv_obj_set_style_text_color(ui_Label4, lv_color_hex(0xFAFF00), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_Label4, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_Label4, &ui_font_star32, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Label7 = lv_label_create(ui_HomeScreen);
lv_obj_set_width(ui_Label7, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Label7, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Label7, -173);
lv_obj_set_y(ui_Label7, -47);
lv_obj_set_align(ui_Label7, LV_ALIGN_CENTER);
lv_label_set_text(ui_Label7, "valid blocks");
lv_obj_set_style_text_color(ui_Label7, lv_color_hex(0xFF0000), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_Label7, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_Label7, &ui_font_start16, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_btndelete = lv_btn_create(ui_HomeScreen);
lv_obj_set_width(ui_btndelete, 100);
lv_obj_set_height(ui_btndelete, 50);
lv_obj_set_x(ui_btndelete, 183);
lv_obj_set_y(ui_btndelete, 124);
lv_obj_set_align(ui_btndelete, LV_ALIGN_CENTER);
lv_obj_add_flag(ui_btndelete, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
lv_obj_clear_flag(ui_btndelete, LV_OBJ_FLAG_SCROLLABLE); /// Flags
lv_obj_set_style_bg_color(ui_btndelete, lv_color_hex(0xFF0000), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui_btndelete, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Label8 = lv_label_create(ui_HomeScreen);
lv_obj_set_width(ui_Label8, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Label8, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Label8, -154);
lv_obj_set_y(ui_Label8, -14);
lv_obj_set_align(ui_Label8, LV_ALIGN_CENTER);
lv_label_set_text(ui_Label8, "block templates");
lv_obj_set_style_text_color(ui_Label8, lv_color_hex(0xFAFF00), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_Label8, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_Label8, &ui_font_start16, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Label10 = lv_label_create(ui_HomeScreen);
lv_obj_set_width(ui_Label10, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Label10, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Label10, 75);
lv_obj_set_y(ui_Label10, -13);
lv_obj_set_align(ui_Label10, LV_ALIGN_CENTER);
lv_label_set_text(ui_Label10, "32bits shares");
lv_obj_set_style_text_color(ui_Label10, lv_color_hex(0x2EFF00), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_Label10, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_Label10, &ui_font_start16, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_lblhashrate = lv_label_create(ui_HomeScreen);
lv_obj_set_width(ui_lblhashrate, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_lblhashrate, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_lblhashrate, 8);
lv_obj_set_y(ui_lblhashrate, -126);
lv_obj_set_align(ui_lblhashrate, LV_ALIGN_CENTER);
lv_label_set_text(ui_lblhashrate, "00.00");
lv_obj_set_style_text_color(ui_lblhashrate, lv_color_hex(0xFAFF00), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_lblhashrate, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_lblhashrate, &ui_font_calculator48, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_lblbestdiff = lv_label_create(ui_HomeScreen);
lv_obj_set_width(ui_lblbestdiff, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_lblbestdiff, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_lblbestdiff, 392);
lv_obj_set_y(ui_lblbestdiff, 95);
lv_label_set_text(ui_lblbestdiff, "0");
lv_obj_set_style_text_color(ui_lblbestdiff, lv_color_hex(0x2EFF00), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_lblbestdiff, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_lblbestdiff, &ui_font_calculator32, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_lbltemplates = lv_label_create(ui_HomeScreen);
lv_obj_set_width(ui_lbltemplates, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_lbltemplates, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_lbltemplates, 178);
lv_obj_set_y(ui_lbltemplates, 129);
lv_label_set_text(ui_lbltemplates, "0");
lv_obj_set_style_text_color(ui_lbltemplates, lv_color_hex(0xFAFF00), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_lbltemplates, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_lbltemplates, &ui_font_calculator32, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_lblvalid = lv_label_create(ui_HomeScreen);
lv_obj_set_width(ui_lblvalid, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_lblvalid, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_lblvalid, 178);
lv_obj_set_y(ui_lblvalid, 96);
lv_label_set_text(ui_lblvalid, "0");
lv_obj_set_style_text_color(ui_lblvalid, lv_color_hex(0xFF0000), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_lblvalid, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_lblvalid, &ui_font_calculator32, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_lblshares32 = lv_label_create(ui_HomeScreen);
lv_obj_set_width(ui_lblshares32, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_lblshares32, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_lblshares32, 392);
lv_obj_set_y(ui_lblshares32, 129);
lv_label_set_text(ui_lblshares32, "0");
lv_obj_set_style_text_color(ui_lblshares32, lv_color_hex(0x2EFF00), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_lblshares32, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_lblshares32, &ui_font_calculator32, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_lblclock = lv_label_create(ui_HomeScreen);
lv_obj_set_width(ui_lblclock, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_lblclock, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_lblclock, 141);
lv_obj_set_y(ui_lblclock, 62);
lv_obj_set_align(ui_lblclock, LV_ALIGN_CENTER);
lv_label_set_text(ui_lblclock, "0 00:00:00");
lv_obj_set_style_text_color(ui_lblclock, lv_color_hex(0xFAFF00), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_lblclock, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_lblclock, &ui_font_calculator48, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Label2 = lv_label_create(ui_HomeScreen);
lv_obj_set_width(ui_Label2, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Label2, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Label2, 12);
lv_obj_set_y(ui_Label2, 68);
lv_obj_set_align(ui_Label2, LV_ALIGN_CENTER);
lv_label_set_text(ui_Label2, "uptime");
lv_obj_set_style_text_color(ui_Label2, lv_color_hex(0xFAFF00), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_Label2, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_Label2, &ui_font_start16, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_btnpre = lv_btn_create(ui_HomeScreen);
lv_obj_set_width(ui_btnpre, 100);
lv_obj_set_height(ui_btnpre, 50);
lv_obj_set_x(ui_btnpre, -177);
lv_obj_set_y(ui_btnpre, 124);
lv_obj_set_align(ui_btnpre, LV_ALIGN_CENTER);
lv_obj_add_flag(ui_btnpre, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
lv_obj_clear_flag(ui_btnpre, LV_OBJ_FLAG_SCROLLABLE); /// Flags
lv_obj_set_style_bg_color(ui_btnpre, lv_color_hex(0x2EFF00), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui_btnpre, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Label11 = lv_label_create(ui_HomeScreen);
lv_obj_set_width(ui_Label11, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Label11, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Label11, -156);
lv_obj_set_y(ui_Label11, 19);
lv_obj_set_align(ui_Label11, LV_ALIGN_CENTER);
lv_label_set_text(ui_Label11, "Total hashrate ");
lv_obj_set_style_text_color(ui_Label11, lv_color_hex(0x2EFF00), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_Label11, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_Label11, &ui_font_start16, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_lbltotalhashrate = lv_label_create(ui_HomeScreen);
lv_obj_set_width(ui_lbltotalhashrate, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_lbltotalhashrate, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_lbltotalhashrate, 178);
lv_obj_set_y(ui_lbltotalhashrate, 160);
lv_label_set_text(ui_lbltotalhashrate, "0");
lv_obj_set_style_text_color(ui_lbltotalhashrate, lv_color_hex(0x2EFF00), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_lbltotalhashrate, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_lbltotalhashrate, &ui_font_calculator32, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Label19 = lv_label_create(ui_HomeScreen);
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, -172);
lv_obj_set_y(ui_Label19, 68);
lv_obj_set_align(ui_Label19, LV_ALIGN_CENTER);
lv_label_set_text(ui_Label19, "Temperature");
lv_obj_set_style_text_color(ui_Label19, lv_color_hex(0xFF9A00), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_Label19, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_Label19, &ui_font_start16, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_lbltemperature = lv_label_create(ui_HomeScreen);
lv_obj_set_width(ui_lbltemperature, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_lbltemperature, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_lbltemperature, 179);
lv_obj_set_y(ui_lbltemperature, 67);
lv_obj_set_align(ui_lbltemperature, LV_ALIGN_LEFT_MID);
lv_label_set_text(ui_lbltemperature, "00");
lv_obj_set_style_text_color(ui_lbltemperature, lv_color_hex(0xFF9A00), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_lbltemperature, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_lbltemperature, &ui_font_calculator32, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Label5 = lv_label_create(ui_HomeScreen);
lv_obj_set_width(ui_Label5, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Label5, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Label5, -179);
lv_obj_set_y(ui_Label5, 126);
lv_obj_set_align(ui_Label5, LV_ALIGN_CENTER);
lv_label_set_text(ui_Label5, "Pre");
lv_obj_set_style_text_color(ui_Label5, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_Label5, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Label9 = lv_label_create(ui_HomeScreen);
lv_obj_set_width(ui_Label9, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Label9, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Label9, 59);
lv_obj_set_y(ui_Label9, 126);
lv_obj_set_align(ui_Label9, LV_ALIGN_CENTER);
lv_label_set_text(ui_Label9, "Post");
lv_obj_set_style_text_color(ui_Label9, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_Label9, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_add_event_cb(ui_btnpost, ui_event_btnpost, LV_EVENT_ALL, NULL);
lv_obj_add_event_cb(ui_btnpre, ui_event_btnpre, LV_EVENT_ALL, NULL);
}