void cSkindesignerSkinSetup::Set(void) { cSkinSetupMenu *setupMenu = config.GetSkinSetupMenu(skin, menu); if (!setupMenu) { return; } cSkinRepo *repo = config.GetSkinRepo(skin); if (repo) { if (repo->Type() == rtGit) SetHelp(tr("Update"), NULL, tr("Delete Skin"), NULL); else SetHelp(NULL, NULL, tr("Delete Skin"), NULL); } setupMenu->InitParameterIterator(); cSkinSetupParameter *param = NULL; while (param = setupMenu->GetNextParameter(false)) { if (param->type == sptInt) { Add(new cMenuEditIntItem(param->displayText.c_str(), ¶m->value, param->min, param->max)); } else if (param->type == sptBool) { Add(new cMenuEditBoolItem(param->displayText.c_str(), ¶m->value)); } } setupMenu->InitSubmenuIterator(); cSkinSetupMenu *subMenu = NULL; while (subMenu = setupMenu->GetNextSubMenu(false)) { Add(new cSkinSetupSubMenu(subMenu->GetName(), subMenu->GetDisplayText())); } }
void cMenuSearchResultsForBlacklist::SetHelpKeys(bool Force) { cMenuSearchResultsItem *item = (cMenuSearchResultsItem *)Get(Current()); int NewHelpKeys = 0; if (item) { if (item->Selectable() && item->timerMatch == tmFull) NewHelpKeys = 2; else NewHelpKeys = 1; } bool hasTimer = (NewHelpKeys == 2); if (NewHelpKeys != helpKeys || Force) { ModeBlueSR nextModeBlue = (ModeBlueSR)(((int)modeBlue+1)%3); if (nextModeBlue == showTimerPreview) nextModeBlue = (ModeBlueSR)(((int)nextModeBlue+1)%3); if (toggleKeys==0) SetHelp((EPGSearchConfig.redkeymode==0?(hasTimer?trVDR("Button$Timer"):trVDR("Button$Record")):tr("Button$Commands")), m_bSort? tr("Button$by channel"):tr("Button$by time"), modeYellow==showTitleEpisode?tr("Button$Episode"):tr("Button$Title"), NULL); else SetHelp((EPGSearchConfig.redkeymode==1?(hasTimer?trVDR("Button$Timer"):trVDR("Button$Record")):tr("Button$Commands")), m_bSort? tr("Button$by channel"):tr("Button$by time"), modeYellow==showTitleEpisode?tr("Button$Episode"):tr("Button$Title"), NULL); helpKeys = NewHelpKeys; } }
void cMenuSearchMain::SetHelpKeys(bool Force) { cMenuMyScheduleItem *item = (cMenuMyScheduleItem *)Get(Current()); int NewHelpKeys = 0; if (item) { if (item->Selectable() && item->timerMatch == tmFull) NewHelpKeys = 2; else NewHelpKeys = 1; } bool hasTimer = (NewHelpKeys == 2); if (NewHelpKeys != helpKeys || Force) { if (toggleKeys==0) SetHelp((EPGSearchConfig.redkeymode==0?(hasTimer?trVDR("Button$Timer"):trVDR("Button$Record")):tr("Button$Commands")), trVDR("Button$Now"), trVDR("Button$Next"), EPGSearchConfig.bluekeymode==0?trVDR("Button$Switch"):tr("Button$Search")); else { const char* szGreenToggled = CHANNELNAME(Channels.GetByNumber(currentChannel-1,-1)); const char* szYellowToggled = CHANNELNAME(Channels.GetByNumber(currentChannel+1,1)); SetHelp((EPGSearchConfig.redkeymode==1?(hasTimer?trVDR("Button$Timer"):trVDR("Button$Record")):tr("Button$Commands")), (EPGSearchConfig.toggleGreenYellow==0?trVDR("Button$Now"):szGreenToggled), (EPGSearchConfig.toggleGreenYellow==0?trVDR("Button$Next"):szYellowToggled), EPGSearchConfig.bluekeymode==1?trVDR("Button$Switch"):tr("Button$Search")); } helpKeys = NewHelpKeys; } }
void cMenuEpgTimers::SetHelpKeys(void) { int NewHelpKeys = 0; cTimer *timer = CurrentTimer(); bool isCurrItemSwitchTimer = false; if (timer) { if (timer->Event()) NewHelpKeys = 2; else NewHelpKeys = 1; } else { cMenuSwitchTimerItem *item = dynamic_cast<cMenuSwitchTimerItem*>(Get(Current())); if (item) { NewHelpKeys = 1; isCurrItemSwitchTimer = true; } } if (NewHelpKeys != helpKeys) { helpKeys = NewHelpKeys; bool on = (timer && timer->HasFlags(tfActive) || isCurrItemSwitchTimer) ? true : false; static eKeys ikeys[] = { kInfo, kNone }; /// Löschen | Neu | Ein/Aus | (frei) | Info if(on) { SetHelp( helpKeys > 0 ? tr("Button$Delete") : NULL, tr("Button$New"), (!isCurrItemSwitchTimer && helpKeys > 0) ? tr("Button$Off") : NULL, NULL //helpKeys == 2 ? tr("Button$Info") : NULL, #if REELVDR && APIVERSNUM >= 10718 , helpKeys == 2 ? ikeys : NULL #endif ); } else { SetHelp( helpKeys > 0 ? tr("Button$Delete") : NULL, tr("Button$New"), helpKeys > 0 ? tr("Button$On") : NULL, NULL //helpKeys == 2 ? tr("Button$Info") : NULL, #if REELVDR && APIVERSNUM >= 10718 , helpKeys == 2 ? ikeys : NULL #endif ); } } }
void cMenuSetupSearchtimers::SetHelpKeys() { const char* ItemText = Get(Current())->Text(); if (!HasSubMenu()) { if (strstr(ItemText, tr("Channel groups")) == ItemText) SetHelp(NULL, NULL, tr("Button$Help"), tr("Button$Setup")); else if (strstr(ItemText, tr("Search templates")) == ItemText) SetHelp(NULL, NULL, tr("Button$Help"), tr("Button$Setup")); else if (strstr(ItemText, tr("Blacklists")) == ItemText) SetHelp(NULL, NULL, tr("Button$Help"), tr("Button$Setup")); else SetHelp(NULL, NULL, tr("Button$Help"), NULL); } }
void cMenuSetupTimers::SetHelpKeys() { const char* ItemText = Get(Current())->Text(); if (!HasSubMenu()) { if (strstr(ItemText, tr("Default recording dir")) == ItemText) { if (!InEditMode(ItemText, tr("Default recording dir"), data->defrecdir)) SetHelp(NULL, NULL, tr("Button$Help"), tr("Button$Select")); } //if (strstr(ItemText, tr("Default timer check method")) == ItemText) // SetHelp(NULL, NULL, tr("Button$Help"), tr("Button$Setup")); else SetHelp(NULL, NULL, tr("Button$Help"), NULL); } }
void cCMDMove::Build(char *dir) { MYDEBUG("Verzeichnis: Move: Erstelle Verzeichnisliste: %s", dir); if(!dir) dir = CurrentDir(); Clear(); cDirHandling *DirHand = new cDirHandling(this, this); SetCurrent(Get(DirHand->Build(dir, true))); delete(DirHand); if(Count()) { cMainMenuItem *item = (cMainMenuItem*)First(); while(item) { if(!strcasecmp(item->FileName(), File)) { Del(item->Index()); break; } item = (cMainMenuItem*)Next(item); } } Display(); SetHelp(); }
void cMenuDirSelect::Load() { int current = Current(); char* oldSelection = NULL; // save old selection for reselection if (current>-1) oldSelection = strdup(Get(current)->Text()); Clear(); CreateDirSet(); std::set<string>::iterator it; for (it = directorySet.begin(); it != directorySet.end(); ++it) AddDistinct((*it).c_str()); Sort(); for(int i=0; i<Count(); i++) { const char* text = Get(i)->Text(); if (oldSelection && strchr(text, '%') == NULL && strstr(text, oldSelection) == text) // skip entries with variables { SetCurrent(Get(i)); break; } } if (oldSelection) free(oldSelection); if (yellow) { free(yellow); yellow = NULL; } msprintf(&yellow, "%s %d", tr("Button$Level"), (CurLevel==MaxLevel?1:CurLevel+1)); SetHelp(NULL, NULL, MaxLevel==1?NULL:yellow, tr("Button$Select")); Display(); }
static void create() { verb::create(); SetVerb("reload"); SetRules("OBJ", "STR OBJ", "STR here", "here", "every STR"); SetErrorMessage("reload what?"); SetHelp("Syntax: reload [every] <OBJ>\n\n" "This command loads into memory the file of the object " "you specify, and replaces the current copy with a new " "copy. If you change something about a sword you are " "holding, for example, \"reload sword\" will update the " "changes and you will be holding a sword with the updates.\n" " When used with the -r flag it recursively loads all the objects " "inherited by the target object. If any of those objects " "or the target object's file fail to load, the object " "is not updated.\n" " If you \"reload every npc\", then any loaded object that " "inherits LIB_NPC gets reloaded. Other valid lib objects " "that can be used this way are: room, sentient, armor, item.\n" "Please note that if there are too many items to reload, " "the command will fail with \"Too long evaluation\" errors.\n" " Books, due to their processing-intensive load time, " "are excluded from the \"every\" keyword.\n" "Please note that reloading a door also reloads the " "door's adjoining rooms.\n" "\nSee also: copy, create, delete, modify, initfix, add"); }
void cMenuBrowseFiles::SetHelpButtons(void) { bool isDir = !GetCurrent() || GetCurrent()->IsDir(); bool isFile = !isDir; bool bDel = isFile && xc.media_enable_delete; if (isDir && !strcmp("..", GetCurrent()->Name())) { help[0] = help[1] = help[2] = help[3] = NULL; } else if (m_Mode == ShowMusic) { help[0] = isDir ? trVDR("Button$Play") : NULL; help[1] = tr ("Button$Queue"); help[2] = bDel ? trVDR("Button$Delete") : NULL; help[3] = isFile ? trVDR("Button$Info") : NULL; } else if (m_Mode == ShowImages) { help[0] = isDir ? trVDR("Button$Play") : NULL; help[1] = NULL; help[2] = bDel ? trVDR("Button$Delete") : NULL; help[3] = isFile ? trVDR("Button$Info") : NULL; } else { bool isDvd = GetCurrent() && (GetCurrent()->IsDvd() || GetCurrent()->IsBluRay()); bool hasResume = GetCurrent() && GetCurrent()->HasResume(); help[0] = isDir && isDvd ? trVDR("Button$Open") : NULL; help[1] = hasResume ? trVDR("Button$Rewind") : NULL; help[2] = bDel ? trVDR("Button$Delete") : NULL; help[3] = isFile ? trVDR("Button$Info") : NULL; } SetHelp(help[0], help[1], help[2], help[3]); }
void RootDown12_set(void* ctx, int v) { int val = PitchHandler_getNoteDiff(phctx); if(val-12 >=1 )val-=12; NoteDiff_set(NULL,val*1.0/126); SetHelp("Center Down Octave"); }
void RootUp_set(void* ctx, int v) { int val = PitchHandler_getNoteDiff(phctx); if(val <=126 )val++; NoteDiff_set(NULL,val*1.0/126); SetHelp("Center Up Semitone"); }
void RootDown_set(void* ctx, int v) { int val = PitchHandler_getNoteDiff(phctx); if(val >=1 )val--; NoteDiff_set(NULL,val*1.0/126); SetHelp("Center Down Semitone"); }
void Scale_set(void* ctx,int val) { SetHelp("Scale Shape - Advanced"); scaleControl->rect->isActive = val; scaleToggleButton->rect->isActive = val; scaleCommitButton->rect->isActive = val; }
void Intonation_set(void* ctx, float val) { SetHelp("Scale Shape set"); int ival = (int)(7.99*val); ScaleControl_setCurrentScale(ival); intonationSlider->val = val; }
void Page_jump_set(void* ctx,int val,int jump) { SetHelp("http://rfieldin.appspot.com"); //The two buttons are always in sync currentPage = (currentPage + PAGEMAX + jump) % PAGEMAX; Page_set(ctx, currentPage); }
void NoteDiff_set(void* ctx, float val) { SetHelp("Center Move"); //PitchHandler_setNoteDiff(phctx, 24-1+24*val); PitchHandler_setNoteDiff(phctx, val*126); SurfaceDraw_drawBackground(); }
cSatipPluginSetup::cSatipPluginSetup() : detachedModeM(SatipConfig.GetDetachedMode()), deviceCountM(0), operatingModeM(SatipConfig.GetOperatingMode()), ciExtensionM(SatipConfig.GetCIExtension()), eitScanM(SatipConfig.GetEITScan()), numDisabledSourcesM(SatipConfig.GetDisabledSourcesCount()), numDisabledFiltersM(SatipConfig.GetDisabledFiltersCount()) { debug1("%s", __PRETTY_FUNCTION__); operatingModeTextsM[cSatipConfig::eOperatingModeOff] = tr("off"); operatingModeTextsM[cSatipConfig::eOperatingModeLow] = tr("low"); operatingModeTextsM[cSatipConfig::eOperatingModeNormal] = tr("normal"); operatingModeTextsM[cSatipConfig::eOperatingModeHigh] = tr("high"); for (unsigned int i = 0; i < ELEMENTS(cicamsM); ++i) cicamsM[i] = SatipConfig.GetCICAM(i); for (unsigned int i = 0; i < ELEMENTS(ca_systems_table); ++i) cicamTextsM[i] = ca_systems_table[i].description; if (numDisabledSourcesM > MAX_DISABLED_SOURCES_COUNT) numDisabledSourcesM = MAX_DISABLED_SOURCES_COUNT; for (int i = 0; i < MAX_DISABLED_SOURCES_COUNT; ++i) disabledSourcesM[i] = SatipConfig.GetDisabledSources(i); if (numDisabledFiltersM > SECTION_FILTER_TABLE_SIZE) numDisabledFiltersM = SECTION_FILTER_TABLE_SIZE; for (int i = 0; i < SECTION_FILTER_TABLE_SIZE; ++i) { disabledFilterIndexesM[i] = SatipConfig.GetDisabledFilters(i); disabledFilterNamesM[i] = tr(section_filter_table[i].description); } SetMenuCategory(mcSetupPlugins); Setup(); SetHelp(trVDR("Button$Scan"), NULL, tr("Button$Devices"), trVDR("Button$Info")); }
void RootUp12_set(void* ctx, int v) { int val = PitchHandler_getNoteDiff(phctx); if(val+12 <=126 )val+=12; NoteDiff_set(NULL,val*1.0/126); SetHelp("Center Up Octave"); }
void MidiBend_set(void* ctx, float val) { SetHelp("MIDI Bend Size"); int ival = (int)(val*22)+2; sprintf(stringRenderBuffer,"Bend: %d", ival); reRenderString(stringRenderBuffer, PIC_MIDIBENDTEXT); Fretless_setMidiHintChannelBendSemis(fctx, ival); }
void Legato_set(void* ctx, int val) { SetHelp("Attack First Note"); char cval = "ny"[val]; sprintf(stringRenderBuffer,"Legato:%c", cval); reRenderString(stringRenderBuffer, PIC_LEGATOTEXT); return SurfaceTouchHandling_setLegato(val); }
void MidiBase_set(void* ctx, float val) { SetHelp("Low MIDI Channel"); int ival = (int)(val*15.99); sprintf(stringRenderBuffer,"Channel: %d",ival+1); reRenderString(stringRenderBuffer, PIC_MIDIBASETEXT); Fretless_setMidiHintChannelBase(fctx, ival); }
static void create() { verb::create(); SetVerb("empty"); SetRules("OBJ"); SetErrorMessage("Empty what?"); SetHelp("Syntax: empty <vessel>\n\n" "Removes the fluid from a vessel."); }
static void create() { verb::create(); SetVerb("pour"); SetRules("from OBJ into OBJ","from OBJ in OBJ", "OBJ in OBJ","OBJ into OBJ","OBJ on OBJ","OBJ onto OBJ","OBJ out","out OBJ"); SetErrorMessage("Pour what into what?"); SetHelp("Syntax: pour <substance> into <vessel>\n\n" "Allows you to pour into a vessel designed for containing a substance."); }
void MidiSpan_set(void* ctx, float val) { SetHelp("High MIDI Channel"); int ival = (int)(val*15)+1; sprintf(stringRenderBuffer,"Span: %d",ival); reRenderString(stringRenderBuffer, PIC_MIDISPANTEXT); Fretless_setMidiHintChannelSpan(fctx, ival); }
static void create() { verb::create(); SetVerb("sink"); SetRules("", "down"); SetErrorMessage("Sink down?"); SetHelp("Syntax: <sink down>\n" "Allows you to stop swimming, or otherwise attempt to sink in your current medium.\n" "See also: sit, lie, stand, swim, fly"); }
static void create(){ verb::create(); SetVerb("teach"); SetRules("","STR to LIV","LIV to STR"); SetErrorMessage("Syntax: teach <ability> to <person>"); SetHelp("Syntax: teach <ability> to <person>\n\n" "This command allows you to teach another person " "an ability, spell, or skill.\nSee also: learn"); }
cMenuInfoCard::cMenuInfoCard(int Port) :cMenuText(tr("Smartcard"),0,fontFix) { port=Port; smartcards.CardInfo(port,infoStr,sizeof(infoStr)); SetText(infoStr); SetHelp(tr("Reset card")); Display(); }
static void create() { verb::create(); SetVerb("dest"); SetRules("OBS","STR"); SetErrorMessage("dest what?"); SetHelp("Syntax: <dest OBJ>\n\n" "Destroy an object.\n" "\nSee also: zap"); }
void cReplayList::UpdateHelp() { switch (Mode) { case eMEdit: SetHelp(tr("Mode"),tr("(Add)"), tr("Delete"),tr("Move")); break; case eMNormal: SetHelp(tr("Mode"),tr("Skip Forward"), tr("Skip Back"),tr("Stop")); break; case eMOptions: SetHelp(tr("Mode"),tr("Options"),NULL,tr("Save")); break; default: break; }; lastMode=Mode; };