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); }
override public void ShowPane() { this.convolutionMatrixLabel.Left = this.Left + ControlBase.FixedMargin; this.convolutionMatrixLabel.Top = this.Top + this.ControlHeight + ControlBase.FixedMargin; this.convolutionMatrixLabel.Width = (this.Width / 3) - ControlBase.FixedMargin / 4; this.convolutionMatrixLabel.Height = this.ControlHeight; this.convolutionMatrixLabel.OnGUI(); this.convolutionMatrixLabel.Visible = true; GUIUtil.AddGUIButtonAfter(this, this.kernelTopXField, this.convolutionMatrixLabel, 3); GUIUtil.AddGUIButton(this, this.kernelTopYField, this.kernelTopXField, 3); GUIUtil.AddGUIButton(this, this.kernelTopZField, this.kernelTopYField, 3); GUIUtil.AddGUIButtonAfter(this, this.kernelMiddleXField, this.kernelTopXField, 3); GUIUtil.AddGUIButton(this, this.kernelMiddleYField, this.kernelMiddleXField, 3); GUIUtil.AddGUIButton(this, this.kernelMiddleZField, this.kernelMiddleYField, 3); GUIUtil.AddGUIButtonAfter(this, this.kernelBottomXField, this.kernelMiddleXField, 3); GUIUtil.AddGUIButton(this, this.kernelBottomYField, this.kernelBottomXField, 3); GUIUtil.AddGUIButton(this, this.kernelBottomZField, this.kernelBottomYField, 3); GUIUtil.AddGUISlider(this, this.divisorSlider); GUIUtil.AddGUISlider(this, this.amountSlider); }
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); }