// This file was generated by SquareLine Studio
// SquareLine Studio version: SquareLine Studio 1.3.2
// LVGL version: 8.3.6
// Project name: Porting

#include "ui.h"
#include "ui_helpers.h"

///////////////////// VARIABLES ////////////////////


// SCREEN: ui_ScreenMain
void ui_ScreenMain_screen_init(void);
lv_obj_t *ui_ScreenMain;
void ui_event_Image1ScreenMain( lv_event_t * e);
lv_obj_t *ui_Image1ScreenMain;
void ui_event_Image2ScreenMain( lv_event_t * e);
lv_obj_t *ui_Image2ScreenMain;
lv_obj_t *ui____initial_actions0;
const lv_img_dsc_t *ui_imgset_lexin_[2] = {&ui_img_lexin_1_png, &ui_img_lexin_2_png};

///////////////////// TEST LVGL SETTINGS ////////////////////
// #if LV_COLOR_DEPTH != 16
//     #error "LV_COLOR_DEPTH should be 16bit to match SquareLine Studio's settings"
// #endif
// #if LV_COLOR_16_SWAP !=1
//     #error "LV_COLOR_16_SWAP should be 1 to match SquareLine Studio's settings"
// #endif

///////////////////// ANIMATIONS ////////////////////

///////////////////// FUNCTIONS ////////////////////
void ui_event_Image1ScreenMain( lv_event_t * e) {
    lv_event_code_t event_code = lv_event_get_code(e);lv_obj_t * target = lv_event_get_target(e);
if ( event_code == LV_EVENT_CLICKED) {
      _ui_flag_modify( ui_Image1ScreenMain, LV_OBJ_FLAG_HIDDEN, _UI_MODIFY_FLAG_ADD);
      _ui_flag_modify( ui_Image2ScreenMain, LV_OBJ_FLAG_HIDDEN, _UI_MODIFY_FLAG_REMOVE);
}
}
void ui_event_Image2ScreenMain( lv_event_t * e) {
    lv_event_code_t event_code = lv_event_get_code(e);lv_obj_t * target = lv_event_get_target(e);
if ( event_code == LV_EVENT_CLICKED) {
      _ui_flag_modify( ui_Image1ScreenMain, LV_OBJ_FLAG_HIDDEN, _UI_MODIFY_FLAG_REMOVE);
      _ui_flag_modify( ui_Image2ScreenMain, LV_OBJ_FLAG_HIDDEN, _UI_MODIFY_FLAG_ADD);
}
}

///////////////////// SCREENS ////////////////////

void ui_init( void )
{
lv_disp_t *dispp = lv_disp_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_ScreenMain_screen_init();
ui____initial_actions0 = lv_obj_create(NULL);
lv_disp_load_scr( ui_ScreenMain);
}
