Exemple #1
0
        public override void OnFlowToolbarGUI(GUIStyle buttonStyle)
        {
            var disabledDescr = string.Empty;

                        #if WEBPLAYER
            GUI.enabled   = false;
            disabledDescr = " (WebPlayer Restriction)";
                        #endif
            if (WindowGUIUtilities.ButtonAddon("FlowCompiler", "Compile UI... " + disabledDescr, buttonStyle) == true)
            {
                this.Show(null);
            }

            /*
             * if (GUILayout.Button("Compile UI" + disabledDescr, buttonStyle)) {
             *
             *      FlowCompiler.GenerateUI(AssetDatabase.GetAssetPath(this.cachedData));
             *
             * }
             *
             * if (GUILayout.Button("Force Recompile UI" + disabledDescr, buttonStyle)) {
             *
             *      FlowCompiler.GenerateUI( AssetDatabase.GetAssetPath( this.cachedData ), recompile: true );
             *
             * }*/
                        #if WEBPLAYER
            GUI.enabled = true;
                        #endif
        }
        private void DrawPreview(float width)
        {
            if (this.screenInstance == null || this.layoutInstance == null)
            {
                return;
            }

            GUILayout.Label("Screen: " + this.screenInstance.name);
            GUILayout.Label("Layout: " + this.layoutInstance.name);

            if (WindowGUIUtilities.ButtonAddon("DevicePreview", "Build Preview", "Install it to get the preview of your screen per device.") == true)
            {
                if (this.previewScreen != null)
                {
                    GameObject.DestroyImmediate(this.previewScreen.gameObject);
                }

                this.previewScreen = WindowSystem.Show(this.screenInstance);
                this.ShowPreview();
            }
        }