public string GetOptionName(int slot) { int i = ConvertSlotToOption(slot); if (i == -1) { i = 0; } return(SpeechManager.GetTranslation(options[i].label, options[i].lineID, Options.GetLanguage())); }
public string GetLabelFromID(int _ID, int languageNumber) { foreach (CursorIcon cursorIcon in cursorIcons) { if (cursorIcon.id == _ID) { return(SpeechManager.GetTranslation(cursorIcon.label, cursorIcon.lineID, languageNumber) + " "); } } return(""); }
public override string GetLabel(int i, int languageNumber) { if (languageNumber > 0) { return(SpeechManager.GetTranslation(GetItem(i).label, GetItem(i).lineID, languageNumber)); } if (GetItem(i).altLabel != "") { return(GetItem(i).altLabel); } return(GetItem(i).label); }
public string GetLabel(InvItem item, int languageNumber) { if (languageNumber > 0) { return(SpeechManager.GetTranslation(item.label, item.lineID, languageNumber)); } else if (item.altLabel != "") { return(item.altLabel); } return(item.label); }
public string GetName(int languageNumber) { if (languageNumber > 0) { return(SpeechManager.GetTranslation(gameObject.name, displayLineID, languageNumber)); } else if (hotspotName != "") { return(hotspotName); } else { return(gameObject.name); } }
public string GetLabel(int languageNumber) { if (languageNumber > 0) { return(SpeechManager.GetTranslation(label, lineID, languageNumber)); } else { if (altLabel != "") { return(altLabel); } return(label); } }
public string GetHotspotPrefixLabel(InvItem item, string itemName, int languageNumber, bool canGive = false) { string prefix1 = ""; string prefix2 = ""; if (canGive && IsGivingItem()) { prefix1 = SpeechManager.GetTranslation(KickStarter.cursorManager.hotspotPrefix3.label, KickStarter.cursorManager.hotspotPrefix3.lineID, languageNumber); prefix2 = SpeechManager.GetTranslation(KickStarter.cursorManager.hotspotPrefix4.label, KickStarter.cursorManager.hotspotPrefix4.lineID, languageNumber); } else { if (item != null && item.overrideUseSyntax) { prefix1 = SpeechManager.GetTranslation(item.hotspotPrefix1.label, item.hotspotPrefix1.lineID, languageNumber); prefix2 = SpeechManager.GetTranslation(item.hotspotPrefix2.label, item.hotspotPrefix2.lineID, languageNumber); } else { prefix1 = SpeechManager.GetTranslation(KickStarter.cursorManager.hotspotPrefix1.label, KickStarter.cursorManager.hotspotPrefix1.lineID, languageNumber); prefix2 = SpeechManager.GetTranslation(KickStarter.cursorManager.hotspotPrefix2.label, KickStarter.cursorManager.hotspotPrefix2.lineID, languageNumber); } } if (prefix1 == "" && prefix2 != "") { return(prefix2 + " "); } if (prefix1 != "" && prefix2 == "") { return(prefix1 + " " + itemName + " "); } return(prefix1 + " " + itemName + " " + prefix2 + " "); }
protected string TranslateLabel(string label, int languageNumber) { return(SpeechManager.GetTranslation(label, lineID, languageNumber)); }
private string TranslatePage(JournalPage page, int languageNumber) { return(SpeechManager.GetTranslation(page.text, page.lineID, languageNumber)); }
public string GetHotspotLabel(int languageNumber) { return(SpeechManager.GetTranslation(hotspotLabel, hotspotLabelID, languageNumber)); }
private float StartSpeech() { string _text = messageText; string _language = ""; int _lineID = lineID; int lanuageNumber = Options.GetLanguage(); if (lanuageNumber > 0) { // Not in original language, so pull translation in from Speech Manager _text = SpeechManager.GetTranslation(_text, lineID, lanuageNumber); _language = KickStarter.speechManager.languages [lanuageNumber]; } bool isSplittingLines = false; bool isLastSplitLine = false; _text = _text.Replace("\\n", "\n"); if (KickStarter.speechManager.separateLines) { // Split line into an array, and pull the correct one string[] textArray = _text.Split(stringSeparators, System.StringSplitOptions.None); _text = textArray [splitNumber]; if (textArray.Length > 1) { isSplittingLines = true; if (splitNumber > 0) { _lineID = -1; } if (textArray.Length > splitNumber) { isLastSplitLine = true; } } } if (_text != "") { speech = KickStarter.dialog.StartDialog(speaker, _text, _lineID, _language, isBackground, noAnimation); float displayDuration = speech.displayDuration; if (speaker && !noAnimation) { if (speaker.animEngine == null) { speaker.ResetAnimationEngine(); } if (speaker.animEngine != null) { speaker.animEngine.ActionSpeechRun(this); } } if (isLastSplitLine) { return(displayDuration + waitTimeOffset); } if (isSplittingLines) { return(displayDuration); } if (!isBackground) { return(displayDuration + waitTimeOffset); } } return(0f); }