/*
 * Copyright 2022 NXP
 * SPDX-License-Identifier: MIT
 * The auto-generated can only be used on NXP devices
 */

#include "lvgl.h"
#include <stdio.h>
#include "gui_guider.h"
#include "events_init.h"
#include "custom.h"


void setup_scr_screen2(lv_ui *ui){

	//Write codes screen2
	ui->screen2 = lv_obj_create(NULL);

	//Write style state: LV_STATE_DEFAULT for style_screen2_main_main_default
	static lv_style_t style_screen2_main_main_default;
	if (style_screen2_main_main_default.prop_cnt > 1)
		lv_style_reset(&style_screen2_main_main_default);
	else
		lv_style_init(&style_screen2_main_main_default);
	lv_style_set_bg_color(&style_screen2_main_main_default, lv_color_make(0xff, 0xff, 0xff));
	lv_style_set_bg_opa(&style_screen2_main_main_default, 0);
	lv_obj_add_style(ui->screen2, &style_screen2_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);

	//Write codes screen2_btn_1
	ui->screen2_btn_1 = lv_btn_create(ui->screen2);
	lv_obj_set_pos(ui->screen2_btn_1, 110, 28);
	lv_obj_set_size(ui->screen2_btn_1, 100, 30);

	//Write style state: LV_STATE_DEFAULT for style_screen2_btn_1_main_main_default
	static lv_style_t style_screen2_btn_1_main_main_default;
	if (style_screen2_btn_1_main_main_default.prop_cnt > 1)
		lv_style_reset(&style_screen2_btn_1_main_main_default);
	else
		lv_style_init(&style_screen2_btn_1_main_main_default);
	lv_style_set_radius(&style_screen2_btn_1_main_main_default, 10);
	lv_style_set_bg_color(&style_screen2_btn_1_main_main_default, lv_color_make(0x21, 0x95, 0xf6));
	lv_style_set_bg_grad_color(&style_screen2_btn_1_main_main_default, lv_color_make(0x21, 0x95, 0xf6));
	lv_style_set_bg_grad_dir(&style_screen2_btn_1_main_main_default, LV_GRAD_DIR_VER);
	lv_style_set_bg_opa(&style_screen2_btn_1_main_main_default, 255);
	lv_style_set_shadow_color(&style_screen2_btn_1_main_main_default, lv_color_make(0x21, 0x95, 0xf6));
	lv_style_set_shadow_opa(&style_screen2_btn_1_main_main_default, 255);
	lv_style_set_border_color(&style_screen2_btn_1_main_main_default, lv_color_make(0x21, 0x95, 0xf6));
	lv_style_set_border_width(&style_screen2_btn_1_main_main_default, 0);
	lv_style_set_border_opa(&style_screen2_btn_1_main_main_default, 255);
	lv_obj_add_style(ui->screen2_btn_1, &style_screen2_btn_1_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
	ui->screen2_btn_1_label = lv_label_create(ui->screen2_btn_1);
	lv_label_set_text(ui->screen2_btn_1_label, "patient");
	lv_obj_set_style_text_color(ui->screen2_btn_1_label, lv_color_make(0x00, 0x00, 0x00), LV_STATE_DEFAULT);
	lv_obj_set_style_text_font(ui->screen2_btn_1_label, &lv_font_arial_12, LV_STATE_DEFAULT);
	lv_obj_set_style_pad_all(ui->screen2_btn_1, 0, LV_STATE_DEFAULT);
	lv_obj_align(ui->screen2_btn_1_label, LV_ALIGN_CENTER, 0, 0);

	//Write codes screen2_btn_2
	ui->screen2_btn_2 = lv_btn_create(ui->screen2);
	lv_obj_set_pos(ui->screen2_btn_2, 110, 83);
	lv_obj_set_size(ui->screen2_btn_2, 100, 30);

	//Write style state: LV_STATE_DEFAULT for style_screen2_btn_2_main_main_default
	static lv_style_t style_screen2_btn_2_main_main_default;
	if (style_screen2_btn_2_main_main_default.prop_cnt > 1)
		lv_style_reset(&style_screen2_btn_2_main_main_default);
	else
		lv_style_init(&style_screen2_btn_2_main_main_default);
	lv_style_set_radius(&style_screen2_btn_2_main_main_default, 10);
	lv_style_set_bg_color(&style_screen2_btn_2_main_main_default, lv_color_make(0x21, 0x95, 0xf6));
	lv_style_set_bg_grad_color(&style_screen2_btn_2_main_main_default, lv_color_make(0x21, 0x95, 0xf6));
	lv_style_set_bg_grad_dir(&style_screen2_btn_2_main_main_default, LV_GRAD_DIR_VER);
	lv_style_set_bg_opa(&style_screen2_btn_2_main_main_default, 255);
	lv_style_set_shadow_color(&style_screen2_btn_2_main_main_default, lv_color_make(0x21, 0x95, 0xf6));
	lv_style_set_shadow_opa(&style_screen2_btn_2_main_main_default, 255);
	lv_style_set_border_color(&style_screen2_btn_2_main_main_default, lv_color_make(0x21, 0x95, 0xf6));
	lv_style_set_border_width(&style_screen2_btn_2_main_main_default, 0);
	lv_style_set_border_opa(&style_screen2_btn_2_main_main_default, 255);
	lv_obj_add_style(ui->screen2_btn_2, &style_screen2_btn_2_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
	ui->screen2_btn_2_label = lv_label_create(ui->screen2_btn_2);
	lv_label_set_text(ui->screen2_btn_2_label, "control");
	lv_obj_set_style_text_color(ui->screen2_btn_2_label, lv_color_make(0x00, 0x00, 0x00), LV_STATE_DEFAULT);
	lv_obj_set_style_text_font(ui->screen2_btn_2_label, &lv_font_arial_12, LV_STATE_DEFAULT);
	lv_obj_set_style_pad_all(ui->screen2_btn_2, 0, LV_STATE_DEFAULT);
	lv_obj_align(ui->screen2_btn_2_label, LV_ALIGN_CENTER, 0, 0);

	//Write codes screen2_btn_3
	ui->screen2_btn_3 = lv_btn_create(ui->screen2);
	lv_obj_set_pos(ui->screen2_btn_3, 110, 190);
	lv_obj_set_size(ui->screen2_btn_3, 100, 30);

	//Write style state: LV_STATE_DEFAULT for style_screen2_btn_3_main_main_default
	static lv_style_t style_screen2_btn_3_main_main_default;
	if (style_screen2_btn_3_main_main_default.prop_cnt > 1)
		lv_style_reset(&style_screen2_btn_3_main_main_default);
	else
		lv_style_init(&style_screen2_btn_3_main_main_default);
	lv_style_set_radius(&style_screen2_btn_3_main_main_default, 10);
	lv_style_set_bg_color(&style_screen2_btn_3_main_main_default, lv_color_make(0x21, 0x95, 0xf6));
	lv_style_set_bg_grad_color(&style_screen2_btn_3_main_main_default, lv_color_make(0x21, 0x95, 0xf6));
	lv_style_set_bg_grad_dir(&style_screen2_btn_3_main_main_default, LV_GRAD_DIR_VER);
	lv_style_set_bg_opa(&style_screen2_btn_3_main_main_default, 255);
	lv_style_set_shadow_color(&style_screen2_btn_3_main_main_default, lv_color_make(0x21, 0x95, 0xf6));
	lv_style_set_shadow_opa(&style_screen2_btn_3_main_main_default, 255);
	lv_style_set_border_color(&style_screen2_btn_3_main_main_default, lv_color_make(0x21, 0x95, 0xf6));
	lv_style_set_border_width(&style_screen2_btn_3_main_main_default, 0);
	lv_style_set_border_opa(&style_screen2_btn_3_main_main_default, 255);
	lv_obj_add_style(ui->screen2_btn_3, &style_screen2_btn_3_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
	ui->screen2_btn_3_label = lv_label_create(ui->screen2_btn_3);
	lv_label_set_text(ui->screen2_btn_3_label, "ours");
	lv_obj_set_style_text_color(ui->screen2_btn_3_label, lv_color_make(0x00, 0x00, 0x00), LV_STATE_DEFAULT);
	lv_obj_set_style_text_font(ui->screen2_btn_3_label, &lv_font_arial_12, LV_STATE_DEFAULT);
	lv_obj_set_style_pad_all(ui->screen2_btn_3, 0, LV_STATE_DEFAULT);
	lv_obj_align(ui->screen2_btn_3_label, LV_ALIGN_CENTER, 0, 0);

	//Write codes screen2_imgbtn_2
	ui->screen2_imgbtn_2 = lv_imgbtn_create(ui->screen2);
	lv_obj_set_pos(ui->screen2_imgbtn_2, 5, 6);
	lv_obj_set_size(ui->screen2_imgbtn_2, 32, 27);

	//Write style state: LV_STATE_DEFAULT for style_screen2_imgbtn_2_main_main_default
	static lv_style_t style_screen2_imgbtn_2_main_main_default;
	if (style_screen2_imgbtn_2_main_main_default.prop_cnt > 1)
		lv_style_reset(&style_screen2_imgbtn_2_main_main_default);
	else
		lv_style_init(&style_screen2_imgbtn_2_main_main_default);
	lv_style_set_text_color(&style_screen2_imgbtn_2_main_main_default, lv_color_make(0x00, 0x00, 0x00));
	lv_style_set_img_recolor(&style_screen2_imgbtn_2_main_main_default, lv_color_make(0xff, 0xff, 0xff));
	lv_style_set_img_recolor_opa(&style_screen2_imgbtn_2_main_main_default, 0);
	lv_style_set_img_opa(&style_screen2_imgbtn_2_main_main_default, 255);
	lv_obj_add_style(ui->screen2_imgbtn_2, &style_screen2_imgbtn_2_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);

	//Write style state: LV_STATE_PRESSED for style_screen2_imgbtn_2_main_main_pressed
	static lv_style_t style_screen2_imgbtn_2_main_main_pressed;
	if (style_screen2_imgbtn_2_main_main_pressed.prop_cnt > 1)
		lv_style_reset(&style_screen2_imgbtn_2_main_main_pressed);
	else
		lv_style_init(&style_screen2_imgbtn_2_main_main_pressed);
	lv_style_set_text_color(&style_screen2_imgbtn_2_main_main_pressed, lv_color_make(0xFF, 0x33, 0xFF));
	lv_style_set_img_recolor(&style_screen2_imgbtn_2_main_main_pressed, lv_color_make(0x00, 0x00, 0x00));
	lv_style_set_img_recolor_opa(&style_screen2_imgbtn_2_main_main_pressed, 0);
	lv_obj_add_style(ui->screen2_imgbtn_2, &style_screen2_imgbtn_2_main_main_pressed, LV_PART_MAIN|LV_STATE_PRESSED);

	//Write style state: LV_STATE_CHECKED for style_screen2_imgbtn_2_main_main_checked
	static lv_style_t style_screen2_imgbtn_2_main_main_checked;
	if (style_screen2_imgbtn_2_main_main_checked.prop_cnt > 1)
		lv_style_reset(&style_screen2_imgbtn_2_main_main_checked);
	else
		lv_style_init(&style_screen2_imgbtn_2_main_main_checked);
	lv_style_set_text_color(&style_screen2_imgbtn_2_main_main_checked, lv_color_make(0xFF, 0x33, 0xFF));
	lv_style_set_img_recolor(&style_screen2_imgbtn_2_main_main_checked, lv_color_make(0x00, 0x00, 0x00));
	lv_style_set_img_recolor_opa(&style_screen2_imgbtn_2_main_main_checked, 0);
	lv_obj_add_style(ui->screen2_imgbtn_2, &style_screen2_imgbtn_2_main_main_checked, LV_PART_MAIN|LV_STATE_CHECKED);
	lv_imgbtn_set_src(ui->screen2_imgbtn_2, LV_IMGBTN_STATE_RELEASED, NULL, &_return_alpha_32x27, NULL);
	lv_imgbtn_set_src(ui->screen2_imgbtn_2, LV_IMGBTN_STATE_PRESSED, NULL, &_set_blue_alpha_32x27, NULL);
	lv_imgbtn_set_src(ui->screen2_imgbtn_2, LV_IMGBTN_STATE_CHECKED_RELEASED, NULL, &_return_alpha_32x27, NULL);
	lv_imgbtn_set_src(ui->screen2_imgbtn_2, LV_IMGBTN_STATE_CHECKED_PRESSED, NULL, &_set_blue_alpha_32x27, NULL);
	lv_obj_add_flag(ui->screen2_imgbtn_2, LV_OBJ_FLAG_CHECKABLE);

	//Write codes screen2_btn_4
	ui->screen2_btn_4 = lv_btn_create(ui->screen2);
	lv_obj_set_pos(ui->screen2_btn_4, 110, 136);
	lv_obj_set_size(ui->screen2_btn_4, 100, 30);

	//Write style state: LV_STATE_DEFAULT for style_screen2_btn_4_main_main_default
	static lv_style_t style_screen2_btn_4_main_main_default;
	if (style_screen2_btn_4_main_main_default.prop_cnt > 1)
		lv_style_reset(&style_screen2_btn_4_main_main_default);
	else
		lv_style_init(&style_screen2_btn_4_main_main_default);
	lv_style_set_radius(&style_screen2_btn_4_main_main_default, 10);
	lv_style_set_bg_color(&style_screen2_btn_4_main_main_default, lv_color_make(0x21, 0x95, 0xf6));
	lv_style_set_bg_grad_color(&style_screen2_btn_4_main_main_default, lv_color_make(0x21, 0x95, 0xf6));
	lv_style_set_bg_grad_dir(&style_screen2_btn_4_main_main_default, LV_GRAD_DIR_VER);
	lv_style_set_bg_opa(&style_screen2_btn_4_main_main_default, 255);
	lv_style_set_shadow_color(&style_screen2_btn_4_main_main_default, lv_color_make(0x21, 0x95, 0xf6));
	lv_style_set_shadow_opa(&style_screen2_btn_4_main_main_default, 255);
	lv_style_set_border_color(&style_screen2_btn_4_main_main_default, lv_color_make(0x21, 0x95, 0xf6));
	lv_style_set_border_width(&style_screen2_btn_4_main_main_default, 0);
	lv_style_set_border_opa(&style_screen2_btn_4_main_main_default, 255);
	lv_obj_add_style(ui->screen2_btn_4, &style_screen2_btn_4_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
	ui->screen2_btn_4_label = lv_label_create(ui->screen2_btn_4);
	lv_label_set_text(ui->screen2_btn_4_label, "set");
	lv_obj_set_style_text_color(ui->screen2_btn_4_label, lv_color_make(0x00, 0x00, 0x00), LV_STATE_DEFAULT);
	lv_obj_set_style_text_font(ui->screen2_btn_4_label, &lv_font_arial_12, LV_STATE_DEFAULT);
	lv_obj_set_style_pad_all(ui->screen2_btn_4, 0, LV_STATE_DEFAULT);
	lv_obj_align(ui->screen2_btn_4_label, LV_ALIGN_CENTER, 0, 0);

	//Init events for screen
	events_init_screen2(ui);
}