// 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_Screen1_screen_init(void)
{
    ui_Screen1 = lv_obj_create(NULL);
    lv_obj_remove_flag(ui_Screen1, LV_OBJ_FLAG_SCROLLABLE);      /// Flags

    ui_lblclock = lv_label_create(ui_Screen1);
    lv_obj_set_width(ui_lblclock, 121);
    lv_obj_set_height(ui_lblclock, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_lblclock, 0);
    lv_obj_set_y(ui_lblclock, 5);
    lv_obj_set_align(ui_lblclock, LV_ALIGN_TOP_MID);
    lv_label_set_text(ui_lblclock, "Uhrzeit: 20:30:00");

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

    ui_imghum = lv_image_create(ui_Screen1);
    lv_image_set_src(ui_imghum, &ui_img_humidity_png);
    lv_obj_set_width(ui_imghum, LV_SIZE_CONTENT);   /// 64
    lv_obj_set_height(ui_imghum, LV_SIZE_CONTENT);    /// 64
    lv_obj_set_x(ui_imghum, -120);
    lv_obj_set_y(ui_imghum, 5);
    lv_obj_set_align(ui_imghum, LV_ALIGN_CENTER);
    lv_obj_add_flag(ui_imghum, LV_OBJ_FLAG_ADV_HITTEST);     /// Flags
    lv_obj_remove_flag(ui_imghum, LV_OBJ_FLAG_SCROLLABLE);      /// Flags

    ui_btnmode = lv_image_create(ui_Screen1);
    lv_image_set_src(ui_btnmode, &ui_img_florist_png);
    lv_obj_set_width(ui_btnmode, LV_SIZE_CONTENT);   /// 64
    lv_obj_set_height(ui_btnmode, LV_SIZE_CONTENT);    /// 64
    lv_obj_set_x(ui_btnmode, -120);
    lv_obj_set_y(ui_btnmode, 80);
    lv_obj_set_align(ui_btnmode, LV_ALIGN_CENTER);
    lv_obj_add_flag(ui_btnmode, LV_OBJ_FLAG_ADV_HITTEST);     /// Flags
    lv_obj_remove_flag(ui_btnmode, LV_OBJ_FLAG_SCROLLABLE);      /// Flags

    ui_btnlight = lv_imagebutton_create(ui_Screen1);
    lv_imagebutton_set_src(ui_btnlight, LV_IMAGEBUTTON_STATE_RELEASED, NULL, &ui_img_light_png, NULL);
    lv_imagebutton_set_src(ui_btnlight, LV_IMAGEBUTTON_STATE_PRESSED, NULL, &ui_img_light_png, NULL);
    lv_imagebutton_set_src(ui_btnlight, LV_IMAGEBUTTON_STATE_DISABLED, NULL, &ui__temporary_image, NULL);
    lv_imagebutton_set_src(ui_btnlight, LV_IMAGEBUTTON_STATE_CHECKED_PRESSED, NULL, &ui__temporary_image, NULL);
    lv_imagebutton_set_src(ui_btnlight, LV_IMAGEBUTTON_STATE_CHECKED_RELEASED, NULL, &ui__temporary_image, NULL);
    lv_imagebutton_set_src(ui_btnlight, LV_IMAGEBUTTON_STATE_CHECKED_DISABLED, NULL, &ui__temporary_image, NULL);
    lv_obj_set_height(ui_btnlight, 64);
    lv_obj_set_width(ui_btnlight, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_x(ui_btnlight, 30);
    lv_obj_set_y(ui_btnlight, -70);
    lv_obj_set_align(ui_btnlight, LV_ALIGN_CENTER);
    lv_obj_set_style_bg_color(ui_btnlight, lv_color_hex(0xF9F597), LV_PART_MAIN | LV_STATE_PRESSED);
    lv_obj_set_style_bg_opa(ui_btnlight, 255, LV_PART_MAIN | LV_STATE_PRESSED);

    ui_btnfan = lv_imagebutton_create(ui_Screen1);
    lv_imagebutton_set_src(ui_btnfan, LV_IMAGEBUTTON_STATE_RELEASED, NULL, &ui_img_fan_png, NULL);
    lv_imagebutton_set_src(ui_btnfan, LV_IMAGEBUTTON_STATE_PRESSED, NULL, &ui_img_fan_png, NULL);
    lv_imagebutton_set_src(ui_btnfan, LV_IMAGEBUTTON_STATE_DISABLED, NULL, &ui__temporary_image, NULL);
    lv_imagebutton_set_src(ui_btnfan, LV_IMAGEBUTTON_STATE_CHECKED_PRESSED, NULL, &ui__temporary_image, NULL);
    lv_imagebutton_set_src(ui_btnfan, LV_IMAGEBUTTON_STATE_CHECKED_RELEASED, NULL, &ui__temporary_image, NULL);
    lv_imagebutton_set_src(ui_btnfan, LV_IMAGEBUTTON_STATE_CHECKED_DISABLED, NULL, &ui__temporary_image, NULL);
    lv_obj_set_height(ui_btnfan, 64);
    lv_obj_set_width(ui_btnfan, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_x(ui_btnfan, 30);
    lv_obj_set_y(ui_btnfan, 5);
    lv_obj_set_align(ui_btnfan, LV_ALIGN_CENTER);
    lv_obj_set_style_bg_color(ui_btnfan, lv_color_hex(0xF9F597), LV_PART_MAIN | LV_STATE_PRESSED);
    lv_obj_set_style_bg_opa(ui_btnfan, 255, LV_PART_MAIN | LV_STATE_PRESSED);

    ui_lbltemp = lv_label_create(ui_Screen1);
    lv_obj_set_width(ui_lbltemp, 60);
    lv_obj_set_height(ui_lbltemp, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_lbltemp, -50);
    lv_obj_set_y(ui_lbltemp, -70);
    lv_obj_set_align(ui_lbltemp, LV_ALIGN_CENTER);
    lv_label_set_text(ui_lbltemp, "");
    lv_obj_set_style_text_font(ui_lbltemp, &lv_font_montserrat_22, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_lblhum = lv_label_create(ui_Screen1);
    lv_obj_set_width(ui_lblhum, 60);
    lv_obj_set_height(ui_lblhum, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_lblhum, 80);
    lv_obj_set_y(ui_lblhum, 5);
    lv_obj_set_align(ui_lblhum, LV_ALIGN_LEFT_MID);
    lv_label_set_text(ui_lblhum, "");
    lv_obj_set_style_text_font(ui_lblhum, &lv_font_montserrat_22, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_lbllightstatus = lv_label_create(ui_Screen1);
    lv_obj_set_width(ui_lbllightstatus, 60);
    lv_obj_set_height(ui_lbllightstatus, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_lbllightstatus, 100);
    lv_obj_set_y(ui_lbllightstatus, -70);
    lv_obj_set_align(ui_lbllightstatus, LV_ALIGN_CENTER);
    lv_label_set_text(ui_lbllightstatus, "ON");
    lv_obj_set_style_text_font(ui_lbllightstatus, &lv_font_montserrat_22, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_lblfanspeed = lv_label_create(ui_Screen1);
    lv_obj_set_width(ui_lblfanspeed, 60);
    lv_obj_set_height(ui_lblfanspeed, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_lblfanspeed, 100);
    lv_obj_set_y(ui_lblfanspeed, 6);
    lv_obj_set_align(ui_lblfanspeed, LV_ALIGN_CENTER);
    lv_label_set_text(ui_lblfanspeed, "30 %");
    lv_obj_set_style_text_font(ui_lblfanspeed, &lv_font_montserrat_22, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_settings = lv_imagebutton_create(ui_Screen1);
    lv_imagebutton_set_src(ui_settings, LV_IMAGEBUTTON_STATE_RELEASED, NULL, &ui_img_settings_png, NULL);
    lv_imagebutton_set_src(ui_settings, LV_IMAGEBUTTON_STATE_PRESSED, NULL, &ui_img_settings_png, NULL);
    lv_imagebutton_set_src(ui_settings, LV_IMAGEBUTTON_STATE_DISABLED, NULL, &ui__temporary_image, NULL);
    lv_imagebutton_set_src(ui_settings, LV_IMAGEBUTTON_STATE_CHECKED_PRESSED, NULL, &ui__temporary_image, NULL);
    lv_imagebutton_set_src(ui_settings, LV_IMAGEBUTTON_STATE_CHECKED_RELEASED, NULL, &ui__temporary_image, NULL);
    lv_imagebutton_set_src(ui_settings, LV_IMAGEBUTTON_STATE_CHECKED_DISABLED, NULL, &ui__temporary_image, NULL);
    lv_obj_set_height(ui_settings, 64);
    lv_obj_set_width(ui_settings, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_x(ui_settings, 115);
    lv_obj_set_y(ui_settings, 80);
    lv_obj_set_align(ui_settings, LV_ALIGN_CENTER);

    ui_growmode = lv_dropdown_create(ui_Screen1);
    lv_dropdown_set_options(ui_growmode, "Manuell\nVeggie\nFlower");
    lv_obj_set_width(ui_growmode, 150);
    lv_obj_set_height(ui_growmode, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_growmode, 0);
    lv_obj_set_y(ui_growmode, 80);
    lv_obj_set_align(ui_growmode, LV_ALIGN_CENTER);
    lv_obj_add_flag(ui_growmode, LV_OBJ_FLAG_SCROLL_ON_FOCUS);     /// Flags



    lv_obj_add_event_cb(ui_btnlight, ui_event_btnlight, LV_EVENT_ALL, NULL);
    lv_obj_add_event_cb(ui_btnfan, ui_event_btnfan, LV_EVENT_ALL, NULL);
    lv_obj_add_event_cb(ui_settings, ui_event_settings, LV_EVENT_ALL, NULL);

}
