aboutsummaryrefslogtreecommitdiff
path: root/Assets/Packages/Lean/Localization/Scripts/LeanLanguageNameAttribute.cs
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@gmail.com>2019-11-03 18:31:04 -0500
committerAndrew Lee <alee14498@gmail.com>2019-11-03 18:31:04 -0500
commite8dd5d4fd406e6e6b710cbe85309f6870bccc37a (patch)
treedb0e99cfdbefb1625d66d07631f43565ae8ff41f /Assets/Packages/Lean/Localization/Scripts/LeanLanguageNameAttribute.cs
parent20b14c9a89821e6592bf25bed9329a5abe20495c (diff)
downloadUnicity-e8dd5d4fd406e6e6b710cbe85309f6870bccc37a.tar.gz
Unicity-e8dd5d4fd406e6e6b710cbe85309f6870bccc37a.tar.bz2
Unicity-e8dd5d4fd406e6e6b710cbe85309f6870bccc37a.zip
Remove everything
Diffstat (limited to 'Assets/Packages/Lean/Localization/Scripts/LeanLanguageNameAttribute.cs')
-rw-r--r--Assets/Packages/Lean/Localization/Scripts/LeanLanguageNameAttribute.cs46
1 files changed, 0 insertions, 46 deletions
diff --git a/Assets/Packages/Lean/Localization/Scripts/LeanLanguageNameAttribute.cs b/Assets/Packages/Lean/Localization/Scripts/LeanLanguageNameAttribute.cs
deleted file mode 100644
index e613d38..0000000
--- a/Assets/Packages/Lean/Localization/Scripts/LeanLanguageNameAttribute.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-using UnityEngine;
-#if UNITY_EDITOR
-using UnityEditor;
-
-namespace Lean.Localization
-{
- [CustomPropertyDrawer(typeof(LeanLanguageNameAttribute))]
- public class LeanLanguageNameDrawer : PropertyDrawer
- {
- public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
- {
- var rectA = position; rectA.xMax -= 37.0f;
- var rectB = position; rectB.xMin = rectB.xMax - 35.0f;
-
- EditorGUI.PropertyField(rectA, property);
-
- if (GUI.Button(rectB, "List") == true)
- {
- var menu = new GenericMenu();
-
- foreach (var languageName in LeanLocalization.CurrentLanguages.Keys)
- {
- menu.AddItem(new GUIContent(languageName), property.stringValue == languageName, () => { property.stringValue = languageName; property.serializedObject.ApplyModifiedProperties(); });
- }
-
- if (menu.GetItemCount() > 0)
- {
- menu.DropDown(rectB);
- }
- else
- {
- Debug.LogWarning("Your scene doesn't contain any languages, so the language name list couldn't be created.");
- }
- }
- }
- }
-}
-#endif
-
-namespace Lean.Localization
-{
- /// <summary>This attribute allows you to modify a normal string field into one that has a dropdown list that allows you to pick a language.</summary>
- public class LeanLanguageNameAttribute : PropertyAttribute
- {
- }
-} \ No newline at end of file