// 接收方接收中界面 - 显示receiving图片
// BLE配对成功后自动跳转到此界面

#include "../ui.h"

lv_obj_t *ui_ScreenReceiving = NULL;
static lv_obj_t *receiving_img = NULL;

void ui_ScreenReceiving_screen_init(void) {
    ui_ScreenReceiving = lv_obj_create(NULL);
    lv_obj_clear_flag(ui_ScreenReceiving, LV_OBJ_FLAG_SCROLLABLE);
    lv_obj_set_style_bg_color(ui_ScreenReceiving, lv_color_hex(0x000000), LV_PART_MAIN);
    lv_obj_set_style_bg_opa(ui_ScreenReceiving, 255, LV_PART_MAIN);

    // 接收方接收中图片（260x310），居中显示
    receiving_img = lv_img_create(ui_ScreenReceiving);
    lv_img_set_src(receiving_img, &ui_img_receiving_png);
    lv_obj_set_align(receiving_img, LV_ALIGN_CENTER);
    lv_obj_clear_flag(receiving_img, LV_OBJ_FLAG_SCROLLABLE);

}

void ui_ScreenReceiving_screen_destroy(void) {
    if (ui_ScreenReceiving) lv_obj_del(ui_ScreenReceiving);
    ui_ScreenReceiving = NULL;
    receiving_img = NULL;
}
