/// <summary> /// Lookup the style mapped to a given type. /// </summary> public TextStyle GetStyle(TextStyleType textType) { TextStyle result = null; if (!Mapping.TryGetValue(textType, out result)) { result = fallbackStyle; } return(result); }
private void HandleAddTextType(ReorderableList list) { var index = list.serializedProperty.arraySize; list.serializedProperty.InsertArrayElementAtIndex(index); var element = list.serializedProperty.GetArrayElementAtIndex(index); TextStyleType textType = ScriptableObject.CreateInstance<TextStyleType>(); textType.name = "New Text Type"; AssetDatabase.AddObjectToAsset(textType, target); element.objectReferenceValue = textType; requireReimport = true; }
/// <summary> /// Lookup the TextStyle registered for the given type, returning null if none exists. /// </summary> public TextStyle GetStyle(TextStyleType textType) { return(ActiveStyleMap?.GetStyle(textType)); }
internal static extern void evas_object_text_style_set(IntPtr obj, TextStyleType type);