private void RenderMinMaxRotationSlider()
        {
            float minRotation = _settings.MinRotationInDegrees;
            float maxRotation = _settings.MaxRotationInDegrees;

            EditorGUILayoutEx.MinMaxSliderWithFloatFields(GetContentForMinMaxRotationSlider(), ref minRotation, ref maxRotation, RandomRotationValueAxisRandomizationSettings.MinRotationValueInDegrees, RandomRotationValueAxisRandomizationSettings.MaxRotationValueInDegrees);

            if (minRotation != _settings.MinRotationInDegrees)
            {
                UndoEx.RecordForToolAction(_settings);
                _settings.MinRotationInDegrees = minRotation;
            }
            if (maxRotation != _settings.MaxRotationInDegrees)
            {
                UndoEx.RecordForToolAction(_settings);
                _settings.MaxRotationInDegrees = maxRotation;
            }
        }
        private void RenderMinMaxSlopeSlider()
        {
            float minSlope = _settings.MinSlopeInDegrees;
            float maxSlope = _settings.MaxSlopeInDegrees;

            EditorGUILayoutEx.MinMaxSliderWithFloatFields(GetContentForMinMaxSlopeSlider(), ref minSlope, ref maxSlope, DecorPaintSlopeSettings.MinSlopeValueInDegrees, DecorPaintSlopeSettings.MaxSlopeValueInDegrees);

            if (minSlope != _settings.MinSlopeInDegrees)
            {
                UndoEx.RecordForToolAction(_settings);
                _settings.MinSlopeInDegrees = minSlope;
            }
            if (maxSlope != _settings.MaxSlopeInDegrees)
            {
                UndoEx.RecordForToolAction(_settings);
                _settings.MaxSlopeInDegrees = maxSlope;
            }
        }
Exemple #3
0
        private void RenderMinMaxScaleSlider()
        {
            float minScale = _settings.MinScale;
            float maxScale = _settings.MaxScale;

            EditorGUILayoutEx.MinMaxSliderWithFloatFields(GetContentForMinMaxScaleSlider(), ref minScale, ref maxScale, ObjectUniformScaleRandomizationSettings.MinScaleValue, ObjectUniformScaleRandomizationSettings.MaxScaleValue);

            if (minScale != _settings.MinScale)
            {
                UndoEx.RecordForToolAction(_settings);
                _settings.MinScale = minScale;
            }
            if (maxScale != _settings.MaxScale)
            {
                UndoEx.RecordForToolAction(_settings);
                _settings.MaxScale = maxScale;
            }
        }