/*
 * 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_screen5(lv_ui *ui){

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

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

	//Write codes screen5_imgbtn_3
	ui->screen5_imgbtn_3 = lv_imgbtn_create(ui->screen5);
	lv_obj_set_pos(ui->screen5_imgbtn_3, 6, 7);
	lv_obj_set_size(ui->screen5_imgbtn_3, 32, 27);

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

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

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

	//Write codes screen5_img_1
	ui->screen5_img_1 = lv_img_create(ui->screen5);
	lv_obj_set_pos(ui->screen5_img_1, 34, 46);
	lv_obj_set_size(ui->screen5_img_1, 242, 159);

	//Write style state: LV_STATE_DEFAULT for style_screen5_img_1_main_main_default
	static lv_style_t style_screen5_img_1_main_main_default;
	if (style_screen5_img_1_main_main_default.prop_cnt > 1)
		lv_style_reset(&style_screen5_img_1_main_main_default);
	else
		lv_style_init(&style_screen5_img_1_main_main_default);
	lv_style_set_img_recolor(&style_screen5_img_1_main_main_default, lv_color_make(0xff, 0xff, 0xff));
	lv_style_set_img_recolor_opa(&style_screen5_img_1_main_main_default, 0);
	lv_style_set_img_opa(&style_screen5_img_1_main_main_default, 255);
	lv_obj_add_style(ui->screen5_img_1, &style_screen5_img_1_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_add_flag(ui->screen5_img_1, LV_OBJ_FLAG_CLICKABLE);
	lv_img_set_src(ui->screen5_img_1,&_dians_242x159);
	lv_img_set_pivot(ui->screen5_img_1, 0,0);
	lv_img_set_angle(ui->screen5_img_1, 0);

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