Example #1
0
        private static void ToolGUI()
        {
            LayoutF(() => {
                var dotStyle = new GUIStyle(GUI.skin.label)
                {
                    fontSize  = 9,
                    richText  = true,
                    alignment = TextAnchor.MiddleLeft,
                };


                // Rigging Editor
                LayoutH(() => {
                    GUIRect(16, 26);
                    Rect rect = new Rect();
                    if (GUI.Button(rect = GUIRect(0, 28), " Voxel Editor (Rigging & Sprite)"))
                    {
                        VoxelEditorWindow.OpenWindow();
                    }
                    rect.y += 3;
                    GUI.Label(rect, "   <color=#ffcc00>●</color>", dotStyle);
                    rect.y -= 6;
                    GUI.Label(rect, "   <color=#33ccff>●</color>", dotStyle);
                    rect.y += 3;
                    GUIRect(16, 26);
                });

                Space(8);
            }, "Tools", ToolPanelOpen, true);
        }
        private static void ToolGUI()
        {
            LayoutF(() => {
                var dotStyle = new GUIStyle(GUI.skin.label)
                {
                    fontSize  = 9,
                    richText  = true,
                    alignment = TextAnchor.MiddleLeft,
                };


                // Rigging Editor
                LayoutH(() => {
                    GUIRect(16, 26);
                    Rect rect = new Rect();
                    if (GUI.Button(rect = GUIRect(0, 28), " Rigging Editor"))
                    {
                        VoxelEditorWindow.OpenWindow(VoxelEditorWindow.EditorMode.Rigging, EditorDockToScene);
                    }
                    GUI.Label(rect, "   <color=#33ccff>●</color>", dotStyle);
                    GUIRect(16, 26);
                });

                Space(4);

                // Sprite Editor
                LayoutH(() => {
                    GUIRect(16, 26);
                    Rect rect = new Rect();
                    if (GUI.Button(rect = GUIRect(0, 28), " Sprite Editor"))
                    {
                        VoxelEditorWindow.OpenWindow(VoxelEditorWindow.EditorMode.Sprite, EditorDockToScene);
                    }
                    GUI.Label(rect, "   <color=#ffcc00>●</color>", dotStyle);
                    GUIRect(16, 26);
                });

                Space(4);

                // Voxel Generator
                LayoutH(() => {
                    GUIRect(16, 26);
                    Rect rect = new Rect();
                    if (GUI.Button(rect = GUIRect(0, 28), " Voxel Generator"))
                    {
                        VoxelEditorWindow.OpenWindow(VoxelEditorWindow.EditorMode.Generator, EditorDockToScene);
                    }
                    GUI.Label(rect, "   <color=#cc66ff>●</color>", dotStyle);
                    GUIRect(16, 26);
                });

                Space(8);
            }, "Tools", ToolPanelOpen, true);
        }