Exemplo n.º 1
0
        override public void OnGUI()
        {
            try
            {
                this.SetAllVisible(false, 0);

                // 光源名ラベル
                this.enableCheckbox.Left   = this.Left + ControlBase.FixedMargin;
                this.enableCheckbox.Top    = this.Top + ControlBase.FixedMargin;
                this.enableCheckbox.Width  = this.Width - ControlBase.FixedMargin * 2;
                this.enableCheckbox.Height = this.ControlHeight;

                // GUIUtil.AddResetButton(this, this.resetButton);

                this.Update();
                if (this.enableCheckbox.Value == true)
                {
                    ShowPane();
                }

                this.Height = GUIUtil.GetHeightForParent(this);

                // 子コントロールGUI処理
                this.OnGUIChildControls();
            }
            catch (Exception e)
            {
                Debug.LogError(e.ToString());
            }
        }
        override public void OnGUI()
        {
            this.SetAllVisible(false, 0);

            this.nameLabel.Left   = this.Left + ControlBase.FixedMargin;
            this.nameLabel.Top    = this.Top + ControlBase.FixedMargin;
            this.nameLabel.Width  = this.Width / 2 - ControlBase.FixedMargin / 4;
            this.nameLabel.Height = this.ControlHeight;
            this.nameLabel.OnGUI();

            this.loadButton.Left   = this.Left + this.nameLabel.Width + ControlBase.FixedMargin;
            this.loadButton.Top    = this.nameLabel.Top;
            this.loadButton.Width  = this.Width / 4 - ControlBase.FixedMargin / 4;
            this.loadButton.Height = this.ControlHeight;
            this.loadButton.OnGUI();

            this.deleteButton.Left   = this.Left + this.nameLabel.Width + this.loadButton.Width + ControlBase.FixedMargin;
            this.deleteButton.Top    = this.nameLabel.Top;
            this.deleteButton.Width  = this.Width / 4 - ControlBase.FixedMargin / 4;
            this.deleteButton.Height = this.ControlHeight;
            this.deleteButton.OnGUI();

            foreach (ControlBase control in this.ChildControls)
            {
                // TODO: make this always happen
                control.ScreenPos = this.ScreenPos;
            }

            this.Height = GUIUtil.GetHeightForParent(this);
        }
        override public void ShowPane()
        {
            this.languageBox.Left     = this.Left + ControlBase.FixedMargin;
            this.languageBox.Top      = this.Top + ControlBase.FixedMargin;
            this.languageBox.Width    = this.Width - ControlBase.FixedMargin * 2;
            this.languageBox.Height   = this.ControlHeight;
            this.languageBox.FontSize = this.FontSize;
            this.languageBox.OnGUI();

            GUIUtil.AddGUICheckbox(this, this.nameTextField, this.languageBox);
            GUIUtil.AddGUICheckbox(this, this.saveButton, this.nameTextField);
            GUIUtil.AddGUICheckbox(this, this.loadTargetLabel, this.saveButton);

            GUIUtil.AddGUIButtonAfter(this, this.loadEffectsCheckbox, this.loadTargetLabel, 5);
            GUIUtil.AddGUIButton(this, this.loadLightsCheckbox, this.loadEffectsCheckbox, 5);
            GUIUtil.AddGUIButton(this, this.loadModelsCheckbox, this.loadLightsCheckbox, 5);
            GUIUtil.AddGUIButton(this, this.loadCameraCheckbox, this.loadModelsCheckbox, 5);
            GUIUtil.AddGUIButton(this, this.loadMiscCheckbox, this.loadCameraCheckbox, 5);

            ControlBase prev = this.loadLightsCheckbox;

            foreach (SavePane pane in this.savePanes)
            {
                GUIUtil.AddGUICheckbox(this, pane, prev);
                prev = pane;
            }

            this.Height = GUIUtil.GetHeightForParent(this);
        }
