summaryrefslogtreecommitdiff
path: root/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_BitmapShaderGUI.cs
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2020-04-19 17:19:32 -0400
committerAndrew Lee <alee14498@protonmail.com>2020-04-19 17:19:32 -0400
commitc55fba8ab2a1c9d3df65eda4a5a1e957f4aa1f78 (patch)
treeee4d51c7c1d633e11f46453ef1edd3c77c4ef9f7 /Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_BitmapShaderGUI.cs
downloadProject-Sandbox-c55fba8ab2a1c9d3df65eda4a5a1e957f4aa1f78.tar.gz
Project-Sandbox-c55fba8ab2a1c9d3df65eda4a5a1e957f4aa1f78.tar.bz2
Project-Sandbox-c55fba8ab2a1c9d3df65eda4a5a1e957f4aa1f78.zip
Inital commit
Diffstat (limited to 'Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_BitmapShaderGUI.cs')
-rw-r--r--Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_BitmapShaderGUI.cs85
1 files changed, 85 insertions, 0 deletions
diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_BitmapShaderGUI.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_BitmapShaderGUI.cs
new file mode 100644
index 0000000..2380704
--- /dev/null
+++ b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_BitmapShaderGUI.cs
@@ -0,0 +1,85 @@
+using UnityEngine;
+using UnityEditor;
+
+namespace TMPro.EditorUtilities
+{
+ public class TMP_BitmapShaderGUI : TMP_BaseShaderGUI
+ {
+ static bool s_Face = true;
+
+ protected override void DoGUI()
+ {
+ s_Face = BeginPanel("Face", s_Face);
+ if (s_Face)
+ {
+ DoFacePanel();
+ }
+
+ EndPanel();
+
+ s_DebugExtended = BeginPanel("Debug Settings", s_DebugExtended);
+ if (s_DebugExtended)
+ {
+ DoDebugPanel();
+ }
+
+ EndPanel();
+ }
+
+ void DoFacePanel()
+ {
+ EditorGUI.indentLevel += 1;
+ if (m_Material.HasProperty(ShaderUtilities.ID_FaceTex))
+ {
+ DoColor("_FaceColor", "Color");
+ DoTexture2D("_FaceTex", "Texture", true);
+ }
+ else
+ {
+ DoColor("_Color", "Color");
+ DoSlider("_DiffusePower", "Diffuse Power");
+ }
+
+ EditorGUI.indentLevel -= 1;
+
+ EditorGUILayout.Space();
+ }
+
+ void DoDebugPanel()
+ {
+ EditorGUI.indentLevel += 1;
+ DoTexture2D("_MainTex", "Font Atlas");
+ if (m_Material.HasProperty(ShaderUtilities.ID_VertexOffsetX))
+ {
+ if (m_Material.HasProperty(ShaderUtilities.ID_Padding))
+ {
+ EditorGUILayout.Space();
+ DoFloat("_Padding", "Padding");
+ }
+
+ EditorGUILayout.Space();
+ DoFloat("_VertexOffsetX", "Offset X");
+ DoFloat("_VertexOffsetY", "Offset Y");
+ }
+
+ if (m_Material.HasProperty(ShaderUtilities.ID_MaskSoftnessX))
+ {
+ EditorGUILayout.Space();
+ DoFloat("_MaskSoftnessX", "Softness X");
+ DoFloat("_MaskSoftnessY", "Softness Y");
+ DoVector("_ClipRect", "Clip Rect", s_LbrtVectorLabels);
+ }
+
+ if (m_Material.HasProperty(ShaderUtilities.ID_StencilID))
+ {
+ EditorGUILayout.Space();
+ DoFloat("_Stencil", "Stencil ID");
+ DoFloat("_StencilComp", "Stencil Comp");
+ }
+
+ EditorGUI.indentLevel -= 1;
+
+ EditorGUILayout.Space();
+ }
+ }
+}