/// <summary> /// Gets the current menu text field: the localized field if using localization and the /// localized field exists; otherwise the default field. /// </summary> /// <returns> /// The current menu text field. /// </returns> private Field GetCurrentMenuTextField() { return(Field.AssignedField(fields, Field.LocalizedTitle("Menu Text")) ?? Field.Lookup(fields, "Menu Text")); }
/// <summary> /// Gets the current response menu sequence field: the localized field if using localization /// and the localized field exists; otherwise the default field. /// </summary> /// <returns> /// The current response menu sequence field. /// </returns> private Field GetCurrentResponseMenuSequenceField() { return(Field.AssignedField(fields, Field.LocalizedTitle("Response Menu Sequence")) ?? Field.Lookup(fields, "Response Menu Sequence")); }
/// <summary> /// Gets the current sequence field: the localized field if using localization and the /// localized field exists; otherwise the default field. /// </summary> /// <returns> /// The current sequence field. /// </returns> private Field GetCurrentSequenceField() { return Field.AssignedField(fields, Field.LocalizedTitle("Sequence")) ?? Field.Lookup(fields, "Sequence"); }
/// <summary> /// Returns a field if it exists and has non-empty text. /// </summary> /// <returns> /// The field, or <c>null</c> if it doesn't exist or has empty text. /// </returns> /// <param name='title'> /// Title of the field. /// </param> public Field AssignedField(string title) { return(Field.AssignedField(fields, title)); }
/// <summary> /// Gets the current dialogue text field: the localized field if using localization and the /// localized field exists; otherwise the default field. /// </summary> /// <returns> /// The current dialogue text field. /// </returns> private Field GetCurrentDialogueTextField() { if (string.IsNullOrEmpty(Localization.language)) return Field.Lookup(fields, "Dialogue Text"); return Field.AssignedField(fields, Localization.language) ?? Field.Lookup(fields, "Dialogue Text"); }