/// <summary> /// Is called when the name is concidered incorrect. /// </summary> private void OnInvalidName() { // TODO: implement events that happen on an invalid name. string message = MultilanguageSupport.GetKeyWord("invalidnameerror"); UnityErrorField.SafeInvoke(message); }
public void Set(string log) { Debug.Log(log); // HACK: JSON is broken. string[] splittedDetails = log.Split(new char[1] { (char)124 }); Debug.Log(splittedDetails.Length); Debug.Log(splittedDetails[0]); Debug.Log(splittedDetails[1]); Debug.Log(splittedDetails[2]); Debug.Log(splittedDetails[3]); Debug.Log(splittedDetails[4]); string module = splittedDetails[0]; string nameUserA = splittedDetails[1]; string nameUserB = splittedDetails[2]; string date = splittedDetails[3]; string id = splittedDetails[4]; string key = string.Format("module_{0}", module); string moduleName = MultilanguageSupport.GetKeyWord(key); Header.text = moduleName; IconField.text = moduleName[0].ToString(); SubHeader.text = string.Format("{0} and {1}", nameUserA, nameUserB); DateField.text = DateTime.Parse(date).ToShortDateString(); this.id = id; }
public void Set(string text, Type type, object value, Action <string> onChange) { // TODO: filter input type settings (numerical, alphanumerical, etc.) based on type. name = string.Format(STRINGFORMAT, text); Label.text = MultilanguageSupport.GetKeyWord(text); Input.text = value == null ? "" : value.ToString(); OnValueChanged = onChange; }
public void SetName(string name) { if (!Label) { GetLabel(); } Label.text = MultilanguageSupport.GetKeyWord(name); }
public void Prepare(RoleplayModule module) { string serializedModule = module.ToString(); DescriptionField.text = MultilanguageSupport.GetKeyWord(string.Format("module_description_{0}", serializedModule)); ModuleName.text = MultilanguageSupport.GetKeyWord(string.Format("module_{0}", serializedModule)); StopAllCoroutines(); StartCoroutine(SwitchExamples(serializedModule)); }
public void AddCharacteristic(string characteristic) { if (!Characteristic) { GetCharacteristic(); } Text c = Instantiate(Characteristic, transform); c.gameObject.SetActive(true); c.text = MultilanguageSupport.GetKeyWord(characteristic); }
public void Initialize(EditorInterface parent, TimelineEventData eventData) { Clear(); this.parent = parent; this.EventData = eventData; string name = string.Format(NAMEFORMAT, eventData.Id, eventData.Type.ToString()); gameObject.name = name; Header.text = string.Format(baseHeaderText, MultilanguageSupport.GetKeyWord(eventData.Type.ToString())); ApplyFields(eventData); }
private IEnumerator <YieldInstruction> SwitchExamples(string module) { int i = 0; while (true) { string key = string.Format("module_example_{0}_{1}", module, i); string txt = MultilanguageSupport.GetKeyWord(key); if (txt == key) { i = 0; } else { ExampleField.text = txt; i++; yield return(new WaitForSeconds(SwitchTimer)); } } }
private void SetNames(CompleteCaseEvaluation caseEvaluation) { UserANameField.text = caseEvaluation.RoleplayDescription.UserA.Name; UserBNameField.text = caseEvaluation.RoleplayDescription.UserB.Name; ModuleField.text = MultilanguageSupport.GetKeyWord("module_" + caseEvaluation.RoleplayDescription.Case.Module.ToString()); }
public void Set(Participant participant) { HeaderField.text = participant.Name; SubHeader.text = MultilanguageSupport.GetKeyWord(participant.IP == "" ? offline : online); }