修改回放界面无文件弹窗
This commit is contained in:
parent
b7897a8d0b
commit
abd28ee3fe
|
@ -70,6 +70,9 @@ static BOOL g_PlayBgInitFileSys = FALSE;
|
||||||
#if 1
|
#if 1
|
||||||
static lv_group_t* gp_btns = NULL;
|
static lv_group_t* gp_btns = NULL;
|
||||||
extern uint16_t warn_msgbox_auto_close_ms;
|
extern uint16_t warn_msgbox_auto_close_ms;
|
||||||
|
static lv_obj_t *label_msgbox = NULL;
|
||||||
|
static lv_obj_t *no_file_msgbox = NULL;
|
||||||
|
int is_no_file = 0;
|
||||||
|
|
||||||
#define PLB_BTN_FWD (1)
|
#define PLB_BTN_FWD (1)
|
||||||
#define PLB_BTN_CUR (0)
|
#define PLB_BTN_CUR (0)
|
||||||
|
@ -81,17 +84,6 @@ extern uint16_t warn_msgbox_auto_close_ms;
|
||||||
|
|
||||||
#define ITEMS_PER_PAGE 5
|
#define ITEMS_PER_PAGE 5
|
||||||
|
|
||||||
void init_bar(void)
|
|
||||||
{
|
|
||||||
lv_obj_set_state(container_option_title_scr_uiflowplay, LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_hidden(container_option_title_scr_uiflowplay, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
void hidde_bar(void)
|
|
||||||
{
|
|
||||||
lv_obj_set_hidden(container_option_title_scr_uiflowplay, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void update_play_Selection_msg(lv_obj_t* obj)
|
static void update_play_Selection_msg(lv_obj_t* obj)
|
||||||
{
|
{
|
||||||
for(int i = 0; i < ITEMS_PER_PAGE; i++)
|
for(int i = 0; i < ITEMS_PER_PAGE; i++)
|
||||||
|
@ -269,7 +261,6 @@ void hidde_Selection_page(void)
|
||||||
{
|
{
|
||||||
gSeletionShow = SELECTION_SHOW_FALSE;
|
gSeletionShow = SELECTION_SHOW_FALSE;
|
||||||
gOptionPage = OPTION_PAGE_SELECT_FUNCTION;
|
gOptionPage = OPTION_PAGE_SELECT_FUNCTION;
|
||||||
hidde_bar();
|
|
||||||
lv_obj_set_hidden(container_main_menu_scr_uiflowplay,true);
|
lv_obj_set_hidden(container_main_menu_scr_uiflowplay,true);
|
||||||
}
|
}
|
||||||
void Option_play_Selection_Key(lv_obj_t* obj, uint32_t key)
|
void Option_play_Selection_Key(lv_obj_t* obj, uint32_t key)
|
||||||
|
@ -353,6 +344,13 @@ void Option_play_Selection_Key(lv_obj_t* obj, uint32_t key)
|
||||||
Ux_SendEvent(0, NVTEVT_SYSTEM_MODE, 1, PRIMARY_MODE_PLAYBACK);
|
Ux_SendEvent(0, NVTEVT_SYSTEM_MODE, 1, PRIMARY_MODE_PLAYBACK);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (1 == is_no_file)
|
||||||
|
{
|
||||||
|
lv_obj_set_hidden(no_file_msgbox, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
ProfileFocused = 0;
|
ProfileFocused = 0;
|
||||||
hidde_Selection_page();
|
hidde_Selection_page();
|
||||||
}
|
}
|
||||||
|
@ -1243,7 +1241,10 @@ static void UIFlowPlay_OpenFile(lv_obj_t* obj)
|
||||||
g_PlbData.State = PLB_ST_IDLE;
|
g_PlbData.State = PLB_ST_IDLE;
|
||||||
update_playicons(g_PlbData.State);
|
update_playicons(g_PlbData.State);
|
||||||
PBView_DrawNoFile();
|
PBView_DrawNoFile();
|
||||||
UIFlowWrnMsgAPI_Open_StringID(LV_PLUGIN_STRING_ID_STRING_NO_FILE, warn_msgbox_auto_close_ms);
|
//UIFlowWrnMsgAPI_Open_StringID(LV_PLUGIN_STRING_ID_STRING_NO_FILE, warn_msgbox_auto_close_ms);
|
||||||
|
lv_obj_set_hidden(no_file_msgbox, false);
|
||||||
|
is_no_file = 1;
|
||||||
|
lv_obj_set_hidden(container_play_scr_uiflowplay, true);
|
||||||
g_bUIFlowWndPlayNoImgWndOpened = TRUE;
|
g_bUIFlowWndPlayNoImgWndOpened = TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1289,13 +1290,24 @@ static void set_indev_keypad_group(lv_obj_t* obj)
|
||||||
|
|
||||||
static void UIFlowPlay_ScrOpen(lv_obj_t* obj)
|
static void UIFlowPlay_ScrOpen(lv_obj_t* obj)
|
||||||
{
|
{
|
||||||
if (FirstHandle == -1)
|
if (-1 == FirstHandle)
|
||||||
{
|
{
|
||||||
FirstHandle = System_Get_DCF_Handle();
|
FirstHandle = System_Get_DCF_Handle();
|
||||||
printf("[UIFlowPlay_ScrOpen][*x] select handle: %d.\n", FirstHandle);
|
printf("[UIFlowPlay_ScrOpen][*x] select handle: %d.\n", FirstHandle);
|
||||||
ProfileSelected = FirstHandle;
|
ProfileSelected = FirstHandle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (NULL == no_file_msgbox)
|
||||||
|
{
|
||||||
|
no_file_msgbox = lv_btn_create(obj, button_msg_bg_scr_uiflowwrnmsg);
|
||||||
|
lv_obj_set_hidden(no_file_msgbox, true);
|
||||||
|
is_no_file = 0;
|
||||||
|
label_msgbox = lv_label_create(no_file_msgbox, label_msg_scr_uiflowwrnmsg);
|
||||||
|
lv_label_set_align(label_msgbox, LV_LABEL_ALIGN_CENTER);
|
||||||
|
lv_obj_align(label_msgbox, no_file_msgbox, LV_ALIGN_CENTER, 0, 0);
|
||||||
|
lv_label_set_text(label_msgbox, "No File");
|
||||||
|
}
|
||||||
|
|
||||||
DBG_IND("UIFlowPlay_ScrOpen\r\n");
|
DBG_IND("UIFlowPlay_ScrOpen\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
@ -1308,7 +1320,9 @@ static void UIFlowPlay_ScrOpen(lv_obj_t* obj)
|
||||||
g_PlbData.State = PLB_ST_IDLE;
|
g_PlbData.State = PLB_ST_IDLE;
|
||||||
update_playicons(g_PlbData.State);
|
update_playicons(g_PlbData.State);
|
||||||
// Ux_SendEvent(0, NVTEVT_SYSTEM_MODE, 1, PRIMARY_MODE_PHOTO);
|
// Ux_SendEvent(0, NVTEVT_SYSTEM_MODE, 1, PRIMARY_MODE_PHOTO);
|
||||||
UIFlowWrnMsgAPI_Open_StringID(LV_PLUGIN_STRING_ID_STRING_NO_FILE, 3000);
|
//UIFlowWrnMsgAPI_Open_StringID(LV_PLUGIN_STRING_ID_STRING_NO_FILE, 3000);
|
||||||
|
lv_obj_set_hidden(no_file_msgbox, false);
|
||||||
|
is_no_file = 1;
|
||||||
lv_obj_set_hidden(container_play_scr_uiflowplay, true);
|
lv_obj_set_hidden(container_play_scr_uiflowplay, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1365,7 +1379,10 @@ static void UIFlowPlay_ChildScrClose(lv_obj_t* obj, const void * data)
|
||||||
//#NT#Support IVOT_N12144_CO-148_A
|
//#NT#Support IVOT_N12144_CO-148_A
|
||||||
PBView_DrawNoFile();
|
PBView_DrawNoFile();
|
||||||
//#NT#2023/11/14#Eric - end
|
//#NT#2023/11/14#Eric - end
|
||||||
UIFlowWrnMsgAPI_Open_StringID(LV_PLUGIN_STRING_ID_STRING_NO_FILE, warn_msgbox_auto_close_ms);
|
//UIFlowWrnMsgAPI_Open_StringID(LV_PLUGIN_STRING_ID_STRING_NO_FILE, warn_msgbox_auto_close_ms);
|
||||||
|
lv_obj_set_hidden(no_file_msgbox, false);
|
||||||
|
is_no_file = 1;
|
||||||
|
lv_obj_set_hidden(container_play_scr_uiflowplay, true);
|
||||||
g_bUIFlowWndPlayNoImgWndOpened = TRUE;
|
g_bUIFlowWndPlayNoImgWndOpened = TRUE;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -1389,8 +1406,11 @@ static void UIFlowPlay_ChildScrClose(lv_obj_t* obj, const void * data)
|
||||||
//#NT#Support IVOT_N12144_CO-148_A
|
//#NT#Support IVOT_N12144_CO-148_A
|
||||||
PBView_DrawNoFile();
|
PBView_DrawNoFile();
|
||||||
//#NT#2023/11/14#Eric - end
|
//#NT#2023/11/14#Eric - end
|
||||||
UIFlowWrnMsgAPI_Open_StringID(LV_PLUGIN_STRING_ID_STRING_NO_FILE, warn_msgbox_auto_close_ms);
|
//UIFlowWrnMsgAPI_Open_StringID(LV_PLUGIN_STRING_ID_STRING_NO_FILE, warn_msgbox_auto_close_ms);
|
||||||
g_bUIFlowWndPlayNoImgWndOpened = TRUE;
|
lv_obj_set_hidden(no_file_msgbox, false);
|
||||||
|
is_no_file = 1;
|
||||||
|
lv_obj_set_hidden(container_play_scr_uiflowplay, true);
|
||||||
|
g_bUIFlowWndPlayNoImgWndOpened = TRUE;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
//#NT#2023/11/03#Eric - end
|
//#NT#2023/11/03#Eric - end
|
||||||
|
@ -1415,7 +1435,10 @@ static void UIFlowPlay_ChildScrClose(lv_obj_t* obj, const void * data)
|
||||||
//#NT#Support IVOT_N12144_CO-148_A
|
//#NT#Support IVOT_N12144_CO-148_A
|
||||||
PBView_DrawNoFile();
|
PBView_DrawNoFile();
|
||||||
//#NT#2023/11/14#Eric - end
|
//#NT#2023/11/14#Eric - end
|
||||||
UIFlowWrnMsgAPI_Open_StringID(LV_PLUGIN_STRING_ID_STRING_NO_FILE, warn_msgbox_auto_close_ms);
|
//UIFlowWrnMsgAPI_Open_StringID(LV_PLUGIN_STRING_ID_STRING_NO_FILE, warn_msgbox_auto_close_ms);
|
||||||
|
lv_obj_set_hidden(no_file_msgbox, false);
|
||||||
|
is_no_file = 1;
|
||||||
|
lv_obj_set_hidden(container_play_scr_uiflowplay, true);
|
||||||
g_bUIFlowWndPlayNoImgWndOpened = TRUE;
|
g_bUIFlowWndPlayNoImgWndOpened = TRUE;
|
||||||
} else {
|
} else {
|
||||||
g_PlbData.State = PLB_ST_MENU;
|
g_PlbData.State = PLB_ST_MENU;
|
||||||
|
@ -2368,7 +2391,8 @@ static void UIFlowPlay_Key(lv_obj_t* obj, uint32_t key)
|
||||||
{
|
{
|
||||||
if (SELECTION_SHOW_FALSE == gSeletionShow) {
|
if (SELECTION_SHOW_FALSE == gSeletionShow) {
|
||||||
show_Selection_page(obj);
|
show_Selection_page(obj);
|
||||||
init_bar();
|
|
||||||
|
lv_obj_set_hidden(no_file_msgbox, true);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2380,6 +2404,16 @@ static void UIFlowPlay_Key(lv_obj_t* obj, uint32_t key)
|
||||||
case LV_USER_KEY_UP:
|
case LV_USER_KEY_UP:
|
||||||
case LV_USER_KEY_PREV:
|
case LV_USER_KEY_PREV:
|
||||||
{
|
{
|
||||||
|
if (NULL != no_file_msgbox)
|
||||||
|
{
|
||||||
|
lv_obj_del(no_file_msgbox);
|
||||||
|
no_file_msgbox = NULL;
|
||||||
|
}
|
||||||
|
if(NULL != label_msgbox)
|
||||||
|
{
|
||||||
|
lv_obj_del(label_msgbox);
|
||||||
|
label_msgbox = NULL;
|
||||||
|
}
|
||||||
printf("[UIFlowPlay_Key]exit play handle change: %d. \n", FirstHandle);
|
printf("[UIFlowPlay_Key]exit play handle change: %d. \n", FirstHandle);
|
||||||
ChangeHandle = FirstHandle;
|
ChangeHandle = FirstHandle;
|
||||||
FirstHandle = -1;
|
FirstHandle = -1;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user