mirror of
https://github.com/No-Chicken/Power-Pico.git
synced 2026-04-03 13:02:36 +08:00
update
This commit is contained in:
66
Power_Pico/User/GUI/screens/ui_StartPage.c
Normal file
66
Power_Pico/User/GUI/screens/ui_StartPage.c
Normal file
@@ -0,0 +1,66 @@
|
||||
// This file was generated by SquareLine Studio
|
||||
// SquareLine Studio version: SquareLine Studio 1.5.3
|
||||
// LVGL version: 9.2.2
|
||||
// Project name: PowerPico
|
||||
|
||||
#include "../ui.h"
|
||||
|
||||
lv_obj_t * ui_StartPage = NULL;
|
||||
static lv_obj_t * ui_Panel1 = NULL;
|
||||
static lv_obj_t * ui_Image2 = NULL;
|
||||
static lv_obj_t * ui_Label1 = NULL;
|
||||
// event funtions
|
||||
|
||||
// build funtions
|
||||
|
||||
void ui_StartPage_screen_init(void)
|
||||
{
|
||||
ui_StartPage = lv_obj_create(NULL);
|
||||
lv_obj_remove_flag(ui_StartPage, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||
|
||||
ui_Panel1 = lv_obj_create(ui_StartPage);
|
||||
lv_obj_set_width(ui_Panel1, 120);
|
||||
lv_obj_set_height(ui_Panel1, 120);
|
||||
lv_obj_set_x(ui_Panel1, 0);
|
||||
lv_obj_set_y(ui_Panel1, -35);
|
||||
lv_obj_set_align(ui_Panel1, LV_ALIGN_CENTER);
|
||||
lv_obj_remove_flag(ui_Panel1, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||
lv_obj_set_style_radius(ui_Panel1, 128, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui_Panel1, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui_Panel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_color(ui_Panel1, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_opa(ui_Panel1, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_Image2 = lv_image_create(ui_Panel1);
|
||||
lv_image_set_src(ui_Image2, &ui_img_chicken_png);
|
||||
lv_obj_set_width(ui_Image2, LV_SIZE_CONTENT); /// 128
|
||||
lv_obj_set_height(ui_Image2, LV_SIZE_CONTENT); /// 128
|
||||
lv_obj_set_x(ui_Image2, -4);
|
||||
lv_obj_set_y(ui_Image2, -2);
|
||||
lv_obj_set_align(ui_Image2, LV_ALIGN_CENTER);
|
||||
lv_obj_add_flag(ui_Image2, LV_OBJ_FLAG_CLICKABLE); /// Flags
|
||||
lv_obj_remove_flag(ui_Image2, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||
lv_image_set_scale(ui_Image2, 196);
|
||||
|
||||
ui_Label1 = lv_label_create(ui_StartPage);
|
||||
lv_obj_set_width(ui_Label1, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_Label1, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_Label1, 0);
|
||||
lv_obj_set_y(ui_Label1, 60);
|
||||
lv_obj_set_align(ui_Label1, LV_ALIGN_CENTER);
|
||||
lv_label_set_text(ui_Label1, "Power-Pico");
|
||||
lv_obj_set_style_text_font(ui_Label1, &lv_font_montserrat_28, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
}
|
||||
|
||||
void ui_StartPage_screen_destroy(void)
|
||||
{
|
||||
if(ui_StartPage) lv_obj_del(ui_StartPage);
|
||||
|
||||
// NULL screen variables
|
||||
ui_StartPage = NULL;
|
||||
ui_Panel1 = NULL;
|
||||
ui_Image2 = NULL;
|
||||
ui_Label1 = NULL;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user