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

    ui_sunsimspin = lv_spinner_create(ui_Screen2);
    //lv_spinner_set_anim_params(ui_sunsimspin, 1000, 90);
    lv_obj_set_width(ui_sunsimspin, 95);
    lv_obj_set_height(ui_sunsimspin, 97);
    lv_obj_set_x(ui_sunsimspin, 0);
    lv_obj_set_y(ui_sunsimspin, -10);
    lv_obj_set_align(ui_sunsimspin, LV_ALIGN_CENTER);
    lv_obj_remove_flag(ui_sunsimspin, LV_OBJ_FLAG_CLICKABLE);      /// Flags

    ui_lblsunsim = lv_label_create(ui_Screen2);
    lv_obj_set_width(ui_lblsunsim, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_lblsunsim, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_lblsunsim, 0);
    lv_obj_set_y(ui_lblsunsim, -90);
    lv_obj_set_align(ui_lblsunsim, LV_ALIGN_CENTER);
    lv_label_set_text(ui_lblsunsim, "Sonnensimulation");
    lv_obj_set_style_text_font(ui_lblsunsim, &lv_font_montserrat_22, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_endtime = lv_label_create(ui_Screen2);
    lv_obj_set_width(ui_endtime, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_endtime, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_endtime, 0);
    lv_obj_set_y(ui_endtime, 80);
    lv_obj_set_align(ui_endtime, LV_ALIGN_CENTER);
    lv_label_set_text(ui_endtime, "Sonnenuntergang: 12:00 Uhr");

    ui_starttime = lv_label_create(ui_Screen2);
    lv_obj_set_width(ui_starttime, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_starttime, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_starttime, 0);
    lv_obj_set_y(ui_starttime, 60);
    lv_obj_set_align(ui_starttime, LV_ALIGN_CENTER);
    lv_label_set_text(ui_starttime, "Sonnenaufgang: 18:00 Uhr");

    ui_clock = lv_label_create(ui_Screen2);
    lv_obj_set_width(ui_clock, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_clock, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_clock, 0);
    lv_obj_set_y(ui_clock, 101);
    lv_obj_set_align(ui_clock, LV_ALIGN_CENTER);
    lv_label_set_text(ui_clock, "Uhrzeit: ");

    ui_simhome = lv_image_create(ui_Screen2);
    lv_image_set_src(ui_simhome, &ui_img_home_png);
    lv_obj_set_width(ui_simhome, LV_SIZE_CONTENT);   /// 64
    lv_obj_set_height(ui_simhome, LV_SIZE_CONTENT);    /// 64
    lv_obj_set_x(ui_simhome, -120);
    lv_obj_set_y(ui_simhome, -11);
    lv_obj_set_align(ui_simhome, LV_ALIGN_CENTER);
    lv_obj_add_flag(ui_simhome, LV_OBJ_FLAG_CLICKABLE);     /// Flags
    lv_obj_remove_flag(ui_simhome, LV_OBJ_FLAG_SCROLLABLE);      /// Flags

    lv_obj_add_event_cb(ui_simhome, ui_event_simhome, LV_EVENT_ALL, NULL);

}