Exemplo n.º 4
0
        override public void OnGUI()
        {
            this.SetAllVisible(false, 0);

            this.modelIconImage.Left   = this.Left + ControlBase.FixedMargin;
            this.modelIconImage.Top    = this.Top + ControlBase.FixedMargin;
            this.modelIconImage.Width  = (this.Width / 3 - ControlBase.FixedMargin / 4) / 4;
            this.modelIconImage.Height = this.modelIconImage.Width;
            this.modelIconImage.OnGUI();

            this.modelNameLabel.Left   = this.modelIconImage.Left + this.modelIconImage.Width + ControlBase.FixedMargin;
            this.modelNameLabel.Top    = this.Top + ControlBase.FixedMargin + this.ControlHeight / 2;
            this.modelNameLabel.Width  = this.modelIconImage.Width * 2;
            this.modelNameLabel.Height = this.ControlHeight;
            this.modelNameLabel.OnGUI();

            GUIUtil.AddGUIButtonNoRender(this, this.gizmoPanToggle, this.modelNameLabel, 5);
            this.gizmoPanToggle.Top -= this.ControlHeight / 2;
            this.gizmoPanToggle.OnGUI();

            GUIUtil.AddGUIButton(this, this.gizmoRotateToggle, this.gizmoPanToggle, 5);
            GUIUtil.AddGUIButton(this, this.gizmoScaleToggle, this.gizmoRotateToggle, 5);
            GUIUtil.AddGUIButton(this, this.modelCopyButton, this.gizmoScaleToggle, 8);

            GUIUtil.AddGUIButtonNoRender(this, this.resetPanButton, this.modelNameLabel, 5);
            this.resetPanButton.Top += this.ControlHeight / 2;
            this.resetPanButton.OnGUI();

            GUIUtil.AddGUIButton(this, this.resetRotateButton, this.resetPanButton, 5);
            GUIUtil.AddGUIButton(this, this.resetScaleButton, this.resetRotateButton, 5);
            GUIUtil.AddGUIButton(this, this.modelDeleteButton, this.resetScaleButton, 8);

            if (this.gizmoScaleToggle.Value == true)
            {
                GUIUtil.AddGUICheckbox(this, this.gizmoScaleAllAxesToggle, this.modelIconImage);
            }

            this.Height = GUIUtil.GetHeightForParent(this);
        }
        override public void OnGUI()
        {
            this.SetAllVisible(false, 0);

            this.lightNameLabel.Left   = this.Left + ControlBase.FixedMargin;
            this.lightNameLabel.Top    = this.Top + ControlBase.FixedMargin;
            this.lightNameLabel.Width  = this.Width / 2 - ControlBase.FixedMargin / 4;
            this.lightNameLabel.Height = this.ControlHeight;
            this.lightNameLabel.Text   = this.Text;
            this.lightNameLabel.OnGUI();

            GUIUtil.AddGUICheckbox(this, this.lightTypeComboBox);

            bool isMainLight = this.Text == Translation.GetText("UI", "mainLight");
            int  buttonCount = isMainLight ? 3 : 5;

            GUIUtil.AddGUIButtonAfter(this, this.lightResetButton, this.lightTypeComboBox, buttonCount);
            this.lightResetButton.Height = this.ControlHeight;

            GUIUtil.AddGUIButton(this, this.lightResetPosButton, this.lightResetButton, buttonCount);
            GUIUtil.AddGUIButton(this, this.lightDragToggle, this.lightResetPosButton, buttonCount);

            if (!isMainLight)
            {
                GUIUtil.AddGUIButton(this, this.lightEnableToggle, this.lightDragToggle, buttonCount);
                GUIUtil.AddGUIButton(this, this.lightDeleteButton, this.lightEnableToggle, buttonCount);
            }

            GUIUtil.AddGUISlider(this, this.lightRotationXSlider);
            GUIUtil.AddGUISlider(this, this.lightRotationYSlider);
            // GUIUtil.AddGUISlider(this, this.lightRotationZSlider );
            GUIUtil.AddGUISlider(this, this.lightIntensitySlider);
            // GUIUtil.AddGUISlider(this, this.lightBounceIntensitySlider );

            if (this.lightTypeComboBox.SelectedItem != "Directional")
            {
                GUIUtil.AddGUISlider(this, this.lightRangeSlider);
            }

            if (this.lightTypeComboBox.SelectedItem == "Spot")
            {
                GUIUtil.AddGUISlider(this, this.spotLightAngleSlider);
            }

            GUIUtil.AddGUICheckbox(this, this.lightColorPicker);

            if (this.lightTypeComboBox.SelectedItem == "Directional")
            {
                GUIUtil.AddGUICheckbox(this, this.shadowsBox);
                if (this.shadowsBox.SelectedItem != "None")
                {
                    GUIUtil.AddGUISlider(this, this.shadowStrengthSlider);
                    GUIUtil.AddGUISlider(this, this.shadowBiasSlider);
                    GUIUtil.AddGUISlider(this, this.shadowNormalBiasSlider);
                }
            }

            foreach (ControlBase control in this.ChildControls)
            {
                // TODO: make this always happen
                control.ScreenPos = this.ScreenPos;
            }

            this.Height = GUIUtil.GetHeightForParent(this);
        }
