// This file was generated by SquareLine Studio
// SquareLine Studio version: SquareLine Studio 1.4.2
// LVGL version: 9.1.0
// Project name: SmartGrow

#include "ui.h"

void ui_Screen3_screen_init(void)
{
    ui_Screen3 = lv_obj_create(NULL);
    lv_obj_remove_flag(ui_Screen3, LV_OBJ_FLAG_SCROLLABLE);      /// Flags

    ui_Image1 = lv_image_create(ui_Screen3);
    lv_image_set_src(ui_Image1, &ui_img_thermo_png);
    lv_obj_set_width(ui_Image1, LV_SIZE_CONTENT);   /// 64
    lv_obj_set_height(ui_Image1, LV_SIZE_CONTENT);    /// 64
    lv_obj_set_x(ui_Image1, -120);
    lv_obj_set_y(ui_Image1, -70);
    lv_obj_set_align(ui_Image1, LV_ALIGN_CENTER);
    lv_obj_add_flag(ui_Image1, LV_OBJ_FLAG_CLICKABLE);     /// Flags
    lv_obj_remove_flag(ui_Image1, LV_OBJ_FLAG_SCROLLABLE);      /// Flags

    ui_Image2 = lv_image_create(ui_Screen3);
    lv_image_set_src(ui_Image2, &ui_img_humidity_png);
    lv_obj_set_width(ui_Image2, LV_SIZE_CONTENT);   /// 64
    lv_obj_set_height(ui_Image2, LV_SIZE_CONTENT);    /// 64
    lv_obj_set_x(ui_Image2, 30);
    lv_obj_set_y(ui_Image2, -70);
    lv_obj_set_align(ui_Image2, LV_ALIGN_CENTER);
    lv_obj_add_flag(ui_Image2, LV_OBJ_FLAG_CLICKABLE);     /// Flags
    lv_obj_remove_flag(ui_Image2, LV_OBJ_FLAG_SCROLLABLE);      /// Flags

    ui_fantemp = lv_label_create(ui_Screen3);
    lv_obj_set_width(ui_fantemp, 64);
    lv_obj_set_height(ui_fantemp, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_fantemp, -50);
    lv_obj_set_y(ui_fantemp, -70);
    lv_obj_set_align(ui_fantemp, LV_ALIGN_CENTER);
    lv_label_set_text(ui_fantemp, "30 °C");
    lv_obj_set_style_text_font(ui_fantemp, &lv_font_montserrat_22, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_fanhum = lv_label_create(ui_Screen3);
    lv_obj_set_width(ui_fanhum, 64);
    lv_obj_set_height(ui_fanhum, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_fanhum, 100);
    lv_obj_set_y(ui_fanhum, -70);
    lv_obj_set_align(ui_fanhum, LV_ALIGN_CENTER);
    lv_label_set_text(ui_fanhum, "50 %");
    lv_obj_set_style_text_font(ui_fanhum, &lv_font_montserrat_22, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_lblfanfanspeed = lv_label_create(ui_Screen3);
    lv_obj_set_width(ui_lblfanfanspeed, 64);
    lv_obj_set_height(ui_lblfanfanspeed, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_lblfanfanspeed, -50);
    lv_obj_set_y(ui_lblfanfanspeed, 5);
    lv_obj_set_align(ui_lblfanfanspeed, LV_ALIGN_CENTER);
    lv_label_set_text(ui_lblfanfanspeed, "50 %");
    lv_obj_set_style_text_font(ui_lblfanfanspeed, &lv_font_montserrat_22, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_btnfandown = lv_imagebutton_create(ui_Screen3);
    lv_imagebutton_set_src(ui_btnfandown, LV_IMAGEBUTTON_STATE_RELEASED, NULL, &ui_img_down_png, NULL);
    lv_imagebutton_set_src(ui_btnfandown, LV_IMAGEBUTTON_STATE_PRESSED, NULL, &ui_img_down_png, NULL);
    lv_imagebutton_set_src(ui_btnfandown, LV_IMAGEBUTTON_STATE_DISABLED, NULL, &ui__temporary_image, NULL);
    lv_imagebutton_set_src(ui_btnfandown, LV_IMAGEBUTTON_STATE_CHECKED_PRESSED, NULL, &ui__temporary_image, NULL);
    lv_imagebutton_set_src(ui_btnfandown, LV_IMAGEBUTTON_STATE_CHECKED_RELEASED, NULL, &ui__temporary_image, NULL);
    lv_imagebutton_set_src(ui_btnfandown, LV_IMAGEBUTTON_STATE_CHECKED_DISABLED, NULL, &ui__temporary_image, NULL);
    lv_obj_set_height(ui_btnfandown, 64);
    lv_obj_set_width(ui_btnfandown, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_x(ui_btnfandown, -50);
    lv_obj_set_y(ui_btnfandown, 80);
    lv_obj_set_align(ui_btnfandown, LV_ALIGN_CENTER);
    lv_obj_set_style_bg_color(ui_btnfandown, lv_color_hex(0xF9F597), LV_PART_MAIN | LV_STATE_PRESSED);
    lv_obj_set_style_bg_opa(ui_btnfandown, 255, LV_PART_MAIN | LV_STATE_PRESSED);

    ui_btnfanup = lv_imagebutton_create(ui_Screen3);
    lv_imagebutton_set_src(ui_btnfanup, LV_IMAGEBUTTON_STATE_RELEASED, NULL, &ui_img_up_png, NULL);
    lv_imagebutton_set_src(ui_btnfanup, LV_IMAGEBUTTON_STATE_PRESSED, NULL, &ui_img_up_png, NULL);
    lv_imagebutton_set_src(ui_btnfanup, LV_IMAGEBUTTON_STATE_DISABLED, NULL, &ui__temporary_image, NULL);
    lv_imagebutton_set_src(ui_btnfanup, LV_IMAGEBUTTON_STATE_CHECKED_PRESSED, NULL, &ui__temporary_image, NULL);
    lv_imagebutton_set_src(ui_btnfanup, LV_IMAGEBUTTON_STATE_CHECKED_RELEASED, NULL, &ui__temporary_image, NULL);
    lv_imagebutton_set_src(ui_btnfanup, LV_IMAGEBUTTON_STATE_CHECKED_DISABLED, NULL, &ui__temporary_image, NULL);
    lv_obj_set_height(ui_btnfanup, 64);
    lv_obj_set_width(ui_btnfanup, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_x(ui_btnfanup, -120);
    lv_obj_set_y(ui_btnfanup, 80);
    lv_obj_set_align(ui_btnfanup, LV_ALIGN_CENTER);
    lv_obj_set_style_bg_color(ui_btnfanup, lv_color_hex(0xF9F597), LV_PART_MAIN | LV_STATE_PRESSED);
    lv_obj_set_style_bg_opa(ui_btnfanup, 255, LV_PART_MAIN | LV_STATE_PRESSED);

    ui_Image6 = lv_image_create(ui_Screen3);
    lv_image_set_src(ui_Image6, &ui_img_fan_png);
    lv_obj_set_width(ui_Image6, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_Image6, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_Image6, -120);
    lv_obj_set_y(ui_Image6, 5);
    lv_obj_set_align(ui_Image6, LV_ALIGN_CENTER);
    lv_obj_add_flag(ui_Image6, LV_OBJ_FLAG_CLICKABLE);     /// Flags
    lv_obj_remove_flag(ui_Image6, LV_OBJ_FLAG_SCROLLABLE);      /// Flags

    ui_btnfanhome = lv_imagebutton_create(ui_Screen3);
    lv_imagebutton_set_src(ui_btnfanhome, LV_IMAGEBUTTON_STATE_RELEASED, NULL, &ui_img_home_png, NULL);
    lv_imagebutton_set_src(ui_btnfanhome, LV_IMAGEBUTTON_STATE_PRESSED, NULL, &ui_img_home_png, NULL);
    lv_imagebutton_set_src(ui_btnfanhome, LV_IMAGEBUTTON_STATE_DISABLED, NULL, &ui__temporary_image, NULL);
    lv_imagebutton_set_src(ui_btnfanhome, LV_IMAGEBUTTON_STATE_CHECKED_PRESSED, NULL, &ui__temporary_image, NULL);
    lv_imagebutton_set_src(ui_btnfanhome, LV_IMAGEBUTTON_STATE_CHECKED_RELEASED, NULL, &ui__temporary_image, NULL);
    lv_imagebutton_set_src(ui_btnfanhome, LV_IMAGEBUTTON_STATE_CHECKED_DISABLED, NULL, &ui__temporary_image, NULL);
    lv_obj_set_height(ui_btnfanhome, 64);
    lv_obj_set_width(ui_btnfanhome, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_x(ui_btnfanhome, 48);
    lv_obj_set_y(ui_btnfanhome, 80);
    lv_obj_set_align(ui_btnfanhome, LV_ALIGN_CENTER);
    lv_obj_set_style_bg_color(ui_btnfanhome, lv_color_hex(0xF9F597), LV_PART_MAIN | LV_STATE_PRESSED);
    lv_obj_set_style_bg_opa(ui_btnfanhome, 255, LV_PART_MAIN | LV_STATE_PRESSED);

    ui_switchfanstatus = lv_switch_create(ui_Screen3);
    lv_obj_set_width(ui_switchfanstatus, 50);
    lv_obj_set_height(ui_switchfanstatus, 25);
    lv_obj_set_x(ui_switchfanstatus, 100);
    lv_obj_set_y(ui_switchfanstatus, 5);
    lv_obj_set_align(ui_switchfanstatus, LV_ALIGN_CENTER);


    ui_lblfanstatus = lv_label_create(ui_Screen3);
    lv_obj_set_width(ui_lblfanstatus, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_lblfanstatus, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_lblfanstatus, 30);
    lv_obj_set_y(ui_lblfanstatus, 5);
    lv_obj_set_align(ui_lblfanstatus, LV_ALIGN_CENTER);
    lv_label_set_text(ui_lblfanstatus, "ON");
    lv_obj_set_style_text_font(ui_lblfanstatus, &lv_font_montserrat_22, LV_PART_MAIN | LV_STATE_DEFAULT);

    lv_obj_add_event_cb(ui_btnfanhome, ui_event_btnfanhome, LV_EVENT_ALL, NULL);

}
