eOSState cMenuSearchResults::Switch(void) { UpdateCurrent(); cMenuSearchResultsItem *item = (cMenuSearchResultsItem *)Get(Current()); if (item) { cChannel *channel = Channels.GetByChannelID(item->event->ChannelID(), true, true); if (channel && cDevice::PrimaryDevice()->SwitchChannel(channel, true)) return osEnd; } Skins.Message(mtInfo, trVDR("Can't switch channel!")); return osContinue; }
void LayerManager::Update(){ //std::cout << measure<>::execution( [&]() { UpdateCurrent(); //updatez lista currentSectors for (unsigned int i=0; i<activeObjects.size(); i++){ activeObjects.at(i)->s->move(this->cam->getX()*activeObjects.at(i)->depth,this->cam->getY()*activeObjects.at(i)->depth); activeObjects.at(i)->s->getMatrix()->updateMatrix(); } // }) << std::endl; }
void SceneNode::Update( sf::Time dt, CommandQueue& commands ) { UpdateCurrent( dt, commands ); UpdateChildren( dt, commands ); }
void SceneNode::Update(sf::Time delta) { UpdateCurrent(delta); UpdateChildren(delta); }
eOSState cMenuSearchResults::ProcessKey(eKeys Key) { bool HadSubMenu = HasSubMenu(); eOSState state = cOsdMenu::ProcessKey(Key); if (!HasSubMenu() && HadSubMenu) // navigation in summary could have changed current item, so update it UpdateCurrent(); if (state == osUnknown) { switch (Key) { case k0: if(!HasSubMenu()) { toggleKeys = 1 - toggleKeys; SetHelpKeys(true); } state = osContinue; break; case kGreen: state = OnGreen(); break; case kYellow: state = OnYellow(); break; case kOk: case kInfo: if(HasSubMenu()) { state = cOsdMenu::ProcessKey(Key); break; } if (Count()) state = ShowSummary(); else state = osBack; break; default: break; } } if (!HasSubMenu()) { if ((HadSubMenu || gl_TimerProgged) && Update()) { if (gl_TimerProgged) // when using epgsearch's timer edit menu, update is delayed because of SVDRP { gl_TimerProgged = 0; SetHelpKeys(); } Display(); } if (Key != kNone) SetHelpKeys(); if (gl_InfoConflict) { gl_InfoConflict = 0; if (Interface->Confirm(tr("Timer conflict! Show?"))) state = AddSubMenu(new cMenuConflictCheck()); } } return state; }
eOSState cMenuSearchResults::Record(void) { UpdateCurrent(); cMenuSearchResultsItem *item = (cMenuSearchResultsItem *)Get(Current()); if (item) { if (item->timerMatch == tmFull) { eTimerMatch tm = tmNone; cTimer *timer = Timers.GetMatch(item->event, &tm); if (timer) { if (EPGSearchConfig.useVDRTimerEditMenu) return AddSubMenu(new cMenuEditTimer(timer)); else return AddSubMenu(new cMenuMyEditTimer(timer, false, item->event)); } } cTimer *timer = new cTimer(item->event); PrepareTimerFile(item->event, timer); cTimer *t = Timers.GetTimer(timer); if (EPGSearchConfig.onePressTimerCreation == 0 || t || !item->event || (!t && item->event && item->event->StartTime() - (Setup.MarginStart+2) * 60 < time(NULL))) { if (t) { delete timer; timer = t; } if (EPGSearchConfig.useVDRTimerEditMenu) return AddSubMenu(new cMenuEditTimer(timer, !t)); else return AddSubMenu(new cMenuMyEditTimer(timer, !t, item->event)); } else { string fullaux = ""; string aux = ""; if (item->event) { const cEvent* event = item->event; int bstart = event->StartTime() - timer->StartTime(); int bstop = timer->StopTime() - event->EndTime(); int checkmode = DefTimerCheckModes.GetMode(timer->Channel()); aux = UpdateAuxValue(aux, "channel", NumToString(timer->Channel()->Number()) + " - " + CHANNELNAME(timer->Channel())); aux = UpdateAuxValue(aux, "update", checkmode); aux = UpdateAuxValue(aux, "eventid", event->EventID()); aux = UpdateAuxValue(aux, "bstart", bstart); aux = UpdateAuxValue(aux, "bstop", bstop); fullaux = UpdateAuxValue(fullaux, "epgsearch", aux); } #ifdef USE_PINPLUGIN aux = ""; aux = UpdateAuxValue(aux, "protected", timer->FskProtection() ? "yes" : "no"); fullaux = UpdateAuxValue(fullaux, "pin-plugin", aux); #endif SetAux(timer, fullaux); Timers.Add(timer); gl_timerStatusMonitor->SetConflictCheckAdvised(); timer->Matches(); Timers.SetModified(); LogFile.iSysLog("timer %s added (active)", *timer->ToDescr()); if (HasSubMenu()) CloseSubMenu(); if (Update()) Display(); SetHelpKeys(); } } return osContinue; }
eOSState cMenuSearchMain::ProcessKey(eKeys Key) { bool HadSubMenu = HasSubMenu(); eOSState state = cOsdMenu::ProcessKey(Key); if (exitToMainMenu == 1) { exitToMainMenu = 0; return osBack; } if (!HasSubMenu() && HadSubMenu) UpdateCurrent(); if (state == osUnknown) { switch (Key) { case kFastRew: if (HasSubMenu() && !InWhatsOnMenu && !InFavoritesMenu) { /* if (Count()) { CursorUp(); return ShowSummary(); } */ } else return Shift(-EPGSearchConfig.timeShiftValue); case kFastFwd: if (HasSubMenu() && !InWhatsOnMenu && !InFavoritesMenu) { /* if (Count()) { CursorDown(); return ShowSummary(); } */ } else return Shift(EPGSearchConfig.timeShiftValue); case kRecord: case kRed: if(HasSubMenu()) { UpdateCurrent(); state = Record(); break; } if (Count()) { if (EPGSearchConfig.redkeymode==toggleKeys) state = Record(); else { cMenuMyScheduleItem *mi = (cMenuMyScheduleItem *)Get(Current()); if (mi) { if (mi->event) { return AddSubMenu(new cMenuSearchCommands(tr("EPG Commands"),mi->event)); } } } } break; case k0: if(!HasSubMenu()) { toggleKeys = 1 - toggleKeys; SetHelpKeys(true); } state = osContinue; break; case k1...k9: if (!HasSubMenu()) return Commands(Key); else state = osContinue; break; case kGreen: if (schedules) { if (HasSubMenu() && !InWhatsOnMenu && !InFavoritesMenu) { if (Count()) { // CursorUp(); // return ShowSummary(); } } else if (toggleKeys == 0 || (toggleKeys == 1 && EPGSearchConfig.toggleGreenYellow == 0)) { int ChannelNr = cDevice::CurrentChannel(); if (Count()) { cMenuMyScheduleItem* Item = (cMenuMyScheduleItem *)Get(Current()); if (Item && Item->event) { cChannel *channel = Channels.GetByChannelID(Item->event->ChannelID(), true, true); if (channel) ChannelNr = channel->Number(); } } if (cMenuWhatsOnSearch::currentShowMode == showFavorites) { InFavoritesMenu = true; return AddSubMenu(new cMenuFavorites()); } else { InWhatsOnMenu = true; return AddSubMenu(new cMenuWhatsOnSearch(schedules, ChannelNr)); } } else { cChannel *channel = Channels.GetByNumber(currentChannel-1,-1); if (channel) { PrepareSchedule(channel); if (channel->Number() != cDevice::CurrentChannel()) { otherChannel = channel->Number(); } Display(); } SetHelpKeys(true); return osContinue; } } case kYellow: if (schedules) { if (HasSubMenu()) { if (Count()) { // CursorDown(); // return ShowSummary(); } } else if (toggleKeys == 0 || (toggleKeys == 1 && EPGSearchConfig.toggleGreenYellow == 0)) { cMenuWhatsOnSearch::currentShowMode = showNext; InWhatsOnMenu = true; return AddSubMenu(new cMenuWhatsOnSearch(schedules, cMenuWhatsOnSearch::CurrentChannel())); } else { cChannel *channel = Channels.GetByNumber(currentChannel+1,1); if (channel) { PrepareSchedule(channel); if (channel->Number() != cDevice::CurrentChannel()) { otherChannel = channel->Number(); } Display(); } SetHelpKeys(true); return osContinue; } } break; case kBlue: if (HasSubMenu()) { UpdateCurrent(); return Switch(); } if (EPGSearchConfig.bluekeymode==toggleKeys) return Switch(); else return ExtendedSearch(); break; case kInfo: case kOk: if (Count()) return ShowSummary(); break; default: break; } } if (!HasSubMenu()) { cChannel *ch = cMenuWhatsOnSearch::ScheduleChannel(); InWhatsOnMenu = false; InFavoritesMenu = false; if (ch) { // when switch from the other menus to the schedule, try to keep the same time if (cMenuWhatsOnSearch::shiftTime) { time_t diff = cMenuWhatsOnSearch::seekTime - time(NULL); shiftTime = (diff + (diff>0?30:-30)) / 60 ; } else shiftTime = 0; PrepareSchedule(ch); if (ch->Number() != cDevice::CurrentChannel()) { otherChannel = ch->Number(); } Display(); } else if ((HadSubMenu || gl_TimerProgged) && Update()) { if (gl_TimerProgged) // when using epgsearch's timer edit menu, update is delayed because of SVDRP { gl_TimerProgged = 0; SetHelpKeys(); } Display(); } if (Key != kNone) SetHelpKeys(); if (gl_InfoConflict) { gl_InfoConflict = 0; if (Interface->Confirm(tr("Timer conflict! Show?"))) return AddSubMenu(new cMenuConflictCheck()); } } return state; }