Beispiel #1
0
        private void CreateUI()
        {
            Thickness margin = new Thickness(0, 2, 0, 4);

            _Frame = new Skill.Framework.UI.Frame("Frame");
            _Panel = new StackPanel();

            Grid pnlToggles = new Grid()
            {
                Height = 22
            };

            pnlToggles.ColumnDefinitions.Add(1, GridUnitType.Star);
            pnlToggles.ColumnDefinitions.Add(1, GridUnitType.Star);

            _TbEnable = new UI.ToggleButton()
            {
                IsChecked = _Implant.IsEnable, Margin = margin, Left = true, Column = 0
            }; _TbEnable.Label.text = "Enable";
            _TbUniform = new UI.ToggleButton()
            {
                IsChecked = _Implant.Uniform, Margin = margin, Left = true, Column = 1
            }; _TbUniform.Label.text = "Uniform";

            pnlToggles.Controls.Add(_TbEnable);
            pnlToggles.Controls.Add(_TbUniform);

            _AssetField = new Skill.Editor.UI.ObjectField <ImplantAsset>()
            {
                VerticalAlignment = VerticalAlignment.Center, Margin = margin, AllowSceneObjects = false
            };
            _AssetField.Label.text = "ImplantAsset";
            if (_Implant.ImplantAsset != null)
            {
                _Asset = _Implant.ImplantAsset as ImplantAsset;
                _Implant.ImplantAsset = _AssetField.Object = _Asset;
            }

            _RootField = new ObjectField <Transform>()
            {
                Margin = margin, AllowSceneObjects = true, Object = _Implant.Root
            }; _RootField.Label.text = "Root";

            _Layers = new Skill.Editor.UI.LayerMaskField()
            {
                Layers = _Implant.LayerMask, VerticalAlignment = VerticalAlignment.Center, Margin = margin
            };
            _Layers.Label.text = "Raycast layers";

            _SliDensity = new Skill.Editor.UI.IntSlider()
            {
                Value = _Implant.Density, MinValue = 1, MaxValue = 1000, Margin = margin, Height = 16
            }; _SliDensity.Label.text = "Density"; _SliDensity.Label.tooltip = "Shift + (W/S)";
            _SliRotation = new Skill.Editor.UI.Slider()
            {
                Value = _Implant.Rotation, MinValue = 0.0f, MaxValue = 360, Margin = margin, Height = 16
            }; _SliRotation.Label.text = "Rotation"; _SliRotation.Label.tooltip = "Shift + (A/D)";
            _SliOffsetY = new Skill.Editor.UI.Slider()
            {
                Value = _Implant.OffsetY, MinValue = -10.0f, MaxValue = 20, Margin = margin, Height = 16
            }; _SliOffsetY.Label.text = "Offset Y"; _SliOffsetY.Label.tooltip = "Offset in Y axis)";
            _SliMinRadius             = new Skill.Editor.UI.Slider()
            {
                Value = _Implant.MinRadius, MinValue = 0.0f, MaxValue = 200, Margin = margin, Height = 16
            }; _SliMinRadius.Label.text = "Min Radius";
            _SliMaxRadius = new Skill.Editor.UI.Slider()
            {
                Value = _Implant.MaxRadius, MinValue = 0.0f, MaxValue = 200, Margin = margin, Height = 16
            }; _SliMaxRadius.Label.text = "Max Radius";
            _SliRectWidth = new Skill.Editor.UI.Slider()
            {
                Value = _Implant.RectWidth, MinValue = 0.0f, MaxValue = 1000, Margin = margin, Height = 16
            }; _SliRectWidth.Label.text = "Width";
            _SliRectHeight = new Skill.Editor.UI.Slider()
            {
                Value = _Implant.RectHeight, MinValue = 0.0f, MaxValue = 1000, Margin = margin, Height = 16
            }; _SliRectHeight.Label.text = "Height";
            _Help = new Skill.Editor.UI.HelpBox()
            {
                Message = "Hold Ctrl and Right Click to implant obejcts.\nMouse3 to shuffle.\nShift + R : Make reference point.\nSpace : R reference point", Height = 60, Margin = new Thickness(0, 10, 0, 0)
            };

            _TbModes = new TabHeader {
                Margin = new Thickness(0, 2, 0, 10), HorizontalAlignment = HorizontalAlignment.Center, Width = 200, Height = 20
            };
            _TbModes[0].text     = "Circle";
            _TbModes[1].text     = "Rectangle";
            _TbModes.SelectedTab = _Implant.BrushMode;


            _Panel.Controls.Add(pnlToggles);
            _Panel.Controls.Add(_AssetField);
            _Panel.Controls.Add(_RootField);
            _Panel.Controls.Add(_Layers);
            _Panel.Controls.Add(_SliDensity);
            _Panel.Controls.Add(_SliRotation);
            _Panel.Controls.Add(_SliOffsetY);
            _Panel.Controls.Add(_TbModes);
            _Panel.Controls.Add(_SliMinRadius);
            _Panel.Controls.Add(_SliMaxRadius);
            _Panel.Controls.Add(_SliRectWidth);
            _Panel.Controls.Add(_SliRectHeight);
            _Panel.Controls.Add(_Help);
            _Frame.Grid.Controls.Add(_Panel);

            ChangeMode();
            UpdateRotation();

            _AssetField.ObjectChanged   += _AssetField_ObjectChanged;
            _RootField.ObjectChanged    += _RootField_ObjectChanged;
            _Layers.LayersChanged       += _Layers_LayersChanged;
            _SliDensity.ValueChanged    += _SliDensity_ValueChanged;
            _SliRotation.ValueChanged   += _SliRotation_ValueChanged;
            _TbModes.SelectedTabChanged += _TbModes_SelectedTabChanged;
            _SliMinRadius.ValueChanged  += _SliMinRadius_ValueChanged;
            _SliMaxRadius.ValueChanged  += _SliMaxRadius_ValueChanged;
            _SliRectWidth.ValueChanged  += _SliRectWidth_ValueChanged;
            _SliRectHeight.ValueChanged += _SliRectHeight_ValueChanged;
            _SliOffsetY.ValueChanged    += _SliOffsetY_ValueChanged;
            _TbEnable.Changed           += _TbEnable_Changed;
            _TbUniform.Changed          += _TbUniform_Changed;
        }
