Exemplo n.º 1
0
        public void Draw()
        {
            GUILayout.BeginVertical(DCStyles.box_noPadding, GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true));

            GUILayout.BeginHorizontal();
            GUILayout.FlexibleSpace();

            GUILayout.BeginVertical();
            GUILayout.Space(50);

            string pluginName = DCStyles.Sized(DCConst.PLUGIN_NAME, 20);

            GUILayout.Label(pluginName, DCStyles.label_rich_middleCenter);
            GUILayout.Space(4);

            string pluginVersion = DCStyles.Bold(DCConst.PLUGIN_VERSION);

            GUILayout.Label(pluginVersion, DCStyles.label_rich_middleCenter);
            GUILayout.Space(12);

            if (GUILayout.Button("Website"))
            {
                Application.OpenURL(DCConst.URL_WEBSITE);
            }
            GUILayout.Space(10);

            if (GUILayout.Button("Asset Store Page"))
            {
                Application.OpenURL(DCConst.URL_AS_PLUGIN);
            }
            GUILayout.Space(10);

            if (GUILayout.Button("Unity Forum Thread"))
            {
                Application.OpenURL(DCConst.URL_AS_FORUM);
            }
            GUILayout.Space(10);

            if (GUILayout.Button("All My Plugins"))
            {
                Application.OpenURL(DCConst.URL_AS_PUBLISHER);
            }
            GUILayout.Space(6);

            EditorGUILayout.SelectableLabel("Email: " + DCConst.SUPPORT_EMAIL, DCStyles.label_rich_middleCenter);

            GUILayout.EndVertical();

            GUILayout.FlexibleSpace();
            GUILayout.EndHorizontal();

            GUILayout.EndVertical();
        }
Exemplo n.º 2
0
        public void Draw()
        {
            GUILayoutOption CONTENT_WIDTH = GUILayout.Width(240);
            DCSettings      settings      = DCSettings.Instance;

            GUILayout.BeginVertical(DCStyles.box_noPadding, GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true));

            EditorGUI.BeginChangeCheck();

            // Open
            GUILayout.Label("<b>Open</b>", DCStyles.label_rich);

            GUILayout.BeginHorizontal();
            GUIContent contentOpenWithGesture = new GUIContent("Open With Gesture", "Select the gesture to open the console on mobile.");

            EditorGUILayout.PrefixLabel(contentOpenWithGesture);
            settings.openWithGesture = (DCSettings.Gesture)EditorGUILayout.EnumPopup(settings.openWithGesture, CONTENT_WIDTH);
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUIContent contentOpenWithKey = new GUIContent("Open With Key", "Select the key to open the console on PC.");

            EditorGUILayout.PrefixLabel(contentOpenWithKey);
            settings.openWithKey = (KeyCode)EditorGUILayout.EnumPopup(settings.openWithKey, CONTENT_WIDTH);
            GUILayout.EndHorizontal();

            GUILayout.Space(8);
            DCStyles.DrawHorizontalLine();
            GUILayout.Space(8);

            // Display
            GUILayout.Label("<b>Display</b>", DCStyles.label_rich);

            GUILayout.BeginHorizontal();
            GUIContent contentLayer = new GUIContent("UI Layer", "The layer of the Device Console UI.");

            EditorGUILayout.PrefixLabel(contentLayer);
            settings.uiLayer = EditorGUILayout.LayerField(settings.uiLayer, CONTENT_WIDTH);
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUIContent contentCanvasSortOrder = new GUIContent("Canvas Sort Order", "The sort order of the Device Console canvas in Overlay render mode. If you can't make the Device Console appear over your UI, which is made with UGUI and uses Overlay render mode too, please set this value to a bigger value.");

            EditorGUILayout.PrefixLabel(contentCanvasSortOrder);
            settings.canvasSortOrder = EditorGUILayout.IntField(settings.canvasSortOrder, CONTENT_WIDTH);
            GUILayout.EndHorizontal();

            GUILayout.Space(8);
            DCStyles.DrawHorizontalLine();
            GUILayout.Space(8);

            // Console
            GUILayout.Label("<b>Console</b>", DCStyles.label_rich);
            GUIContent contentExceptionNotification = new GUIContent("Exception Notification", "Show the console when an exception occurs even if the console is closed.");

            settings.exceptionNotification = EditorGUILayout.Toggle(contentExceptionNotification, settings.exceptionNotification);

            GUILayout.Space(8);
            DCStyles.DrawHorizontalLine();
            GUILayout.Space(8);

            if (EditorGUI.EndChangeCheck())
            {
                EditorUtility.SetDirty(settings);
            }

            GUILayout.EndVertical();
        }