55 lines
2.3 KiB
C
55 lines
2.3 KiB
C
/*
|
|
* Copyright 2024 NXP
|
|
* NXP Confidential and Proprietary. This software is owned or controlled by NXP and may only be used strictly in
|
|
* accordance with the applicable license terms. By expressly accepting such terms or by downloading, installing,
|
|
* activating and/or otherwise using the software, you are agreeing that you have read, and that you agree to
|
|
* comply with and are bound by, such license terms. If you do not agree to be bound by the applicable license
|
|
* terms, then you may not retain, install, activate or otherwise use the software.
|
|
*/
|
|
|
|
#include "lvgl.h"
|
|
#include <stdio.h>
|
|
#include "gui_guider.h"
|
|
#include "events_init.h"
|
|
#include "widgets_init.h"
|
|
#include "custom.h"
|
|
|
|
|
|
|
|
void setup_scr_start_screen(lv_ui *ui)
|
|
{
|
|
//Write codes start_screen
|
|
ui->start_screen = lv_obj_create(NULL);
|
|
lv_obj_set_size(ui->start_screen, 320, 172);
|
|
lv_obj_set_scrollbar_mode(ui->start_screen, LV_SCROLLBAR_MODE_OFF);
|
|
|
|
//Write style for start_screen, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
|
lv_obj_set_style_bg_opa(ui->start_screen, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_bg_color(ui->start_screen, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_bg_grad_dir(ui->start_screen, LV_GRAD_DIR_VER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_bg_grad_color(ui->start_screen, lv_color_hex(0xb1b1b1), LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_bg_main_stop(ui->start_screen, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_bg_grad_stop(ui->start_screen, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
|
|
//Write codes start_screen_img_1
|
|
ui->start_screen_img_1 = lv_img_create(ui->start_screen);
|
|
lv_obj_add_flag(ui->start_screen_img_1, LV_OBJ_FLAG_CLICKABLE);
|
|
lv_img_set_src(ui->start_screen_img_1, &_logo_alpha_200x63);
|
|
lv_img_set_pivot(ui->start_screen_img_1, 50,50);
|
|
lv_img_set_angle(ui->start_screen_img_1, 0);
|
|
lv_obj_set_pos(ui->start_screen_img_1, 60, 55);
|
|
lv_obj_set_size(ui->start_screen_img_1, 200, 63);
|
|
|
|
//Write style for start_screen_img_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
|
lv_obj_set_style_img_opa(ui->start_screen_img_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
|
|
//The custom code of start_screen.
|
|
|
|
|
|
//Update current screen layout.
|
|
lv_obj_update_layout(ui->start_screen);
|
|
|
|
//Init events for screen.
|
|
events_init_start_screen(ui);
|
|
}
|