From e8dd5d4fd406e6e6b710cbe85309f6870bccc37a Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sun, 3 Nov 2019 18:31:04 -0500 Subject: Remove everything --- .../Scripts/LeanTranslationNameAttribute.cs | 54 ---------------------- 1 file changed, 54 deletions(-) delete mode 100644 Assets/Packages/Lean/Localization/Scripts/LeanTranslationNameAttribute.cs (limited to 'Assets/Packages/Lean/Localization/Scripts/LeanTranslationNameAttribute.cs') diff --git a/Assets/Packages/Lean/Localization/Scripts/LeanTranslationNameAttribute.cs b/Assets/Packages/Lean/Localization/Scripts/LeanTranslationNameAttribute.cs deleted file mode 100644 index 740d43d..0000000 --- a/Assets/Packages/Lean/Localization/Scripts/LeanTranslationNameAttribute.cs +++ /dev/null @@ -1,54 +0,0 @@ -using UnityEngine; -#if UNITY_EDITOR -using UnityEditor; - -namespace Lean.Localization -{ - [CustomPropertyDrawer(typeof(LeanTranslationNameAttribute))] - public class LeanTranslationNameDrawer : PropertyDrawer - { - public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) - { - var left = position; left.xMax -= 40; - var right = position; right.xMin = left.xMax + 2; - var color = GUI.color; - - if (LeanLocalization.CurrentTranslations.ContainsKey(property.stringValue) == false) - { - GUI.color = Color.red; - } - - EditorGUI.PropertyField(left, property); - - GUI.color = color; - - if (GUI.Button(right, "List") == true) - { - var menu = new GenericMenu(); - - foreach (var translationName in LeanLocalization.CurrentTranslations.Keys) - { - menu.AddItem(new GUIContent(translationName), property.stringValue == translationName, () => { property.stringValue = translationName; property.serializedObject.ApplyModifiedProperties(); }); - } - - if (menu.GetItemCount() > 0) - { - menu.DropDown(right); - } - else - { - Debug.LogWarning("Your scene doesn't contain any phrases, so the phrase name list couldn't be created."); - } - } - } - } -} -#endif - -namespace Lean.Localization -{ - /// This attribute allows you to select a translation from all the localizations in the scene. - public class LeanTranslationNameAttribute : PropertyAttribute - { - } -} \ No newline at end of file -- cgit v1.2.3