本文整理汇总了C++中CGUIDialogFullScreenInfo::DoModal方法的典型用法代码示例。如果您正苦于以下问题:C++ CGUIDialogFullScreenInfo::DoModal方法的具体用法?C++ CGUIDialogFullScreenInfo::DoModal怎么用?C++ CGUIDialogFullScreenInfo::DoModal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGUIDialogFullScreenInfo
的用法示例。
在下文中一共展示了CGUIDialogFullScreenInfo::DoModal方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnAction
//.........这里部分代码省略.........
g_infoManager.SetShowTime(m_bShowCurrentTime);
return true;
break;
case ACTION_SHOW_SUBTITLES:
{
if (g_application.m_pPlayer->GetSubtitleCount() == 0)
return true;
g_settings.m_currentVideoSettings.m_SubtitleOn = !g_settings.m_currentVideoSettings.m_SubtitleOn;
g_application.m_pPlayer->SetSubtitleVisible(g_settings.m_currentVideoSettings.m_SubtitleOn);
CStdString sub, lang;
if (g_settings.m_currentVideoSettings.m_SubtitleOn)
{
g_application.m_pPlayer->GetSubtitleName(g_application.m_pPlayer->GetSubtitle(),sub);
g_application.m_pPlayer->GetSubtitleLanguage(g_application.m_pPlayer->GetSubtitle(),lang);
if (sub != lang)
sub.Format("%s [%s]", sub.c_str(), lang.c_str());
}
else
sub = g_localizeStrings.Get(1223);
CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::Info,
g_localizeStrings.Get(287), sub, DisplTime, false, MsgTime);
}
return true;
break;
case ACTION_SHOW_INFO:
{
CGUIDialogFullScreenInfo* pDialog = (CGUIDialogFullScreenInfo*)g_windowManager.GetWindow(WINDOW_DIALOG_FULLSCREEN_INFO);
if (pDialog)
{
CFileItem item(g_application.CurrentFileItem());
pDialog->DoModal();
return true;
}
break;
}
case ACTION_NEXT_SUBTITLE:
{
if (g_application.m_pPlayer->GetSubtitleCount() == 0)
return true;
if(g_settings.m_currentVideoSettings.m_SubtitleStream < 0)
g_settings.m_currentVideoSettings.m_SubtitleStream = g_application.m_pPlayer->GetSubtitle();
if (g_settings.m_currentVideoSettings.m_SubtitleOn)
{
g_settings.m_currentVideoSettings.m_SubtitleStream++;
if (g_settings.m_currentVideoSettings.m_SubtitleStream >= g_application.m_pPlayer->GetSubtitleCount())
{
g_settings.m_currentVideoSettings.m_SubtitleStream = 0;
g_settings.m_currentVideoSettings.m_SubtitleOn = false;
g_application.m_pPlayer->SetSubtitleVisible(false);
}
g_application.m_pPlayer->SetSubtitle(g_settings.m_currentVideoSettings.m_SubtitleStream);
}
else
{
g_settings.m_currentVideoSettings.m_SubtitleOn = true;
g_application.m_pPlayer->SetSubtitleVisible(true);
}
CStdString sub, lang;
if (g_settings.m_currentVideoSettings.m_SubtitleOn)
示例2: OnAction
bool CGUIWindowFullScreen::OnAction(const CAction &action)
{
if (m_timeCodePosition > 0 && action.GetButtonCode())
{ // check whether we have a mapping in our virtual videotimeseek "window" and have a select action
CKey key(action.GetButtonCode());
CAction timeSeek = CButtonTranslator::GetInstance().GetAction(WINDOW_VIDEO_TIME_SEEK, key, false);
if (timeSeek.GetID() == ACTION_SELECT_ITEM)
{
SeekToTimeCodeStamp(SEEK_ABSOLUTE);
return true;
}
}
switch (action.GetID())
{
case ACTION_SHOW_OSD:
ToggleOSD();
return true;
case ACTION_TRIGGER_OSD:
TriggerOSD();
return true;
case ACTION_SHOW_GUI:
{
// switch back to the menu
g_windowManager.PreviousWindow();
return true;
}
break;
case ACTION_PLAYER_PLAY:
case ACTION_PAUSE:
if (m_timeCodePosition > 0)
{
SeekToTimeCodeStamp(SEEK_ABSOLUTE);
return true;
}
break;
case ACTION_SMALL_STEP_BACK:
case ACTION_STEP_BACK:
case ACTION_BIG_STEP_BACK:
case ACTION_CHAPTER_OR_BIG_STEP_BACK:
if (m_timeCodePosition > 0)
{
SeekToTimeCodeStamp(SEEK_RELATIVE, SEEK_BACKWARD);
return true;
}
break;
case ACTION_STEP_FORWARD:
case ACTION_BIG_STEP_FORWARD:
case ACTION_CHAPTER_OR_BIG_STEP_FORWARD:
if (m_timeCodePosition > 0)
{
SeekToTimeCodeStamp(SEEK_RELATIVE, SEEK_FORWARD);
return true;
}
break;
case ACTION_SHOW_OSD_TIME:
m_bShowCurrentTime = !m_bShowCurrentTime;
if(!m_bShowCurrentTime)
g_infoManager.SetDisplayAfterSeek(0); //Force display off
g_infoManager.SetShowTime(m_bShowCurrentTime);
return true;
break;
case ACTION_SHOW_INFO:
{
CGUIDialogFullScreenInfo* pDialog = (CGUIDialogFullScreenInfo*)g_windowManager.GetWindow(WINDOW_DIALOG_FULLSCREEN_INFO);
if (pDialog)
{
CFileItem item(g_application.CurrentFileItem());
pDialog->DoModal();
return true;
}
break;
}
case REMOTE_0:
case REMOTE_1:
case REMOTE_2:
case REMOTE_3:
case REMOTE_4:
case REMOTE_5:
case REMOTE_6:
case REMOTE_7:
case REMOTE_8:
case REMOTE_9:
{
if (!g_application.CurrentFileItem().IsLiveTV())
{
ChangetheTimeCode(action.GetID());
return true;
}
}
break;
case ACTION_ASPECT_RATIO:
//.........这里部分代码省略.........
示例3: OnAction
bool CGUIWindowFullScreen::OnAction(const CAction &action)
{
if (g_application.m_pPlayer != NULL && g_application.m_pPlayer->OnAction(action))
return true;
if (m_timeCodePosition > 0 && action.GetButtonCode())
{ // check whether we have a mapping in our virtual videotimeseek "window" and have a select action
CKey key(action.GetButtonCode());
CAction timeSeek = CButtonTranslator::GetInstance().GetAction(WINDOW_VIDEO_TIME_SEEK, key, false);
if (timeSeek.GetID() == ACTION_SELECT_ITEM)
{
SeekToTimeCodeStamp(SEEK_ABSOLUTE);
return true;
}
}
switch (action.GetID())
{
case ACTION_SHOW_OSD:
ToggleOSD();
return true;
case ACTION_SHOW_GUI:
{
// switch back to the menu
OutputDebugString("Switching to GUI\n");
g_windowManager.PreviousWindow();
OutputDebugString("Now in GUI\n");
return true;
}
break;
case ACTION_PLAYER_PLAY:
case ACTION_PAUSE:
if (m_timeCodePosition > 0)
{
SeekToTimeCodeStamp(SEEK_ABSOLUTE);
return true;
}
break;
case ACTION_STEP_BACK:
if (m_timeCodePosition > 0)
SeekToTimeCodeStamp(SEEK_RELATIVE, SEEK_BACKWARD);
else
g_application.m_pPlayer->Seek(false, false);
return true;
case ACTION_STEP_FORWARD:
if (m_timeCodePosition > 0)
SeekToTimeCodeStamp(SEEK_RELATIVE, SEEK_FORWARD);
else
g_application.m_pPlayer->Seek(true, false);
return true;
case ACTION_BIG_STEP_BACK:
if (m_timeCodePosition > 0)
SeekToTimeCodeStamp(SEEK_RELATIVE, SEEK_BACKWARD);
else
g_application.m_pPlayer->Seek(false, true);
return true;
case ACTION_BIG_STEP_FORWARD:
if (m_timeCodePosition > 0)
SeekToTimeCodeStamp(SEEK_RELATIVE, SEEK_FORWARD);
else
g_application.m_pPlayer->Seek(true, true);
return true;
case ACTION_NEXT_SCENE:
if (g_application.m_pPlayer->SeekScene(true))
g_infoManager.SetDisplayAfterSeek();
return true;
break;
case ACTION_PREV_SCENE:
if (g_application.m_pPlayer->SeekScene(false))
g_infoManager.SetDisplayAfterSeek();
return true;
break;
case ACTION_SHOW_OSD_TIME:
m_bShowCurrentTime = !m_bShowCurrentTime;
if(!m_bShowCurrentTime)
g_infoManager.SetDisplayAfterSeek(0); //Force display off
g_infoManager.SetShowTime(m_bShowCurrentTime);
return true;
break;
case ACTION_SHOW_INFO:
{
CGUIDialogFullScreenInfo* pDialog = (CGUIDialogFullScreenInfo*)g_windowManager.GetWindow(WINDOW_DIALOG_FULLSCREEN_INFO);
if (pDialog)
{
CFileItem item(g_application.CurrentFileItem());
pDialog->DoModal();
return true;
}
break;
}
//.........这里部分代码省略.........
示例4: OnAction
bool CGUIWindowFullScreen::OnAction(const CAction &action)
{
if (g_application.m_pPlayer != NULL && g_application.m_pPlayer->OnAction(action))
return true;
switch (action.wID)
{
case ACTION_SHOW_GUI:
{
// switch back to the menu
OutputDebugString("Switching to GUI\n");
m_gWindowManager.PreviousWindow();
OutputDebugString("Now in GUI\n");
return true;
}
break;
case ACTION_STEP_BACK:
Seek(false, false);
return true;
break;
case ACTION_STEP_FORWARD:
Seek(true, false);
return true;
break;
case ACTION_BIG_STEP_BACK:
Seek(false, true);
return true;
break;
case ACTION_BIG_STEP_FORWARD:
Seek(true, true);
return true;
break;
case ACTION_NEXT_SCENE:
if (g_application.m_pPlayer->SeekScene(true))
g_infoManager.SetDisplayAfterSeek();
return true;
break;
case ACTION_PREV_SCENE:
if (g_application.m_pPlayer->SeekScene(false))
g_infoManager.SetDisplayAfterSeek();
return true;
break;
case ACTION_SHOW_OSD_TIME:
m_bShowCurrentTime = !m_bShowCurrentTime;
if(!m_bShowCurrentTime)
g_infoManager.SetDisplayAfterSeek(0); //Force display off
g_infoManager.SetShowTime(m_bShowCurrentTime);
return true;
break;
case ACTION_SHOW_OSD: // Show the OSD
{
CGUIWindowOSD *pOSD = (CGUIWindowOSD *)m_gWindowManager.GetWindow(WINDOW_OSD);
if (pOSD) pOSD->DoModal();
return true;
}
break;
case ACTION_SHOW_SUBTITLES:
{
g_application.m_pPlayer->SetSubtitleVisible(!g_application.m_pPlayer->GetSubtitleVisible());
}
return true;
break;
case ACTION_SHOW_INFO:
{
CGUIDialogFullScreenInfo* pDialog = (CGUIDialogFullScreenInfo*)m_gWindowManager.GetWindow(WINDOW_DIALOG_FULLSCREEN_INFO);
if (pDialog)
{
pDialog->DoModal();
return true;
}
break;
}
case ACTION_NEXT_SUBTITLE:
{
if (g_application.m_pPlayer->GetSubtitleCount() == 1)
return true;
g_stSettings.m_currentVideoSettings.m_SubtitleStream++;
if (g_stSettings.m_currentVideoSettings.m_SubtitleStream >= g_application.m_pPlayer->GetSubtitleCount())
g_stSettings.m_currentVideoSettings.m_SubtitleStream = 0;
g_application.m_pPlayer->SetSubtitle(g_stSettings.m_currentVideoSettings.m_SubtitleStream);
return true;
}
return true;
break;
case ACTION_SUBTITLE_DELAY_MIN:
g_stSettings.m_currentVideoSettings.m_SubtitleDelay -= 0.1f;
//.........这里部分代码省略.........