Exemplo n.º 6
0
        override public void ShowPane()
        {
            // because bloom is complicated to handle, since it is always enabled
            this.bloomPane.Update();

            // 光源名ラベル
            this.colorCorrectionCurvesPane.Left   = this.Left + ControlBase.FixedMargin;
            this.colorCorrectionCurvesPane.Top    = this.Top + ControlBase.FixedMargin;
            this.colorCorrectionCurvesPane.Width  = this.Width - ControlBase.FixedMargin * 4;
            this.colorCorrectionCurvesPane.Height = this.ControlHeight;
            this.colorCorrectionCurvesPane.OnGUI();

            GUIUtil.AddGUICheckbox(this, this.brightnessContrastGammaPane, this.colorCorrectionCurvesPane);
            GUIUtil.AddGUICheckbox(this, this.shadowsMidtonesHighlightsPane, this.brightnessContrastGammaPane);
            GUIUtil.AddGUICheckbox(this, this.lookupFilterPane, this.shadowsMidtonesHighlightsPane);
            GUIUtil.AddGUICheckbox(this, this.whiteBalancePane, this.lookupFilterPane);
            GUIUtil.AddGUICheckbox(this, this.channelMixerPane, this.whiteBalancePane);
            GUIUtil.AddGUICheckbox(this, this.bleachBypassPane, this.channelMixerPane);
            GUIUtil.AddGUICheckbox(this, this.sepiaPane, this.bleachBypassPane);
            GUIUtil.AddGUICheckbox(this, this.grayscalePane, this.sepiaPane);
            GUIUtil.AddGUICheckbox(this, this.contrastPane, this.grayscalePane);
            GUIUtil.AddGUICheckbox(this, this.edgeDetectPane, this.contrastPane);
            // GUIUtil.AddGUICheckbox(this, this.ssaoPane, this.edgeDetectPane);
            GUIUtil.AddGUICheckbox(this, this.creasePane, this.edgeDetectPane);
            GUIUtil.AddGUICheckbox(this, this.antialiasingPane, this.creasePane);
            GUIUtil.AddGUICheckbox(this, this.noiseAndGrainPane, this.antialiasingPane);
            GUIUtil.AddGUICheckbox(this, this.blurPane, this.noiseAndGrainPane);
            GUIUtil.AddGUICheckbox(this, this.depthOfFieldPane, this.blurPane);
            GUIUtil.AddGUICheckbox(this, this.motionBlurPane, this.depthOfFieldPane);
            GUIUtil.AddGUICheckbox(this, this.bloomPane, this.motionBlurPane);
            GUIUtil.AddGUICheckbox(this, this.globalFogPane, this.bloomPane);
            GUIUtil.AddGUICheckbox(this, this.tiltShiftHdrPane, this.globalFogPane);
            GUIUtil.AddGUICheckbox(this, this.fisheyePane, this.tiltShiftHdrPane);
            GUIUtil.AddGUICheckbox(this, this.vignettingPane, this.fisheyePane);
            GUIUtil.AddGUICheckbox(this, this.sunShaftsPane, this.vignettingPane);

            GUIUtil.AddGUICheckbox(this, this.dynamicLookupPane, this.sunShaftsPane);
            GUIUtil.AddGUICheckbox(this, this.hueFocusPane, this.dynamicLookupPane);
            GUIUtil.AddGUICheckbox(this, this.channelSwapPane, this.hueFocusPane);
            GUIUtil.AddGUICheckbox(this, this.technicolorPane, this.channelSwapPane);
            GUIUtil.AddGUICheckbox(this, this.lensDistortionBlurPane, this.technicolorPane);
            GUIUtil.AddGUICheckbox(this, this.letterboxPane, this.lensDistortionBlurPane);
            GUIUtil.AddGUICheckbox(this, this.analogGlitchPane, this.letterboxPane);
            GUIUtil.AddGUICheckbox(this, this.digitalGlitchPane, this.analogGlitchPane);
            GUIUtil.AddGUICheckbox(this, this.bokehPane, this.digitalGlitchPane);
            GUIUtil.AddGUICheckbox(this, this.obscurancePane, this.bokehPane);
            GUIUtil.AddGUICheckbox(this, this.analogTVPane, this.obscurancePane);
            GUIUtil.AddGUICheckbox(this, this.blendPane, this.analogTVPane);
            GUIUtil.AddGUICheckbox(this, this.comicBookPane, this.blendPane);
            GUIUtil.AddGUICheckbox(this, this.contrastVignettePane, this.comicBookPane);
            GUIUtil.AddGUICheckbox(this, this.convolution3x3Pane, this.contrastVignettePane);
            GUIUtil.AddGUICheckbox(this, this.doubleVisionPane, this.convolution3x3Pane);
            GUIUtil.AddGUICheckbox(this, this.halftonePane, this.doubleVisionPane);
            GUIUtil.AddGUICheckbox(this, this.isolinePane, this.halftonePane);
            GUIUtil.AddGUICheckbox(this, this.kuwaharaPane, this.isolinePane);
            GUIUtil.AddGUICheckbox(this, this.pixelatePane, this.kuwaharaPane);
            GUIUtil.AddGUICheckbox(this, this.rgbSplitPane, this.pixelatePane);
            GUIUtil.AddGUICheckbox(this, this.waveDistortionPane, this.rgbSplitPane);
            GUIUtil.AddGUICheckbox(this, this.wigglePane, this.waveDistortionPane);

            // ウィンドウ高さ調整
            this.Height = GUIUtil.GetHeightForParent(this);
        }