summaryrefslogtreecommitdiff
path: root/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_UiEditorPanel.cs
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2020-08-20 23:40:50 -0400
committerAndrew Lee <alee14498@protonmail.com>2020-08-20 23:40:50 -0400
commit3af4c218c0e70167db23a6303d2af30aff37d2fe (patch)
tree927f29edcf54ab562f40f3d1c6cb69287c7f5980 /Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_UiEditorPanel.cs
parentb6daed0af784f4e9bc13329dd87c671b06ee1c65 (diff)
downloadProject-Sandbox-3af4c218c0e70167db23a6303d2af30aff37d2fe.tar.gz
Project-Sandbox-3af4c218c0e70167db23a6303d2af30aff37d2fe.tar.bz2
Project-Sandbox-3af4c218c0e70167db23a6303d2af30aff37d2fe.zip
Removed a bunch of stuff; Changes
Diffstat (limited to 'Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_UiEditorPanel.cs')
-rw-r--r--Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_UiEditorPanel.cs91
1 files changed, 0 insertions, 91 deletions
diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_UiEditorPanel.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_UiEditorPanel.cs
deleted file mode 100644
index d44999e..0000000
--- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_UiEditorPanel.cs
+++ /dev/null
@@ -1,91 +0,0 @@
-using UnityEngine;
-using UnityEngine.UI;
-using UnityEditor;
-
-namespace TMPro.EditorUtilities
-{
-
- [CustomEditor(typeof(TextMeshProUGUI), true), CanEditMultipleObjects]
- public class TMP_UiEditorPanel : TMP_BaseEditorPanel
- {
- static readonly GUIContent k_RaycastTargetLabel = new GUIContent("Raycast Target", "Whether the text blocks raycasts from the Graphic Raycaster.");
-
- SerializedProperty m_RaycastTargetProp;
-
- protected override void OnEnable()
- {
- base.OnEnable();
- m_RaycastTargetProp = serializedObject.FindProperty("m_RaycastTarget");
- }
-
- protected override void DrawExtraSettings()
- {
- Foldout.extraSettings = EditorGUILayout.Foldout(Foldout.extraSettings, k_ExtraSettingsLabel, true, TMP_UIStyleManager.boldFoldout);
- if (Foldout.extraSettings)
- {
- EditorGUI.indentLevel += 1;
-
- DrawMargins();
-
- DrawGeometrySorting();
-
- DrawRichText();
-
- DrawRaycastTarget();
-
- DrawParsing();
-
- DrawKerning();
-
- DrawPadding();
-
- EditorGUI.indentLevel -= 1;
- }
- }
-
- protected void DrawRaycastTarget()
- {
- EditorGUI.BeginChangeCheck();
- EditorGUILayout.PropertyField(m_RaycastTargetProp, k_RaycastTargetLabel);
- if (EditorGUI.EndChangeCheck())
- {
- // Change needs to propagate to the child sub objects.
- Graphic[] graphicComponents = m_TextComponent.GetComponentsInChildren<Graphic>();
- for (int i = 1; i < graphicComponents.Length; i++)
- graphicComponents[i].raycastTarget = m_RaycastTargetProp.boolValue;
-
- m_HavePropertiesChanged = true;
- }
- }
-
- // Method to handle multi object selection
- protected override bool IsMixSelectionTypes()
- {
- GameObject[] objects = Selection.gameObjects;
- if (objects.Length > 1)
- {
- for (int i = 0; i < objects.Length; i++)
- {
- if (objects[i].GetComponent<TextMeshProUGUI>() == null)
- return true;
- }
- }
- return false;
- }
- protected override void OnUndoRedo()
- {
- int undoEventId = Undo.GetCurrentGroup();
- int lastUndoEventId = s_EventId;
-
- if (undoEventId != lastUndoEventId)
- {
- for (int i = 0; i < targets.Length; i++)
- {
- //Debug.Log("Undo & Redo Performed detected in Editor Panel. Event ID:" + Undo.GetCurrentGroup());
- TMPro_EventManager.ON_TEXTMESHPRO_UGUI_PROPERTY_CHANGED(true, targets[i] as TextMeshProUGUI);
- s_EventId = undoEventId;
- }
- }
- }
- }
-} \ No newline at end of file