// 发送方传输中界面 - 显示sharing图片
// BLE配对成功后自动跳转到此界面

#include "../ui.h"

lv_obj_t *ui_ScreenSharing = NULL;
static lv_obj_t *sharing_img = NULL;

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

    // 发送方传输中图片（260x310），居中显示
    sharing_img = lv_img_create(ui_ScreenSharing);
    lv_img_set_src(sharing_img, &ui_img_sharing_png);
    lv_obj_set_align(sharing_img, LV_ALIGN_CENTER);
    lv_obj_clear_flag(sharing_img, LV_OBJ_FLAG_SCROLLABLE);

}

void ui_ScreenSharing_screen_destroy(void) {
    if (ui_ScreenSharing) lv_obj_del(ui_ScreenSharing);
    ui_ScreenSharing = NULL;
    sharing_img = NULL;
}
