// This file was generated by SquareLine Studio
// SquareLine Studio version: SquareLine Studio 1.5.3
// LVGL version: 8.3.11
// Project name: Led+tem

#include "ui.h"

lv_obj_t * uic_uiLabelTemp;
lv_obj_t * uic_uiLedIndicator;
lv_obj_t * uic_uiButtonLED;
lv_obj_t * ui_Screen1 = NULL;
lv_obj_t * ui_uiButtonLED = NULL;
lv_obj_t * ui_Label6 = NULL;
lv_obj_t * ui_uiLedIndicator = NULL;
lv_obj_t * ui_uiLabelTemp = NULL;
// event funtions
void ui_event_uiButtonLED(lv_event_t * e)
{
    lv_event_code_t event_code = lv_event_get_code(e);

    if(event_code == LV_EVENT_CLICKED) {
        (e);
        (e);
    }
}

// build funtions

void ui_Screen1_screen_init(void)
{
    ui_Screen1 = lv_obj_create(NULL);
    lv_obj_clear_flag(ui_Screen1, LV_OBJ_FLAG_SCROLLABLE);      /// Flags

    ui_uiButtonLED = lv_btn_create(ui_Screen1);
    lv_obj_set_width(ui_uiButtonLED, 200);
    lv_obj_set_height(ui_uiButtonLED, 100);
    lv_obj_set_x(ui_uiButtonLED, 0);
    lv_obj_set_y(ui_uiButtonLED, 60);
    lv_obj_set_align(ui_uiButtonLED, LV_ALIGN_CENTER);
    lv_obj_add_flag(ui_uiButtonLED, LV_OBJ_FLAG_SCROLL_ON_FOCUS);     /// Flags
    lv_obj_clear_flag(ui_uiButtonLED, LV_OBJ_FLAG_SCROLLABLE);      /// Flags

    ui_Label6 = lv_label_create(ui_Screen1);
    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, 0);
    lv_obj_set_y(ui_Label6, 60);
    lv_obj_set_align(ui_Label6, LV_ALIGN_CENTER);
    lv_label_set_text(ui_Label6, "LED ON/OFF");

    ui_uiLedIndicator = lv_obj_create(ui_Screen1);
    lv_obj_set_width(ui_uiLedIndicator, 50);
    lv_obj_set_height(ui_uiLedIndicator, 50);
    lv_obj_set_x(ui_uiLedIndicator, 0);
    lv_obj_set_y(ui_uiLedIndicator, -80);
    lv_obj_set_align(ui_uiLedIndicator, LV_ALIGN_CENTER);
    lv_obj_clear_flag(ui_uiLedIndicator, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_radius(ui_uiLedIndicator, 100, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_uiLedIndicator, lv_color_hex(0x202020), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_uiLedIndicator, 255, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_uiLabelTemp = lv_label_create(ui_Screen1);
    lv_obj_set_width(ui_uiLabelTemp, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_uiLabelTemp, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_uiLabelTemp, -144);
    lv_obj_set_y(ui_uiLabelTemp, -80);
    lv_obj_set_align(ui_uiLabelTemp, LV_ALIGN_CENTER);
    lv_label_set_text(ui_uiLabelTemp, "Temp: --.- °C");

    lv_obj_add_event_cb(ui_uiButtonLED, ui_event_uiButtonLED, LV_EVENT_ALL, NULL);
    uic_uiButtonLED = ui_uiButtonLED;
    uic_uiLedIndicator = ui_uiLedIndicator;
    uic_uiLabelTemp = ui_uiLabelTemp;

}

void ui_Screen1_screen_destroy(void)
{
    if(ui_Screen1) lv_obj_del(ui_Screen1);

    // NULL screen variables
    ui_Screen1 = NULL;
    uic_uiButtonLED = NULL;
    ui_uiButtonLED = NULL;
    ui_Label6 = NULL;
    uic_uiLedIndicator = NULL;
    ui_uiLedIndicator = NULL;
    uic_uiLabelTemp = NULL;
    ui_uiLabelTemp = NULL;

}
