예제 #1
0
        private void CreateNewCanvas()
        {
            MenuItemsExtention.CreatePanel(null);

            WooPanelsEngine.Instance.Rebuild();
            selectedRoot = allRootNodes.Count;
        }
예제 #2
0
        private void DrawCreatePanelButton(string buttonName, int level, Transform parent, bool drawInSimulate = false)
        {
            if ((simulate || !createMode) && !drawInSimulate)
            {
                return;
            }

            var prevBackgroundColor = GUI.backgroundColor;

            GUILayout.Space(2.0f);
            GUILayout.BeginHorizontal();

            GUILayout.Space(45.0f + level * 30.0f);

            if (GUILayout.Button(buttonName, GUILayout.Width(150), GUILayout.Height(30)))
            {
                var panel = MenuItemsExtention.CreatePanel(parent);
                WooPanelsEngine.Instance.Rebuild();
                WooPanelsEngine.Instance.Open(panel, true, false);
            }

            GUILayout.EndHorizontal();
        }