-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathui.c
More file actions
70 lines (54 loc) · 1.96 KB
/
ui.c
File metadata and controls
70 lines (54 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// This file was generated by SquareLine Studio
// SquareLine Studio version: SquareLine Studio 1.5.0
// LVGL version: 9.1.0
// Project name: SquareLine_Project
#include "ui.h"
#include "ui_helpers.h"
///////////////////// VARIABLES ////////////////////
// SCREEN: ui_SplashScreen
void ui_SplashScreen_screen_init(void);
void ui_event_SplashScreen(lv_event_t * e);
lv_obj_t * ui_SplashScreen;
void ui_event_Image1(lv_event_t * e);
lv_obj_t * ui_Image1;
// CUSTOM VARIABLES
// SCREEN: ui_MainScreen
void ui_MainScreen_screen_init(void);
lv_obj_t * ui_MainScreen;
lv_obj_t * ui_SmartHomeLabel;
// CUSTOM VARIABLES
// EVENTS
lv_obj_t * ui____initial_actions0;
// IMAGES AND IMAGE SETS
///////////////////// TEST LVGL SETTINGS ////////////////////
#if LV_COLOR_DEPTH != 16
#error "LV_COLOR_DEPTH should be 16bit to match SquareLine Studio's settings"
#endif
///////////////////// ANIMATIONS ////////////////////
///////////////////// FUNCTIONS ////////////////////
void ui_event_SplashScreen(lv_event_t * e)
{
lv_event_code_t event_code = lv_event_get_code(e);
if(event_code == LV_EVENT_SCREEN_LOADED) {
_ui_screen_change(&ui_MainScreen, LV_SCR_LOAD_ANIM_MOVE_LEFT, 100, 500, &ui_MainScreen_screen_init);
}
}
void ui_event_Image1(lv_event_t * e)
{
lv_event_code_t event_code = lv_event_get_code(e);
if(event_code == LV_EVENT_SCREEN_LOADED) {
_ui_screen_change(&ui_MainScreen, LV_SCR_LOAD_ANIM_FADE_ON, 500, 10, &ui_MainScreen_screen_init);
}
}
///////////////////// SCREENS ////////////////////
void ui_init(void)
{
lv_disp_t * dispp = lv_display_get_default();
lv_theme_t * theme = lv_theme_default_init(dispp, lv_palette_main(LV_PALETTE_BLUE), lv_palette_main(LV_PALETTE_RED),
false, LV_FONT_DEFAULT);
lv_disp_set_theme(dispp, theme);
ui_SplashScreen_screen_init();
ui_MainScreen_screen_init();
ui____initial_actions0 = lv_obj_create(NULL);
lv_disp_load_scr(ui_SplashScreen);
}