Beispiel #2
0
        private void CreateUI()
        {
            _Panel = new StackPanel()
            {
                Padding = new Skill.Framework.UI.Thickness(2, 4, 2, 0)
            };
            _TextureField = new Skill.Editor.UI.ObjectField <Texture2D>()
            {
                Object = _PaintColor.Texture, HorizontalAlignment = Skill.Framework.UI.HorizontalAlignment.Center, Width = 80, Height = 80, Margin = new Skill.Framework.UI.Thickness(2)
            };


            #region _TbChannels
            _TbChannels = new UI.TabHeader(4, true)
            {
                Margin = new Thickness(0, 2, 0, 10), HorizontalAlignment = HorizontalAlignment.Center, Width = 200, Height = 20
            };
            _TbChannels[0].text = "R";
            _TbChannels[1].text = "G";
            _TbChannels[2].text = "B";
            _TbChannels[3].text = "A";

            _TbChannels.SetTabSelected(0, _PaintColor.ChannelR);
            _TbChannels.SetTabSelected(1, _PaintColor.ChannelG);
            _TbChannels.SetTabSelected(2, _PaintColor.ChannelB);
            _TbChannels.SetTabSelected(3, _PaintColor.ChannelA);
            #endregion

            #region _LayersField and _PUV and _TbBrush

            Grid layersPanel = new Grid()
            {
                Height = 32, Padding = new Thickness(2, 6)
            };
            layersPanel.ColumnDefinitions.Add(90, GridUnitType.Pixel);
            layersPanel.ColumnDefinitions.Add(50, GridUnitType.Pixel);
            layersPanel.ColumnDefinitions.Add(10, GridUnitType.Pixel);
            layersPanel.ColumnDefinitions.Add(45, GridUnitType.Pixel);
            layersPanel.ColumnDefinitions.Add(1, GridUnitType.Star);


            _TbBrush = new UI.ToggleButton()
            {
                Column = 0, IsChecked = _PaintColor.Brush, Left = true
            };
            _TbBrush.Label.text = "Brush View";
            layersPanel.Controls.Add(_TbBrush);

            _PUV = new Popup()
            {
                Row = 0, Column = 1
            };
            PopupOption uv1 = new PopupOption(0)
            {
                Name = "UV1"
            }; uv1.Content.text = "UV 1";
            PopupOption uv2 = new PopupOption(1)
            {
                Name = "UV2"
            }; uv2.Content.text = "UV 2";
            _PUV.Options.Add(uv1);
            _PUV.Options.Add(uv2);
            _PUV.SelectedIndex = _PaintColor.UV2 ? 1 : 0;
            layersPanel.Controls.Add(_PUV);

            Label lbl = new Label()
            {
                Text = "Layers", Column = 3
            };
            layersPanel.Controls.Add(lbl);


            _LayersField = new LayerMaskField()
            {
                Row = 0, Column = 4
            };
            _LayersField.Layers     = _PaintColor.LayerMask;
            _LayersField.Label.text = string.Empty;
            layersPanel.Controls.Add(_LayersField);


            #endregion

            _PnlFavoriteColors = new Grid()
            {
                Height = 22, Margin = new Thickness(0, 2)
            };
            _FavoriteColors = new Color[] { new Color(1.0f, 0.0f, 0.0f, 0.0f),   // red
                                            new Color(0.0f, 1.0f, 0.0f, 0.0f),   // green
                                            new Color(0.0f, 0.0f, 1.0f, 0.0f),   // blue
                                            new Color(0.0f, 0.0f, 0.0f, 1.0f),   // Alpha
                                            new Color(1.0f, 1.0f, 1.0f, 1.0f),   // white
                                            new Color(0.0f, 0.0f, 0.0f, 0.0f) }; // black
            _PnlFavoriteColors.Controls.Add(new Box()
            {
                Row = 0, Column = 0, ColumnSpan = _FavoriteColors.Length
            });
            for (int i = 0; i < _FavoriteColors.Length; i++)
            {
                _PnlFavoriteColors.ColumnDefinitions.Add(1, GridUnitType.Star);
                Skill.Framework.UI.Button btn = new Skill.Framework.UI.Button()
                {
                    Tag = i.ToString(), Margin = new Thickness(4), Style = new GUIStyle(), Column = i
                };
                string    toolTip    = string.Empty;
                Texture2D background = null;
                if (i == 0)
                {
                    background = Skill.Editor.Resources.UITextures.Colors.Red; toolTip = "Red";
                }
                else if (i == 1)
                {
                    background = Skill.Editor.Resources.UITextures.Colors.Green; toolTip = "Green";
                }
                else if (i == 2)
                {
                    background = Skill.Editor.Resources.UITextures.Colors.Blue; toolTip = "Blue";
                }
                else if (i == 3)
                {
                    background = Skill.Editor.Resources.UITextures.Colors.Transparent; toolTip = "Alpha";
                }
                else if (i == 4)
                {
                    background = Skill.Editor.Resources.UITextures.Colors.White; toolTip = "White";
                }
                else if (i == 5)
                {
                    background = Skill.Editor.Resources.UITextures.Colors.Black; toolTip = "Black";
                }
                btn.Style.normal.background = btn.Style.focused.background = btn.Style.hover.background = btn.Style.active.background = background;
                btn.Content.tooltip         = toolTip;
                btn.Click += btn_Click;
                _PnlFavoriteColors.Controls.Add(btn);
            }


            _ColorField = new ColorField()
            {
                Color = _PaintColor.Color, Margin = new Thickness(2)
            };
            _SliRadius = new Skill.Editor.UI.Slider()
            {
                Value = _PaintColor.Radius, MinValue = 1, MaxValue = 40, Margin = new Thickness(2), Height = 16
            }; _SliRadius.Label.text = "Radius"; _SliRadius.Label.tooltip = "Shift + (A/D)";
            _SliStrength             = new Skill.Editor.UI.Slider()
            {
                Value = _PaintColor.Strength, MinValue = 1f, MaxValue = 100f, Margin = new Thickness(2), Height = 16
            }; _SliStrength.Label.text = "Strength";
            _SliFalloff = new Skill.Editor.UI.Slider()
            {
                Value = _PaintColor.Falloff, MinValue = 0.0f, MaxValue = 1.0f, Margin = new Thickness(2), Height = 16
            }; _SliFalloff.Label.text = "Falloff";
            _HelpBox = new HelpBox()
            {
                Height = 60, Message = "Hold CTRL and drag with Right Click to paint.\nTexture must be read/write enable\nValid texture format:\n    ARGB32, RGBA32, RGB24 and Alpha8"
            };

            _BtnSaveTexture = new Skill.Framework.UI.Button()
            {
                Margin = new Thickness(2), Height = 40
            }; _BtnSaveTexture.Content.text = "Save Texture";
            _TbShadowMode = new UI.ToggleButton()
            {
                Left = false, Margin = new Thickness(2), Height = 20
            }; _TbShadowMode.Label.text = "Shadow Mode";


            _Panel.Controls.Add(_TextureField);
            _Panel.Controls.Add(_TbChannels);
            _Panel.Controls.Add(_PnlFavoriteColors);
            _Panel.Controls.Add(_ColorField);
            _Panel.Controls.Add(layersPanel);
            _Panel.Controls.Add(_SliRadius);
            _Panel.Controls.Add(_SliStrength);
            _Panel.Controls.Add(_SliFalloff);
            _Panel.Controls.Add(_TbShadowMode);
            _Panel.Controls.Add(_HelpBox);
            _Panel.Controls.Add(_BtnSaveTexture);

            _Frame = new Frame("Frame");
            _Frame.Grid.Controls.Add(_Panel);

            _TextureField.ObjectChanged += _TextureField_ObjectChanged;
            _TbBrush.Changed            += _TbBrush_Changed;
            _TbShadowMode.Changed       += _TbShadowMode_Changed;

            _TbChannels.TabChanged += Channel_Changed;

            _LayersField.LayersChanged += _LayersField_LayersChanged;
            _PUV.OptionChanged         += _PUV_OptionChanged;
            _ColorField.ColorChanged   += _ColorField_ColorChanged;

            _SliRadius.ValueChanged   += _SliRadius_ValueChanged;
            _SliStrength.ValueChanged += _SliStrength_ValueChanged;
            _SliFalloff.ValueChanged  += _SliFalloff_ValueChanged;
            _BtnSaveTexture.Click     += _BtnSaveTexture_Click;
        }
