79 lines
4.5 KiB
C
Executable File
79 lines
4.5 KiB
C
Executable File
/*
|
|
* 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"
|
|
|
|
extern lv_group_t *Key_Matrix_Group;
|
|
void setup_scr_blueCounter(lv_ui *ui)
|
|
{
|
|
//Write codes blueCounter
|
|
ui->blueCounter = lv_obj_create(NULL);
|
|
lv_obj_set_size(ui->blueCounter, 480, 320);
|
|
|
|
//Write style for blueCounter, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
|
lv_obj_set_style_bg_opa(ui->blueCounter, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_bg_color(ui->blueCounter, lv_color_hex(0x599cc7), LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_bg_grad_dir(ui->blueCounter, LV_GRAD_DIR_VER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_bg_grad_color(ui->blueCounter, lv_color_hex(0x8dcdeb), LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
|
|
//Write codes blueCounter_label_1
|
|
ui->blueCounter_label_1 = lv_label_create(ui->blueCounter);
|
|
lv_label_set_text(ui->blueCounter_label_1, "GG Printer");
|
|
lv_label_set_long_mode(ui->blueCounter_label_1, LV_LABEL_LONG_WRAP);
|
|
lv_obj_set_pos(ui->blueCounter_label_1, 45, 67);
|
|
lv_obj_set_size(ui->blueCounter_label_1, 391, 90);
|
|
|
|
//Write style for blueCounter_label_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
|
lv_obj_set_style_border_width(ui->blueCounter_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_radius(ui->blueCounter_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_color(ui->blueCounter_label_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_font(ui->blueCounter_label_1, &lv_font_MHEIGB181_64, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_letter_space(ui->blueCounter_label_1, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_line_space(ui->blueCounter_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_align(ui->blueCounter_label_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_bg_opa(ui->blueCounter_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_top(ui->blueCounter_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_right(ui->blueCounter_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_bottom(ui->blueCounter_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_left(ui->blueCounter_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_shadow_width(ui->blueCounter_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
|
|
//Write codes blueCounter_btn_1
|
|
ui->blueCounter_btn_1 = lv_btn_create(ui->blueCounter);
|
|
ui->blueCounter_btn_1_label = lv_label_create(ui->blueCounter_btn_1);
|
|
lv_label_set_text(ui->blueCounter_btn_1_label, "Enter");
|
|
lv_label_set_long_mode(ui->blueCounter_btn_1_label, LV_LABEL_LONG_WRAP);
|
|
lv_obj_align(ui->blueCounter_btn_1_label, LV_ALIGN_CENTER, 0, 0);
|
|
lv_obj_set_style_pad_all(ui->blueCounter_btn_1, 0, LV_STATE_DEFAULT);
|
|
lv_obj_set_pos(ui->blueCounter_btn_1, 190, 188);
|
|
lv_obj_set_size(ui->blueCounter_btn_1, 100, 50);
|
|
|
|
//Write style for blueCounter_btn_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
|
lv_obj_set_style_bg_opa(ui->blueCounter_btn_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_bg_color(ui->blueCounter_btn_1, lv_color_hex(0x2195f6), LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_border_width(ui->blueCounter_btn_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_radius(ui->blueCounter_btn_1, 5, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_shadow_width(ui->blueCounter_btn_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_color(ui->blueCounter_btn_1, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_font(ui->blueCounter_btn_1, &lv_font_montserratMedium_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_align(ui->blueCounter_btn_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
|
|
//Update current screen layout.
|
|
lv_obj_update_layout(ui->blueCounter);
|
|
|
|
lv_group_add_obj(Key_Matrix_Group ,ui->blueCounter_btn_1);
|
|
//Init events for screen.
|
|
events_init_blueCounter(ui);
|
|
}
|