diff --git a/Editor/VRC-ASL-Gestures_Installer.cs b/Editor/VRC-ASL-Gestures_Installer.cs index f457c57..2e7e92e 100644 --- a/Editor/VRC-ASL-Gestures_Installer.cs +++ b/Editor/VRC-ASL-Gestures_Installer.cs @@ -8,6 +8,7 @@ using VRC.SDK3.Avatars.ScriptableObjects; using System.Linq; using System.Collections.Generic; +using UnityEngine.UIElements; namespace I5UCC.VRCASLGestures { @@ -19,6 +20,7 @@ public class VRCASLGestures : EditorWindow private int DominantHand = 0; private GUIStyle titleStyle = null; + private GUIStyle titleStyle2 = null; private GUIStyle errorStyle = null; private GUIStyle highlightedStyle = null; @@ -26,6 +28,8 @@ public class VRCASLGestures : EditorWindow private VRCExpressionParameters parametersToAdd = null; private VRCExpressionsMenu menuToAdd = null; + private bool showInfo = false; + private readonly string[] controllerPath = { "Assets/VRC-ASL_Gestures/IndexVR/Thumbparams/ASLGestures_Index_Thumbparams.controller", @@ -87,6 +91,17 @@ private void OnGUI() } }; + + titleStyle2 = new GUIStyle() + { + fontSize = 23, + fixedHeight = 28, + fontStyle = FontStyle.Bold, + normal = { + textColor = Color.white + } + }; + highlightedStyle = new GUIStyle() { fontStyle = FontStyle.Bold, @@ -110,9 +125,14 @@ private void OnGUI() private void DrawSimple() { - EditorGUILayout.LabelField("Avatar", titleStyle); + Texture banner = (Texture)AssetDatabase.LoadAssetAtPath("Assets/VRC-ASL_Gestures/VRC ASL.png", typeof(Texture)); + GUI.DrawTexture(new Rect(20, 10, 60, 60), banner, ScaleMode.StretchToFill, true, 10.0F); + EditorGUILayout.Space(12); + EditorGUILayout.LabelField("\tVRC-ASL_Gestures", titleStyle2); + EditorGUILayout.Space(35); + EditorGUILayout.LabelField("Avatar (Drag and Drop avatar here)", titleStyle); EditorGUILayout.Space(); - targetAvatar = EditorGUILayout.ObjectField(targetAvatar, typeof(VRCAvatarDescriptor), true) as VRCAvatarDescriptor; + targetAvatar = EditorGUILayout.ObjectField(targetAvatar, typeof(VRCAvatarDescriptor), true, GUILayout.Height(30)) as VRCAvatarDescriptor; EditorGUILayout.Space(); if (targetAvatar) @@ -132,7 +152,7 @@ private void DrawSimple() UseThumbparams = EditorGUILayout.Popup(UseThumbparams, new string[2] { "No", - "Yes" + "Yes (Requires ThumbparamsOSC)" }); if (UseThumbparams == 0) @@ -155,15 +175,23 @@ private void DrawSimple() else TotalCost = cost[type]; - EditorGUILayout.LabelField("To add or merge:", highlightedStyle); - EditorGUILayout.LabelField(controllerPath[type].Substring(controllerPath[type].LastIndexOf("/") + 1)); - EditorGUILayout.LabelField(parameterPath[type].Substring(parameterPath[type].LastIndexOf("/") + 1)); - EditorGUILayout.LabelField(menuPath[type].Substring(menuPath[type].LastIndexOf("/") + 1)); + showInfo = EditorGUILayout.Foldout(showInfo, "More Information", true); + + + if (showInfo) + { + EditorGUILayout.Space(); + EditorGUILayout.LabelField("To add or merge:", highlightedStyle); + EditorGUILayout.LabelField(controllerPath[type].Substring(controllerPath[type].LastIndexOf("/") + 1)); + EditorGUILayout.LabelField(parameterPath[type].Substring(parameterPath[type].LastIndexOf("/") + 1)); + EditorGUILayout.LabelField(menuPath[type].Substring(menuPath[type].LastIndexOf("/") + 1)); + EditorGUILayout.Space(); + } + EditorGUILayout.Space(); EditorGUILayout.LabelField("Parameters needed: " + cost[type].ToString(), highlightedStyle); EditorGUILayout.LabelField("Total Parameters: " + TotalCost.ToString() + "/256", highlightedStyle); - if (TotalCost <= 256 && (targetAvatar.expressionsMenu == null || targetAvatar.expressionsMenu.controls.Count != 8)) { animatorToAdd = AssetDatabase.LoadAssetAtPath(controllerPath[type], typeof(AnimatorController)) as AnimatorController;