Beispiel #3
0
        private void CreateUI()
        {
            _ChangeCheck = new ChangeCheck();
            _ChangeCheck.ColumnDefinitions.Add(1, Skill.Framework.UI.GridUnitType.Star);
            _ChangeCheck.ColumnDefinitions.Add(1, Skill.Framework.UI.GridUnitType.Star);

            _ChangeCheck.RowDefinitions.Add(24, Skill.Framework.UI.GridUnitType.Pixel);  // _BtnAdd , _BtnRemove
            _ChangeCheck.RowDefinitions.Add(164, Skill.Framework.UI.GridUnitType.Pixel); // _PointsScrollView
            _ChangeCheck.RowDefinitions.Add(86, Skill.Framework.UI.GridUnitType.Pixel);  // _PnlPoperties
            _ChangeCheck.RowDefinitions.Add(130, Skill.Framework.UI.GridUnitType.Pixel); //_PnlTools

            _BtnAdd = new Button()
            {
                Row = 0, Column = 0
            }; _BtnAdd.Content.text = "Add"; _BtnAdd.Content.tooltip = "Add new point the end of the path."; _BtnAdd.Content.image = Resources.UITextures.Plus;
            _BtnRemove = new Button()
            {
                Row = 0, Column = 1
            }; _BtnRemove.Content.text = "Remove"; _BtnRemove.Content.tooltip = "Remove selected point."; _BtnRemove.Content.image = Resources.UITextures.Minus;
            _PointsScrollView          = new Skill.Framework.UI.ScrollView()
            {
                Row = 1, Column = 0, ColumnSpan = 2, AlwayShowVertical = true, Padding = new Skill.Framework.UI.Thickness(0, 2)
            };
            _GridPoints = new Skill.Framework.UI.SelectionGrid()
            {
                XCount = 5
            };
            _PointsScrollView.Controls.Add(_GridPoints);
            _PointsScrollView.RenderAreaChanged += _PointsScrollView_RenderAreaChanged;

            _SelectedPointPropertiesBackground = new Skill.Framework.UI.Box()
            {
                Row = 2, Column = 0, ColumnSpan = 2
            };
            _PnlPoperties = new Skill.Framework.UI.StackPanel()
            {
                Row = 2, Column = 0, ColumnSpan = 2, Orientation = Skill.Framework.UI.Orientation.Vertical, Padding = new Skill.Framework.UI.Thickness(2)
            };

            _FFTime = new FloatField()
            {
                Height = 16, Margin = new Skill.Framework.UI.Thickness(0, 2, 0, 4)
            }; _FFTime.Label.text = "Time";
            _VFValue = new Vector3Field()
            {
                Height = 20
            }; _VFValue.Label.text = "Position";
            _VFInTangent           = new Vector3Field()
            {
                Height = 20
            }; _VFInTangent.Label.text = "InTangent";
            _VFOutTangent = new Vector3Field()
            {
                Height = 20
            }; _VFOutTangent.Label.text = "OutTangent";

            _PnlPoperties.Controls.Add(_FFTime);
            _PnlPoperties.Controls.Add(_VFValue);
            _PnlPoperties.Controls.Add(_VFInTangent);
            _PnlPoperties.Controls.Add(_VFOutTangent);

            _PnlTools = new Skill.Framework.UI.Grid()
            {
                Row = 5, Column = 0, ColumnSpan = 2, Padding = new Skill.Framework.UI.Thickness(2)
            };
            _PnlTools.ColumnDefinitions.Add(1, Skill.Framework.UI.GridUnitType.Star);
            _PnlTools.ColumnDefinitions.Add(1, Skill.Framework.UI.GridUnitType.Star);
            _PnlTools.ColumnDefinitions.Add(2, Skill.Framework.UI.GridUnitType.Star);

            _PnlTools.RowDefinitions.Add(1, Skill.Framework.UI.GridUnitType.Star); // _LmGroundLayer
            _PnlTools.RowDefinitions.Add(1, Skill.Framework.UI.GridUnitType.Star); // _BtnGroundAll , _BtnGroundSelected
            _PnlTools.RowDefinitions.Add(1, Skill.Framework.UI.GridUnitType.Star); // _LblFLinearTime
            _PnlTools.RowDefinitions.Add(1, Skill.Framework.UI.GridUnitType.Star);
            _PnlTools.RowDefinitions.Add(1, Skill.Framework.UI.GridUnitType.Star);

            _LmGroundLayer = new LayerMaskField()
            {
                Row = 0, Column = 0, ColumnSpan = 3, Layers = _Path.GroundLayer, Margin = new Framework.UI.Thickness(2)
            }; _LmGroundLayer.Label.text = "Ground Layer";
            _BtnGroundSelected           = new Button()
            {
                Row = 1, Column = 0, ColumnSpan = 2, Margin = new Skill.Framework.UI.Thickness(2, 2)
            }; _BtnGroundSelected.Content.text = "Ground Selected"; _BtnGroundSelected.Content.tooltip = "put selected on ground";
            _BtnGroundAll = new Button()
            {
                Row = 1, Column = 2, Margin = new Skill.Framework.UI.Thickness(2, 2)
            }; _BtnGroundAll.Content.text = "Ground All"; _BtnGroundAll.Content.tooltip = "put all points on ground";

            _LblFLinearTime = new LabelField()
            {
                Row = 2, Column = 0, Margin = new Skill.Framework.UI.Thickness(0, 2)
            }; _LblFLinearTime.Label.text = "Time";
            _FFLinearTime = new FloatField()
            {
                Row = 2, Column = 1, Margin = new Skill.Framework.UI.Thickness(0, 2), Value = _Path.PathTime
            };
            _BtnSetLinearTime = new Button()
            {
                Row = 2, Column = 2, Margin = new Skill.Framework.UI.Thickness(2, 2)
            }; _BtnSetLinearTime.Content.text = "Set Time by Distance"; _BtnSetLinearTime.Content.tooltip = "Set time of nodes by relative distance";

            _SliSmoothValue = new Skill.Editor.UI.Slider()
            {
                Row = 3, Column = 0, ColumnSpan = 3, MinValue = 0.0f, MaxValue = 1.0f, Value = _Path.SmoothValue
            }; _SliSmoothValue.Label.text = "Smooth Value";
            _BtnSmoothCurve = new Button()
            {
                Row = 4, Column = 0, ColumnSpan = 2, Margin = new Skill.Framework.UI.Thickness(2, 2)
            }; _BtnSmoothCurve.Content.text = "Smooth Curve"; _BtnSmoothCurve.Content.tooltip = "Smooth the in and out tangents of the keys.";
            _BtnSmoothPoint = new Button()
            {
                Row = 4, Column = 2, Margin = new Skill.Framework.UI.Thickness(2, 2)
            }; _BtnSmoothPoint.Content.text = "Smooth Point"; _BtnSmoothPoint.Content.tooltip = "Smooth the in and out tangents of the selected key.";

            _PnlTools.Controls.Add(_LmGroundLayer);
            _PnlTools.Controls.Add(_BtnGroundSelected);
            _PnlTools.Controls.Add(_BtnGroundAll);
            _PnlTools.Controls.Add(_LblFLinearTime);
            _PnlTools.Controls.Add(_FFLinearTime);
            _PnlTools.Controls.Add(_BtnSetLinearTime);
            _PnlTools.Controls.Add(_SliSmoothValue);
            _PnlTools.Controls.Add(_BtnSmoothPoint);
            _PnlTools.Controls.Add(_BtnSmoothCurve);


            _ChangeCheck.Controls.Add(_BtnAdd);
            _ChangeCheck.Controls.Add(_BtnRemove);
            _ChangeCheck.Controls.Add(_PointsScrollView);
            _ChangeCheck.Controls.Add(_SelectedPointPropertiesBackground);
            _ChangeCheck.Controls.Add(_PnlPoperties);
            _ChangeCheck.Controls.Add(_PnlTools);

            _Frame = new Skill.Framework.UI.Frame("EditorFrame");
            _Frame.Grid.Controls.Add(_ChangeCheck);

            _BtnAdd.Click               += _BtnAdd_Click;
            _BtnRemove.Click            += _BtnRemove_Click;
            _ChangeCheck.Changed        += _ChangeCheck_Changed;
            _GridPoints.SelectedChanged += _GridPoints_SelectedChanged;

            _FFTime.ValueChanged       += SelectedPoint_ValueChanged;
            _VFValue.ValueChanged      += SelectedPoint_ValueChanged;
            _VFInTangent.ValueChanged  += SelectedPoint_ValueChanged;
            _VFOutTangent.ValueChanged += SelectedPoint_ValueChanged;

            _FFLinearTime.ValueChanged += _FFLinearTime_ValueChanged;
            _BtnSmoothPoint.Click      += _BtnSmoothPoint_Click;
            _BtnSmoothCurve.Click      += _BtnSmoothCurve_Click;
            _BtnSetLinearTime.Click    += _BtnSetLinearTime_Click;

            _SliSmoothValue.ValueChanged += _SliSmoothValue_ValueChanged;

            _LmGroundLayer.LayersChanged += _LmGroundLayer_LayersChanged;
            _BtnGroundSelected.Click     += _BtnGroundSelected_Click;
            _BtnGroundAll.Click          += _BtnGroundAll_Click;
        }
