예제 #1
0
        void OnGUI()
        {
            if (!realIvyProToolsWindow)
            {
                CreateTools();
            }
            oldSkin  = GUI.skin;
            GUI.skin = windowSkin;

            EditorGUI.BeginChangeCheck();
            DrawGUI();

            if (EditorGUI.EndChangeCheck() || valueUpdated)
            {
                if (controller.GenerateLightmapUVsActivated())
                {
                    CustomDisplayDialog.Init(windowSkin, Constants.LIGHTMAP_UVS_WARNING, "Lightmap UVs warning", RealIvyWindow.infoTex, 370f, 155f, null);
                }
                valueUpdated = false;
                SaveParameters();
                controller.RefreshMesh();
                Repaint();
            }

            GUI.skin = oldSkin;
        }
예제 #2
0
        private void SaveCurrentIvyIntoScene()
        {
            if (!controller.ivyGO.GetComponent <RTIvy>())
            {
                Action confirmCallback = () =>
                {
                    controller.SaveCurrentIvyIntoScene();
                };

                CustomDisplayDialog.Init(windowSkin, Constants.CONFIRM_SAVE_IVY, "Save ivy into scene", RealIvyWindow.infoTex, 370f, 155f, confirmCallback, true);
            }
        }
예제 #3
0
        public static void Init(GUISkin windowSkin, string text, string title, Texture2D icon, float windowWidth, float windowHeight, Action confirmCallback, Action rejectCallback, bool hasCancelButton)
        {
            CustomDisplayDialog previousDialog = GetWindow <CustomDisplayDialog>();

            if (previousDialog != null)
            {
                previousDialog.Close();
            }

            CustomDisplayDialog dialog = ScriptableObject.CreateInstance <CustomDisplayDialog>();

            dialog.SetValues(windowSkin, text, icon, windowWidth, windowHeight, confirmCallback, rejectCallback, hasCancelButton);
            dialog.ShowUtility();
            dialog.titleContent = new GUIContent(title);
        }