Beispiel #4
0
        public ImplantObjectPropertiesField()
        {
            this.Margin = new Thickness(0, 0, 0, 8);
            this.Width  = 300;

            this._MinScaleField = new FloatField()
            {
                Margin = new Thickness(2, 2, 2, 0)
            };
            this._MinScaleField.Label.text = "Min Scale Percent";

            this._MaxScaleField = new FloatField()
            {
                Margin = new Thickness(2, 2, 2, 0)
            };
            this._MaxScaleField.Label.text = "Max Scale Percent";

            this._ChanceField = new Skill.Editor.UI.Slider()
            {
                MinValue = 0.1f, MaxValue = 1.0f, Margin = new Thickness(2, 2, 2, 2)
            };
            this._ChanceField.Label.text = "Chance";

            _RandomRotationPanel = new Grid()
            {
                Height = 45
            };

            _RandomRotationPanel.ColumnDefinitions.Add(30, GridUnitType.Pixel);
            _RandomRotationPanel.ColumnDefinitions.Add(1, GridUnitType.Star);

            _RandomRotationPanel.RowDefinitions.Add(1, GridUnitType.Star);
            _RandomRotationPanel.RowDefinitions.Add(1, GridUnitType.Star);

            _MinRandomRotation = new Vector3Field()
            {
                Row = 0, Column = 1
            };
            _MaxRandomRotation = new Vector3Field()
            {
                Row = 1, Column = 1
            };
            _RandomRotationPanel.Controls.Add(_MinRandomRotation);
            _RandomRotationPanel.Controls.Add(_MaxRandomRotation);

            Label lblMin = new Label()
            {
                Row = 0, Column = 0, Text = "Min"
            };
            Label lblMax = new Label()
            {
                Row = 1, Column = 0, Text = "Max"
            };

            _RandomRotationPanel.Controls.Add(lblMin);
            _RandomRotationPanel.Controls.Add(lblMax);
            _CustomRotation = new Skill.Editor.UI.Vector3Field();

            _RandomYaw = new Skill.Framework.UI.ToggleButton()
            {
                HorizontalAlignment = Skill.Framework.UI.HorizontalAlignment.Left, Margin = new Thickness(20, 0, 0, 0)
            };
            _RandomYaw.Content.text = "Random Yaw";

            _RotationSF = new Skill.Editor.UI.SelectionField()
            {
                Margin = new Thickness(2)
            };
            _RotationSF.Label.Width           = 110;
            _RotationSF.Background.Visibility = Skill.Framework.UI.Visibility.Hidden;

            _RotationSF.AddField(_RandomYaw, "Surface Normal ");
            _RotationSF.AddField(_CustomRotation, "Custom ");
            _RotationSF.AddField(_RandomRotationPanel, "Random ");

            _RotationLabel = new DropShadowLabel()
            {
                Text = "Rotation", Margin = new Thickness(4, 0, 0, 0)
            };

            this.Orientation = Orientation.Vertical;
            this.Controls.Add(_MinScaleField);
            this.Controls.Add(_MaxScaleField);
            this.Controls.Add(_ChanceField);
            this.Controls.Add(_RotationLabel);
            this.Controls.Add(_RotationSF);

            this._MinScaleField.ValueChanged      += new EventHandler(_MinScaleField_ValueChanged);
            this._MaxScaleField.ValueChanged      += new EventHandler(_MaxScaleField_ValueChanged);
            this._ChanceField.ValueChanged        += new EventHandler(_ChanceField_ValueChanged);
            this._RotationSF.SelectedFieldChanged += new EventHandler(_RotationSF_SelectedFieldChanged);

            this._MinRandomRotation.ValueChanged += _MinRandomRotation_ValueChanged;
            this._MaxRandomRotation.ValueChanged += _MaxRandomRotation_ValueChanged;

            this._CustomRotation.ValueChanged += new EventHandler(_CustomRotation_ValueChanged);
            this._RandomYaw.Changed           += new EventHandler(_RandomYaw_Changed);


            this.Object = null;
            this.Height = _MinScaleField.LayoutHeight + _MinScaleField.Margin.Vertical +
                          _MaxScaleField.LayoutHeight + _MaxScaleField.Margin.Vertical +
                          _ChanceField.LayoutHeight + _ChanceField.Margin.Vertical +
                          _RotationLabel.LayoutHeight + _RotationLabel.Margin.Vertical +
                          _RotationSF.LayoutHeight + _RotationSF.Margin.Vertical + 20;
        }