mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-22 03:41:47 +00:00
Update Randomize Things to change mobjscale instead of sprite scale
This commit is contained in:
parent
192ddc9e6c
commit
e970b2eda3
3 changed files with 210 additions and 430 deletions
|
@ -29,13 +29,13 @@
|
|||
this.bApply = new System.Windows.Forms.Button();
|
||||
this.bCancel = new System.Windows.Forms.Button();
|
||||
this.bUpdateTranslation = new System.Windows.Forms.Button();
|
||||
this.positionJitterAmmount = new IntControl();
|
||||
this.positionJitterAmount = new IntControl();
|
||||
this.bUpdateAngle = new System.Windows.Forms.Button();
|
||||
this.rotationJitterAmmount = new IntControl();
|
||||
this.heightJitterAmmount = new IntControl();
|
||||
this.rotationJitterAmount = new IntControl();
|
||||
this.heightJitterAmount = new IntControl();
|
||||
this.bUpdateHeight = new System.Windows.Forms.Button();
|
||||
this.pitchAmmount = new IntControl();
|
||||
this.rollAmmount = new IntControl();
|
||||
this.pitchAmount = new IntControl();
|
||||
this.rollAmount = new IntControl();
|
||||
this.bUpdatePitch = new System.Windows.Forms.Button();
|
||||
this.bUpdateRoll = new System.Windows.Forms.Button();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
|
@ -45,34 +45,24 @@
|
|||
this.cbRelativeRoll = new System.Windows.Forms.CheckBox();
|
||||
this.cbRelativePitch = new System.Windows.Forms.CheckBox();
|
||||
this.scalegroup = new System.Windows.Forms.GroupBox();
|
||||
this.cbNegativeScaleY = new System.Windows.Forms.CheckBox();
|
||||
this.cbNegativeScaleX = new System.Windows.Forms.CheckBox();
|
||||
this.cbUniformScale = new System.Windows.Forms.CheckBox();
|
||||
this.cbRelativeScale = new System.Windows.Forms.CheckBox();
|
||||
this.bUpdateScaleY = new System.Windows.Forms.Button();
|
||||
this.maxScaleYLabel = new System.Windows.Forms.Label();
|
||||
this.maxScaleY = new System.Windows.Forms.NumericUpDown();
|
||||
this.minScaleYLabel = new System.Windows.Forms.Label();
|
||||
this.minScaleY = new System.Windows.Forms.NumericUpDown();
|
||||
this.bUpdateScaleX = new System.Windows.Forms.Button();
|
||||
this.bUpdateScale = new System.Windows.Forms.Button();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.maxScaleX = new System.Windows.Forms.NumericUpDown();
|
||||
this.maxScale = new System.Windows.Forms.NumericUpDown();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.minScaleX = new System.Windows.Forms.NumericUpDown();
|
||||
this.minScale = new System.Windows.Forms.NumericUpDown();
|
||||
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.groupBox2.SuspendLayout();
|
||||
this.scalegroup.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.maxScaleY)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.minScaleY)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.maxScaleX)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.minScaleX)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.maxScale)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.minScale)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// bApply
|
||||
//
|
||||
this.bApply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.bApply.Location = new System.Drawing.Point(115, 399);
|
||||
this.bApply.Location = new System.Drawing.Point(115, 346);
|
||||
this.bApply.Name = "bApply";
|
||||
this.bApply.Size = new System.Drawing.Size(95, 23);
|
||||
this.bApply.TabIndex = 0;
|
||||
|
@ -83,7 +73,7 @@
|
|||
// bCancel
|
||||
//
|
||||
this.bCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.bCancel.Location = new System.Drawing.Point(216, 399);
|
||||
this.bCancel.Location = new System.Drawing.Point(216, 346);
|
||||
this.bCancel.Name = "bCancel";
|
||||
this.bCancel.Size = new System.Drawing.Size(75, 23);
|
||||
this.bCancel.TabIndex = 1;
|
||||
|
@ -95,115 +85,115 @@
|
|||
//
|
||||
this.bUpdateTranslation.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.bUpdateTranslation.Image = global::CodeImp.DoomBuilder.BuilderEffects.Properties.Resources.Update;
|
||||
this.bUpdateTranslation.Location = new System.Drawing.Point(247, 18);
|
||||
this.bUpdateTranslation.Location = new System.Drawing.Point(246, 18);
|
||||
this.bUpdateTranslation.Name = "bUpdateTranslation";
|
||||
this.bUpdateTranslation.Size = new System.Drawing.Size(23, 23);
|
||||
this.bUpdateTranslation.TabIndex = 5;
|
||||
this.bUpdateTranslation.UseVisualStyleBackColor = true;
|
||||
this.bUpdateTranslation.Click += new System.EventHandler(this.bUpdateTranslation_Click);
|
||||
//
|
||||
// positionJitterAmmount
|
||||
// positionJitterAmount
|
||||
//
|
||||
this.positionJitterAmmount.AllowNegative = false;
|
||||
this.positionJitterAmmount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.positionJitterAmmount.ExtendedLimits = true;
|
||||
this.positionJitterAmmount.Label = "Position:";
|
||||
this.positionJitterAmmount.Location = new System.Drawing.Point(-25, 19);
|
||||
this.positionJitterAmmount.Maximum = 100;
|
||||
this.positionJitterAmmount.Minimum = 0;
|
||||
this.positionJitterAmmount.Name = "positionJitterAmmount";
|
||||
this.positionJitterAmmount.Size = new System.Drawing.Size(266, 22);
|
||||
this.positionJitterAmmount.TabIndex = 6;
|
||||
this.positionJitterAmmount.Value = 0;
|
||||
this.positionJitterAmmount.OnValueChanging += new System.EventHandler(this.positionJitterAmmount_OnValueChanged);
|
||||
this.positionJitterAmount.AllowNegative = false;
|
||||
this.positionJitterAmount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.positionJitterAmount.ExtendedLimits = true;
|
||||
this.positionJitterAmount.Label = "Position:";
|
||||
this.positionJitterAmount.Location = new System.Drawing.Point(-26, 19);
|
||||
this.positionJitterAmount.Maximum = 100;
|
||||
this.positionJitterAmount.Minimum = 0;
|
||||
this.positionJitterAmount.Name = "positionJitterAmount";
|
||||
this.positionJitterAmount.Size = new System.Drawing.Size(266, 22);
|
||||
this.positionJitterAmount.TabIndex = 6;
|
||||
this.positionJitterAmount.Value = 0;
|
||||
this.positionJitterAmount.OnValueChanging += new System.EventHandler(this.positionJitterAmount_OnValueChanged);
|
||||
//
|
||||
// bUpdateAngle
|
||||
//
|
||||
this.bUpdateAngle.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.bUpdateAngle.Image = global::CodeImp.DoomBuilder.BuilderEffects.Properties.Resources.Update;
|
||||
this.bUpdateAngle.Location = new System.Drawing.Point(247, 18);
|
||||
this.bUpdateAngle.Location = new System.Drawing.Point(246, 18);
|
||||
this.bUpdateAngle.Name = "bUpdateAngle";
|
||||
this.bUpdateAngle.Size = new System.Drawing.Size(23, 23);
|
||||
this.bUpdateAngle.TabIndex = 5;
|
||||
this.bUpdateAngle.UseVisualStyleBackColor = true;
|
||||
this.bUpdateAngle.Click += new System.EventHandler(this.bUpdateAngle_Click);
|
||||
//
|
||||
// rotationJitterAmmount
|
||||
// rotationJitterAmount
|
||||
//
|
||||
this.rotationJitterAmmount.AllowNegative = false;
|
||||
this.rotationJitterAmmount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.rotationJitterAmmount.ExtendedLimits = false;
|
||||
this.rotationJitterAmmount.Label = "Angle:";
|
||||
this.rotationJitterAmmount.Location = new System.Drawing.Point(-25, 19);
|
||||
this.rotationJitterAmmount.Maximum = 359;
|
||||
this.rotationJitterAmmount.Minimum = 0;
|
||||
this.rotationJitterAmmount.Name = "rotationJitterAmmount";
|
||||
this.rotationJitterAmmount.Size = new System.Drawing.Size(266, 22);
|
||||
this.rotationJitterAmmount.TabIndex = 8;
|
||||
this.rotationJitterAmmount.Value = 0;
|
||||
this.rotationJitterAmmount.OnValueChanging += new System.EventHandler(this.rotationJitterAmmount_OnValueChanged);
|
||||
this.rotationJitterAmount.AllowNegative = false;
|
||||
this.rotationJitterAmount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.rotationJitterAmount.ExtendedLimits = false;
|
||||
this.rotationJitterAmount.Label = "Angle:";
|
||||
this.rotationJitterAmount.Location = new System.Drawing.Point(-26, 19);
|
||||
this.rotationJitterAmount.Maximum = 359;
|
||||
this.rotationJitterAmount.Minimum = 0;
|
||||
this.rotationJitterAmount.Name = "rotationJitterAmount";
|
||||
this.rotationJitterAmount.Size = new System.Drawing.Size(266, 22);
|
||||
this.rotationJitterAmount.TabIndex = 8;
|
||||
this.rotationJitterAmount.Value = 0;
|
||||
this.rotationJitterAmount.OnValueChanging += new System.EventHandler(this.rotationJitterAmount_OnValueChanged);
|
||||
//
|
||||
// heightJitterAmmount
|
||||
// heightJitterAmount
|
||||
//
|
||||
this.heightJitterAmmount.AllowNegative = false;
|
||||
this.heightJitterAmmount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.heightJitterAmmount.ExtendedLimits = false;
|
||||
this.heightJitterAmmount.Label = "Height:";
|
||||
this.heightJitterAmmount.Location = new System.Drawing.Point(-25, 47);
|
||||
this.heightJitterAmmount.Maximum = 100;
|
||||
this.heightJitterAmmount.Minimum = 0;
|
||||
this.heightJitterAmmount.Name = "heightJitterAmmount";
|
||||
this.heightJitterAmmount.Size = new System.Drawing.Size(266, 22);
|
||||
this.heightJitterAmmount.TabIndex = 6;
|
||||
this.heightJitterAmmount.Value = 0;
|
||||
this.heightJitterAmmount.OnValueChanging += new System.EventHandler(this.heightJitterAmmount_OnValueChanging);
|
||||
this.heightJitterAmount.AllowNegative = false;
|
||||
this.heightJitterAmount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.heightJitterAmount.ExtendedLimits = false;
|
||||
this.heightJitterAmount.Label = "Height:";
|
||||
this.heightJitterAmount.Location = new System.Drawing.Point(-26, 47);
|
||||
this.heightJitterAmount.Maximum = 100;
|
||||
this.heightJitterAmount.Minimum = 0;
|
||||
this.heightJitterAmount.Name = "heightJitterAmount";
|
||||
this.heightJitterAmount.Size = new System.Drawing.Size(266, 22);
|
||||
this.heightJitterAmount.TabIndex = 6;
|
||||
this.heightJitterAmount.Value = 0;
|
||||
this.heightJitterAmount.OnValueChanging += new System.EventHandler(this.heightJitterAmount_OnValueChanging);
|
||||
//
|
||||
// bUpdateHeight
|
||||
//
|
||||
this.bUpdateHeight.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.bUpdateHeight.Image = global::CodeImp.DoomBuilder.BuilderEffects.Properties.Resources.Update;
|
||||
this.bUpdateHeight.Location = new System.Drawing.Point(247, 46);
|
||||
this.bUpdateHeight.Location = new System.Drawing.Point(246, 46);
|
||||
this.bUpdateHeight.Name = "bUpdateHeight";
|
||||
this.bUpdateHeight.Size = new System.Drawing.Size(23, 23);
|
||||
this.bUpdateHeight.TabIndex = 5;
|
||||
this.bUpdateHeight.UseVisualStyleBackColor = true;
|
||||
this.bUpdateHeight.Click += new System.EventHandler(this.bUpdateHeight_Click);
|
||||
//
|
||||
// pitchAmmount
|
||||
// pitchAmount
|
||||
//
|
||||
this.pitchAmmount.AllowNegative = false;
|
||||
this.pitchAmmount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.pitchAmmount.ExtendedLimits = false;
|
||||
this.pitchAmmount.Label = "Pitch:";
|
||||
this.pitchAmmount.Location = new System.Drawing.Point(-25, 47);
|
||||
this.pitchAmmount.Maximum = 359;
|
||||
this.pitchAmmount.Minimum = 0;
|
||||
this.pitchAmmount.Name = "pitchAmmount";
|
||||
this.pitchAmmount.Size = new System.Drawing.Size(266, 24);
|
||||
this.pitchAmmount.TabIndex = 13;
|
||||
this.pitchAmmount.Value = 0;
|
||||
this.pitchAmmount.OnValueChanging += new System.EventHandler(this.pitchAmmount_OnValueChanging);
|
||||
this.pitchAmount.AllowNegative = false;
|
||||
this.pitchAmount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.pitchAmount.ExtendedLimits = false;
|
||||
this.pitchAmount.Label = "Pitch:";
|
||||
this.pitchAmount.Location = new System.Drawing.Point(-26, 47);
|
||||
this.pitchAmount.Maximum = 359;
|
||||
this.pitchAmount.Minimum = 0;
|
||||
this.pitchAmount.Name = "pitchAmount";
|
||||
this.pitchAmount.Size = new System.Drawing.Size(266, 24);
|
||||
this.pitchAmount.TabIndex = 13;
|
||||
this.pitchAmount.Value = 0;
|
||||
this.pitchAmount.OnValueChanging += new System.EventHandler(this.pitchAmount_OnValueChanging);
|
||||
//
|
||||
// rollAmmount
|
||||
// rollAmount
|
||||
//
|
||||
this.rollAmmount.AllowNegative = false;
|
||||
this.rollAmmount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.rollAmmount.ExtendedLimits = false;
|
||||
this.rollAmmount.Label = "Roll:";
|
||||
this.rollAmmount.Location = new System.Drawing.Point(-25, 77);
|
||||
this.rollAmmount.Maximum = 359;
|
||||
this.rollAmmount.Minimum = 0;
|
||||
this.rollAmmount.Name = "rollAmmount";
|
||||
this.rollAmmount.Size = new System.Drawing.Size(266, 24);
|
||||
this.rollAmmount.TabIndex = 14;
|
||||
this.rollAmmount.Value = 0;
|
||||
this.rollAmmount.OnValueChanging += new System.EventHandler(this.rollAmmount_OnValueChanging);
|
||||
this.rollAmount.AllowNegative = false;
|
||||
this.rollAmount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.rollAmount.ExtendedLimits = false;
|
||||
this.rollAmount.Label = "Roll:";
|
||||
this.rollAmount.Location = new System.Drawing.Point(-26, 77);
|
||||
this.rollAmount.Maximum = 359;
|
||||
this.rollAmount.Minimum = 0;
|
||||
this.rollAmount.Name = "rollAmount";
|
||||
this.rollAmount.Size = new System.Drawing.Size(266, 24);
|
||||
this.rollAmount.TabIndex = 14;
|
||||
this.rollAmount.Value = 0;
|
||||
this.rollAmount.OnValueChanging += new System.EventHandler(this.rollAmount_OnValueChanging);
|
||||
//
|
||||
// bUpdatePitch
|
||||
//
|
||||
this.bUpdatePitch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.bUpdatePitch.Image = global::CodeImp.DoomBuilder.BuilderEffects.Properties.Resources.Update;
|
||||
this.bUpdatePitch.Location = new System.Drawing.Point(247, 47);
|
||||
this.bUpdatePitch.Location = new System.Drawing.Point(246, 47);
|
||||
this.bUpdatePitch.Name = "bUpdatePitch";
|
||||
this.bUpdatePitch.Size = new System.Drawing.Size(23, 23);
|
||||
this.bUpdatePitch.TabIndex = 15;
|
||||
|
@ -214,7 +204,7 @@
|
|||
//
|
||||
this.bUpdateRoll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.bUpdateRoll.Image = global::CodeImp.DoomBuilder.BuilderEffects.Properties.Resources.Update;
|
||||
this.bUpdateRoll.Location = new System.Drawing.Point(247, 76);
|
||||
this.bUpdateRoll.Location = new System.Drawing.Point(246, 76);
|
||||
this.bUpdateRoll.Name = "bUpdateRoll";
|
||||
this.bUpdateRoll.Size = new System.Drawing.Size(23, 23);
|
||||
this.bUpdateRoll.TabIndex = 16;
|
||||
|
@ -223,12 +213,12 @@
|
|||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.groupBox1.Controls.Add(this.positionJitterAmmount);
|
||||
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.groupBox1.Controls.Add(this.positionJitterAmount);
|
||||
this.groupBox1.Controls.Add(this.bUpdateTranslation);
|
||||
this.groupBox1.Controls.Add(this.bUpdateHeight);
|
||||
this.groupBox1.Controls.Add(this.heightJitterAmmount);
|
||||
this.groupBox1.Controls.Add(this.heightJitterAmount);
|
||||
this.groupBox1.Location = new System.Drawing.Point(12, 12);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(279, 82);
|
||||
|
@ -238,17 +228,17 @@
|
|||
//
|
||||
// groupBox2
|
||||
//
|
||||
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.groupBox2.Controls.Add(this.cbNegativeRoll);
|
||||
this.groupBox2.Controls.Add(this.cbNegativePitch);
|
||||
this.groupBox2.Controls.Add(this.cbRelativeRoll);
|
||||
this.groupBox2.Controls.Add(this.cbRelativePitch);
|
||||
this.groupBox2.Controls.Add(this.rotationJitterAmmount);
|
||||
this.groupBox2.Controls.Add(this.rotationJitterAmount);
|
||||
this.groupBox2.Controls.Add(this.bUpdateAngle);
|
||||
this.groupBox2.Controls.Add(this.bUpdateRoll);
|
||||
this.groupBox2.Controls.Add(this.pitchAmmount);
|
||||
this.groupBox2.Controls.Add(this.rollAmmount);
|
||||
this.groupBox2.Controls.Add(this.pitchAmount);
|
||||
this.groupBox2.Controls.Add(this.rollAmount);
|
||||
this.groupBox2.Controls.Add(this.bUpdatePitch);
|
||||
this.groupBox2.Location = new System.Drawing.Point(12, 100);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
|
@ -301,240 +291,117 @@
|
|||
//
|
||||
// scalegroup
|
||||
//
|
||||
this.scalegroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.scalegroup.Controls.Add(this.cbNegativeScaleY);
|
||||
this.scalegroup.Controls.Add(this.cbNegativeScaleX);
|
||||
this.scalegroup.Controls.Add(this.cbUniformScale);
|
||||
this.scalegroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.scalegroup.Controls.Add(this.cbRelativeScale);
|
||||
this.scalegroup.Controls.Add(this.bUpdateScaleY);
|
||||
this.scalegroup.Controls.Add(this.maxScaleYLabel);
|
||||
this.scalegroup.Controls.Add(this.maxScaleY);
|
||||
this.scalegroup.Controls.Add(this.minScaleYLabel);
|
||||
this.scalegroup.Controls.Add(this.minScaleY);
|
||||
this.scalegroup.Controls.Add(this.bUpdateScaleX);
|
||||
this.scalegroup.Controls.Add(this.bUpdateScale);
|
||||
this.scalegroup.Controls.Add(this.label3);
|
||||
this.scalegroup.Controls.Add(this.maxScaleX);
|
||||
this.scalegroup.Controls.Add(this.maxScale);
|
||||
this.scalegroup.Controls.Add(this.label2);
|
||||
this.scalegroup.Controls.Add(this.minScaleX);
|
||||
this.scalegroup.Controls.Add(this.minScale);
|
||||
this.scalegroup.Location = new System.Drawing.Point(12, 265);
|
||||
this.scalegroup.Name = "scalegroup";
|
||||
this.scalegroup.Size = new System.Drawing.Size(279, 127);
|
||||
this.scalegroup.Size = new System.Drawing.Size(279, 70);
|
||||
this.scalegroup.TabIndex = 19;
|
||||
this.scalegroup.TabStop = false;
|
||||
this.scalegroup.Text = " Scale: ";
|
||||
//
|
||||
// cbNegativeScaleY
|
||||
//
|
||||
this.cbNegativeScaleY.AutoSize = true;
|
||||
this.cbNegativeScaleY.Location = new System.Drawing.Point(150, 102);
|
||||
this.cbNegativeScaleY.Name = "cbNegativeScaleY";
|
||||
this.cbNegativeScaleY.Size = new System.Drawing.Size(121, 17);
|
||||
this.cbNegativeScaleY.TabIndex = 25;
|
||||
this.cbNegativeScaleY.Text = "Use negative height";
|
||||
this.toolTip.SetToolTip(this.cbNegativeScaleY, "When checked, height scale will be picked from\r\n[-max .. -min] - [min .. max] ran" +
|
||||
"ge");
|
||||
this.cbNegativeScaleY.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cbNegativeScaleX
|
||||
//
|
||||
this.cbNegativeScaleX.AutoSize = true;
|
||||
this.cbNegativeScaleX.Location = new System.Drawing.Point(150, 78);
|
||||
this.cbNegativeScaleX.Name = "cbNegativeScaleX";
|
||||
this.cbNegativeScaleX.Size = new System.Drawing.Size(117, 17);
|
||||
this.cbNegativeScaleX.TabIndex = 24;
|
||||
this.cbNegativeScaleX.Text = "Use negative width";
|
||||
this.toolTip.SetToolTip(this.cbNegativeScaleX, "When checked, width scale will be picked from\r\n[-max .. -min] - [min .. max] rang" +
|
||||
"e");
|
||||
this.cbNegativeScaleX.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cbUniformScale
|
||||
//
|
||||
this.cbUniformScale.AutoSize = true;
|
||||
this.cbUniformScale.Location = new System.Drawing.Point(9, 102);
|
||||
this.cbUniformScale.Name = "cbUniformScale";
|
||||
this.cbUniformScale.Size = new System.Drawing.Size(134, 17);
|
||||
this.cbUniformScale.TabIndex = 23;
|
||||
this.cbUniformScale.Text = "Same width and height";
|
||||
this.cbUniformScale.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cbRelativeScale
|
||||
//
|
||||
this.cbRelativeScale.AutoSize = true;
|
||||
this.cbRelativeScale.Location = new System.Drawing.Point(9, 78);
|
||||
this.cbRelativeScale.Location = new System.Drawing.Point(9, 48);
|
||||
this.cbRelativeScale.Name = "cbRelativeScale";
|
||||
this.cbRelativeScale.Size = new System.Drawing.Size(131, 17);
|
||||
this.cbRelativeScale.TabIndex = 13;
|
||||
this.cbRelativeScale.Text = "Relative to initial scale";
|
||||
this.cbRelativeScale.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// bUpdateScaleY
|
||||
// bUpdateScale
|
||||
//
|
||||
this.bUpdateScaleY.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.bUpdateScaleY.Image = global::CodeImp.DoomBuilder.BuilderEffects.Properties.Resources.Update;
|
||||
this.bUpdateScaleY.Location = new System.Drawing.Point(247, 45);
|
||||
this.bUpdateScaleY.Name = "bUpdateScaleY";
|
||||
this.bUpdateScaleY.Size = new System.Drawing.Size(23, 23);
|
||||
this.bUpdateScaleY.TabIndex = 22;
|
||||
this.bUpdateScaleY.UseVisualStyleBackColor = true;
|
||||
this.bUpdateScaleY.Click += new System.EventHandler(this.bUpdateScaleY_Click);
|
||||
//
|
||||
// maxScaleYLabel
|
||||
//
|
||||
this.maxScaleYLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.maxScaleYLabel.AutoSize = true;
|
||||
this.maxScaleYLabel.Location = new System.Drawing.Point(147, 51);
|
||||
this.maxScaleYLabel.Name = "maxScaleYLabel";
|
||||
this.maxScaleYLabel.Size = new System.Drawing.Size(32, 13);
|
||||
this.maxScaleYLabel.TabIndex = 21;
|
||||
this.maxScaleYLabel.Text = "max.:";
|
||||
//
|
||||
// maxScaleY
|
||||
//
|
||||
this.maxScaleY.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.maxScaleY.DecimalPlaces = 2;
|
||||
this.maxScaleY.Increment = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
65536});
|
||||
this.maxScaleY.Location = new System.Drawing.Point(186, 48);
|
||||
this.maxScaleY.Minimum = new decimal(new int[] {
|
||||
100,
|
||||
0,
|
||||
0,
|
||||
-2147483648});
|
||||
this.maxScaleY.Name = "maxScaleY";
|
||||
this.maxScaleY.Size = new System.Drawing.Size(55, 20);
|
||||
this.maxScaleY.TabIndex = 20;
|
||||
this.maxScaleY.Value = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.maxScaleY.ValueChanged += new System.EventHandler(this.minScaleY_ValueChanged);
|
||||
//
|
||||
// minScaleYLabel
|
||||
//
|
||||
this.minScaleYLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.minScaleYLabel.AutoSize = true;
|
||||
this.minScaleYLabel.Location = new System.Drawing.Point(16, 51);
|
||||
this.minScaleYLabel.Name = "minScaleYLabel";
|
||||
this.minScaleYLabel.Size = new System.Drawing.Size(63, 13);
|
||||
this.minScaleYLabel.TabIndex = 19;
|
||||
this.minScaleYLabel.Text = "Height min.:";
|
||||
//
|
||||
// minScaleY
|
||||
//
|
||||
this.minScaleY.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.minScaleY.DecimalPlaces = 2;
|
||||
this.minScaleY.Increment = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
65536});
|
||||
this.minScaleY.Location = new System.Drawing.Point(84, 48);
|
||||
this.minScaleY.Minimum = new decimal(new int[] {
|
||||
100,
|
||||
0,
|
||||
0,
|
||||
-2147483648});
|
||||
this.minScaleY.Name = "minScaleY";
|
||||
this.minScaleY.Size = new System.Drawing.Size(55, 20);
|
||||
this.minScaleY.TabIndex = 18;
|
||||
this.minScaleY.Value = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.minScaleY.ValueChanged += new System.EventHandler(this.minScaleY_ValueChanged);
|
||||
//
|
||||
// bUpdateScaleX
|
||||
//
|
||||
this.bUpdateScaleX.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.bUpdateScaleX.Image = global::CodeImp.DoomBuilder.BuilderEffects.Properties.Resources.Update;
|
||||
this.bUpdateScaleX.Location = new System.Drawing.Point(247, 19);
|
||||
this.bUpdateScaleX.Name = "bUpdateScaleX";
|
||||
this.bUpdateScaleX.Size = new System.Drawing.Size(23, 23);
|
||||
this.bUpdateScaleX.TabIndex = 17;
|
||||
this.bUpdateScaleX.UseVisualStyleBackColor = true;
|
||||
this.bUpdateScaleX.Click += new System.EventHandler(this.bUpdateScaleX_Click);
|
||||
this.bUpdateScale.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.bUpdateScale.Image = global::CodeImp.DoomBuilder.BuilderEffects.Properties.Resources.Update;
|
||||
this.bUpdateScale.Location = new System.Drawing.Point(246, 19);
|
||||
this.bUpdateScale.Name = "bUpdateScale";
|
||||
this.bUpdateScale.Size = new System.Drawing.Size(23, 23);
|
||||
this.bUpdateScale.TabIndex = 17;
|
||||
this.bUpdateScale.UseVisualStyleBackColor = true;
|
||||
this.bUpdateScale.Click += new System.EventHandler(this.bUpdateScale_Click);
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(147, 25);
|
||||
this.label3.Location = new System.Drawing.Point(146, 25);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(32, 13);
|
||||
this.label3.TabIndex = 4;
|
||||
this.label3.Text = "max.:";
|
||||
//
|
||||
// maxScaleX
|
||||
// maxScale
|
||||
//
|
||||
this.maxScaleX.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.maxScaleX.DecimalPlaces = 2;
|
||||
this.maxScaleX.Increment = new decimal(new int[] {
|
||||
this.maxScale.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.maxScale.DecimalPlaces = 2;
|
||||
this.maxScale.Increment = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
65536});
|
||||
this.maxScaleX.Location = new System.Drawing.Point(186, 22);
|
||||
this.maxScaleX.Minimum = new decimal(new int[] {
|
||||
this.maxScale.Location = new System.Drawing.Point(185, 22);
|
||||
this.maxScale.Minimum = new decimal(new int[] {
|
||||
100,
|
||||
0,
|
||||
0,
|
||||
-2147483648});
|
||||
this.maxScaleX.Name = "maxScaleX";
|
||||
this.maxScaleX.Size = new System.Drawing.Size(55, 20);
|
||||
this.maxScaleX.TabIndex = 3;
|
||||
this.maxScaleX.Value = new decimal(new int[] {
|
||||
this.maxScale.Name = "maxScale";
|
||||
this.maxScale.Size = new System.Drawing.Size(55, 20);
|
||||
this.maxScale.TabIndex = 3;
|
||||
this.maxScale.Value = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.maxScaleX.ValueChanged += new System.EventHandler(this.minScaleX_ValueChanged);
|
||||
this.maxScale.ValueChanged += new System.EventHandler(this.minScale_ValueChanged);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(19, 25);
|
||||
this.label2.Location = new System.Drawing.Point(18, 25);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(60, 13);
|
||||
this.label2.TabIndex = 2;
|
||||
this.label2.Text = "Width min.:";
|
||||
//
|
||||
// minScaleX
|
||||
// minScale
|
||||
//
|
||||
this.minScaleX.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.minScaleX.DecimalPlaces = 2;
|
||||
this.minScaleX.Increment = new decimal(new int[] {
|
||||
this.minScale.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.minScale.DecimalPlaces = 2;
|
||||
this.minScale.Increment = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
65536});
|
||||
this.minScaleX.Location = new System.Drawing.Point(84, 22);
|
||||
this.minScaleX.Minimum = new decimal(new int[] {
|
||||
this.minScale.Location = new System.Drawing.Point(83, 22);
|
||||
this.minScale.Minimum = new decimal(new int[] {
|
||||
100,
|
||||
0,
|
||||
0,
|
||||
-2147483648});
|
||||
this.minScaleX.Name = "minScaleX";
|
||||
this.minScaleX.Size = new System.Drawing.Size(55, 20);
|
||||
this.minScaleX.TabIndex = 1;
|
||||
this.minScaleX.Value = new decimal(new int[] {
|
||||
this.minScale.Name = "minScale";
|
||||
this.minScale.Size = new System.Drawing.Size(55, 20);
|
||||
this.minScale.TabIndex = 1;
|
||||
this.minScale.Value = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.minScaleX.ValueChanged += new System.EventHandler(this.minScaleX_ValueChanged);
|
||||
this.minScale.ValueChanged += new System.EventHandler(this.minScale_ValueChanged);
|
||||
//
|
||||
// JitterThingsForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||
this.ClientSize = new System.Drawing.Size(303, 428);
|
||||
this.ClientSize = new System.Drawing.Size(303, 378);
|
||||
this.Controls.Add(this.scalegroup);
|
||||
this.Controls.Add(this.groupBox2);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
|
@ -544,7 +411,7 @@
|
|||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "JitterThingsForm";
|
||||
this.Opacity = 0;
|
||||
this.Opacity = 0D;
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
|
||||
|
@ -555,10 +422,8 @@
|
|||
this.groupBox2.PerformLayout();
|
||||
this.scalegroup.ResumeLayout(false);
|
||||
this.scalegroup.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.maxScaleY)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.minScaleY)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.maxScaleX)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.minScaleX)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.maxScale)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.minScale)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
@ -568,34 +433,26 @@
|
|||
private System.Windows.Forms.Button bApply;
|
||||
private System.Windows.Forms.Button bCancel;
|
||||
private System.Windows.Forms.Button bUpdateTranslation;
|
||||
private CodeImp.DoomBuilder.BuilderEffects.IntControl positionJitterAmmount;
|
||||
private System.Windows.Forms.Button bUpdateAngle;
|
||||
private CodeImp.DoomBuilder.BuilderEffects.IntControl rotationJitterAmmount;
|
||||
private CodeImp.DoomBuilder.BuilderEffects.IntControl heightJitterAmmount;
|
||||
private System.Windows.Forms.Button bUpdateHeight;
|
||||
private CodeImp.DoomBuilder.BuilderEffects.IntControl pitchAmmount;
|
||||
private CodeImp.DoomBuilder.BuilderEffects.IntControl rollAmmount;
|
||||
private CodeImp.DoomBuilder.BuilderEffects.IntControl positionJitterAmount;
|
||||
private CodeImp.DoomBuilder.BuilderEffects.IntControl rotationJitterAmount;
|
||||
private CodeImp.DoomBuilder.BuilderEffects.IntControl heightJitterAmount;
|
||||
private CodeImp.DoomBuilder.BuilderEffects.IntControl pitchAmount;
|
||||
private CodeImp.DoomBuilder.BuilderEffects.IntControl rollAmount;
|
||||
private System.Windows.Forms.Button bUpdatePitch;
|
||||
private System.Windows.Forms.Button bUpdateRoll;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.GroupBox groupBox2;
|
||||
private System.Windows.Forms.GroupBox scalegroup;
|
||||
private System.Windows.Forms.NumericUpDown minScaleX;
|
||||
private System.Windows.Forms.CheckBox cbUniformScale;
|
||||
private System.Windows.Forms.NumericUpDown minScale;
|
||||
private System.Windows.Forms.CheckBox cbRelativeScale;
|
||||
private System.Windows.Forms.Button bUpdateScaleY;
|
||||
private System.Windows.Forms.Label maxScaleYLabel;
|
||||
private System.Windows.Forms.NumericUpDown maxScaleY;
|
||||
private System.Windows.Forms.Label minScaleYLabel;
|
||||
private System.Windows.Forms.NumericUpDown minScaleY;
|
||||
private System.Windows.Forms.Button bUpdateScaleX;
|
||||
private System.Windows.Forms.Button bUpdateScale;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.NumericUpDown maxScaleX;
|
||||
private System.Windows.Forms.NumericUpDown maxScale;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.CheckBox cbNegativeScaleX;
|
||||
private System.Windows.Forms.CheckBox cbRelativeRoll;
|
||||
private System.Windows.Forms.CheckBox cbRelativePitch;
|
||||
private System.Windows.Forms.CheckBox cbNegativeScaleY;
|
||||
private System.Windows.Forms.ToolTip toolTip;
|
||||
private System.Windows.Forms.CheckBox cbNegativeRoll;
|
||||
private System.Windows.Forms.CheckBox cbNegativePitch;
|
||||
|
|
|
@ -28,9 +28,6 @@ namespace CodeImp.DoomBuilder.BuilderEffects
|
|||
private static bool allowNegativePitch;
|
||||
private static bool allowNegativeRoll;
|
||||
private static bool relativeScale;
|
||||
private static bool allowNegativeScaleX;
|
||||
private static bool allowNegativeScaleY;
|
||||
private static bool uniformScale;
|
||||
|
||||
private struct ThingData
|
||||
{
|
||||
|
@ -38,8 +35,7 @@ namespace CodeImp.DoomBuilder.BuilderEffects
|
|||
public int Angle;
|
||||
public int Pitch;
|
||||
public int Roll;
|
||||
public double ScaleX;
|
||||
public double ScaleY;
|
||||
public double Scale;
|
||||
public int SectorHeight;
|
||||
public int ZOffset;
|
||||
public int SafeDistance;
|
||||
|
@ -47,8 +43,7 @@ namespace CodeImp.DoomBuilder.BuilderEffects
|
|||
public float JitterRotation;
|
||||
public float JitterPitch;
|
||||
public float JitterRoll;
|
||||
public float JitterScaleX;
|
||||
public float JitterScaleY;
|
||||
public double JitterScale;
|
||||
public float JitterHeight;
|
||||
}
|
||||
|
||||
|
@ -64,14 +59,14 @@ namespace CodeImp.DoomBuilder.BuilderEffects
|
|||
InitializeComponent();
|
||||
|
||||
//have thing height?
|
||||
heightJitterAmmount.Enabled = General.Map.FormatInterface.HasThingHeight;
|
||||
heightJitterAmount.Enabled = General.Map.FormatInterface.HasThingHeight;
|
||||
bUpdateHeight.Enabled = General.Map.FormatInterface.HasThingHeight;
|
||||
|
||||
//disable pitch/roll/scale?
|
||||
if(!General.Map.UDMF)
|
||||
{
|
||||
pitchAmmount.Enabled = false;
|
||||
rollAmmount.Enabled = false;
|
||||
pitchAmount.Enabled = false;
|
||||
rollAmount.Enabled = false;
|
||||
bUpdatePitch.Enabled = false;
|
||||
bUpdateRoll.Enabled = false;
|
||||
scalegroup.Enabled = false;
|
||||
|
@ -122,8 +117,7 @@ namespace CodeImp.DoomBuilder.BuilderEffects
|
|||
d.Angle = t.AngleDoom;
|
||||
d.Pitch = t.Pitch;
|
||||
d.Roll = t.Roll;
|
||||
d.ScaleX = t.ScaleX;
|
||||
d.ScaleY = t.ScaleY;
|
||||
d.Scale = UniFields.GetFloat(t.Fields, "mobjscale", 1.0);
|
||||
|
||||
if(General.Map.FormatInterface.HasThingHeight)
|
||||
{
|
||||
|
@ -139,8 +133,8 @@ namespace CodeImp.DoomBuilder.BuilderEffects
|
|||
thingData.Add(d);
|
||||
}
|
||||
|
||||
positionJitterAmmount.Maximum = MaxSafeDistance;
|
||||
heightJitterAmmount.Maximum = MaxSafeHeightDistance;
|
||||
positionJitterAmount.Maximum = MaxSafeDistance;
|
||||
heightJitterAmount.Maximum = MaxSafeHeightDistance;
|
||||
|
||||
//create undo
|
||||
General.Map.UndoRedo.ClearAllRedos();
|
||||
|
@ -152,14 +146,10 @@ namespace CodeImp.DoomBuilder.BuilderEffects
|
|||
UpdateRotationAngles();
|
||||
UpdatePitchAngles();
|
||||
UpdateRollAngles();
|
||||
UpdateScaleX();
|
||||
UpdateScaleY();
|
||||
UpdateScale();
|
||||
|
||||
//apply settings
|
||||
cbRelativeScale.Checked = relativeScale;
|
||||
cbUniformScale.Checked = uniformScale;
|
||||
cbNegativeScaleX.Checked = allowNegativeScaleX;
|
||||
cbNegativeScaleY.Checked = allowNegativeScaleY;
|
||||
cbRelativePitch.Checked = relativePitch;
|
||||
cbRelativeRoll.Checked = relativeRoll;
|
||||
cbNegativePitch.Checked = allowNegativePitch;
|
||||
|
@ -168,17 +158,11 @@ namespace CodeImp.DoomBuilder.BuilderEffects
|
|||
|
||||
//add event listeners
|
||||
cbRelativeScale.CheckedChanged += cbRelativeScale_CheckedChanged;
|
||||
cbUniformScale.CheckedChanged += cbUniformScale_CheckedChanged;
|
||||
cbNegativeScaleX.CheckedChanged += cbNegativeScaleX_CheckedChanged;
|
||||
cbNegativeScaleY.CheckedChanged += cbNegativeScaleY_CheckedChanged;
|
||||
cbRelativePitch.CheckedChanged += cbRelativePitch_CheckedChanged;
|
||||
cbRelativeRoll.CheckedChanged += cbRelativeRoll_CheckedChanged;
|
||||
cbNegativePitch.CheckedChanged += cbNegativePitch_CheckedChanged;
|
||||
cbNegativeRoll.CheckedChanged += cbNegativeRoll_CheckedChanged;
|
||||
|
||||
//disable controls if necessary
|
||||
if(uniformScale) cbUniformScale_CheckedChanged(cbUniformScale, EventArgs.Empty);
|
||||
|
||||
//tricky way to actually store undo information...
|
||||
foreach(Thing t in selection) t.Move(t.Position);
|
||||
}
|
||||
|
@ -187,23 +171,23 @@ namespace CodeImp.DoomBuilder.BuilderEffects
|
|||
|
||||
#region Apply logic
|
||||
|
||||
private void ApplyTranslation(int ammount)
|
||||
private void ApplyTranslation(int Amount)
|
||||
{
|
||||
for(int i = 0; i < selection.Count; i++)
|
||||
{
|
||||
int curAmmount = ammount > thingData[i].SafeDistance ? thingData[i].SafeDistance : ammount;
|
||||
selection[i].Move(new Vector2D(thingData[i].Position.x + (int)(Math.Sin(thingData[i].OffsetAngle) * curAmmount), thingData[i].Position.y + (int)(Math.Cos(thingData[i].OffsetAngle) * curAmmount)));
|
||||
int curAmount = Amount > thingData[i].SafeDistance ? thingData[i].SafeDistance : Amount;
|
||||
selection[i].Move(new Vector2D(thingData[i].Position.x + (int)(Math.Sin(thingData[i].OffsetAngle) * curAmount), thingData[i].Position.y + (int)(Math.Cos(thingData[i].OffsetAngle) * curAmount)));
|
||||
selection[i].DetermineSector();
|
||||
}
|
||||
|
||||
UpdateGeometry();
|
||||
}
|
||||
|
||||
private void ApplyRotation(int ammount)
|
||||
private void ApplyRotation(int Amount)
|
||||
{
|
||||
for(int i = 0; i < selection.Count; i++)
|
||||
{
|
||||
int newangle = (int)Math.Round(thingData[i].Angle + ammount * thingData[i].JitterRotation);
|
||||
int newangle = (int)Math.Round(thingData[i].Angle + Amount * thingData[i].JitterRotation);
|
||||
if(General.Map.Config.DoomThingRotationAngles) newangle = newangle / 45 * 45;
|
||||
selection[i].Rotate(newangle % 360);
|
||||
}
|
||||
|
@ -212,18 +196,18 @@ namespace CodeImp.DoomBuilder.BuilderEffects
|
|||
if(editingModeName == "ThingsMode") General.Interface.RedrawDisplay();
|
||||
}
|
||||
|
||||
private void ApplyPitch(int ammount)
|
||||
private void ApplyPitch(int Amount)
|
||||
{
|
||||
for(int i = 0; i < selection.Count; i++)
|
||||
{
|
||||
int p;
|
||||
if(cbRelativePitch.Checked)
|
||||
{
|
||||
p = (int)((thingData[i].Pitch + ammount * thingData[i].JitterPitch) % 360);
|
||||
p = (int)((thingData[i].Pitch + Amount * thingData[i].JitterPitch) % 360);
|
||||
}
|
||||
else
|
||||
{
|
||||
p = (int)((ammount * thingData[i].JitterPitch) % 360);
|
||||
p = (int)((Amount * thingData[i].JitterPitch) % 360);
|
||||
}
|
||||
|
||||
selection[i].SetPitch(p);
|
||||
|
@ -233,18 +217,18 @@ namespace CodeImp.DoomBuilder.BuilderEffects
|
|||
if(editingModeName == "ThingsMode") General.Interface.RedrawDisplay();
|
||||
}
|
||||
|
||||
private void ApplyRoll(int ammount)
|
||||
private void ApplyRoll(int Amount)
|
||||
{
|
||||
for(int i = 0; i < selection.Count; i++)
|
||||
{
|
||||
int r;
|
||||
if(cbRelativeRoll.Checked)
|
||||
{
|
||||
r = (int)((thingData[i].Roll + ammount * thingData[i].JitterRoll) % 360);
|
||||
r = (int)((thingData[i].Roll + Amount * thingData[i].JitterRoll) % 360);
|
||||
}
|
||||
else
|
||||
{
|
||||
r = (int)((ammount * thingData[i].JitterRoll) % 360);
|
||||
r = (int)((Amount * thingData[i].JitterRoll) % 360);
|
||||
}
|
||||
|
||||
selection[i].SetRoll(r);
|
||||
|
@ -254,13 +238,13 @@ namespace CodeImp.DoomBuilder.BuilderEffects
|
|||
if(editingModeName == "ThingsMode") General.Interface.RedrawDisplay();
|
||||
}
|
||||
|
||||
private void ApplyHeight(int ammount)
|
||||
private void ApplyHeight(int Amount)
|
||||
{
|
||||
for(int i = 0; i < selection.Count; i++)
|
||||
{
|
||||
if(thingData[i].SectorHeight == 0) continue;
|
||||
int curAmmount = Math.Min(thingData[i].SectorHeight, Math.Max(0, thingData[i].ZOffset + ammount));
|
||||
selection[i].Move(selection[i].Position.x, selection[i].Position.y, curAmmount * thingData[i].JitterHeight);
|
||||
int curAmount = Math.Min(thingData[i].SectorHeight, Math.Max(0, thingData[i].ZOffset + Amount));
|
||||
selection[i].Move(selection[i].Position.x, selection[i].Position.y, curAmount * thingData[i].JitterHeight);
|
||||
}
|
||||
|
||||
UpdateGeometry();
|
||||
|
@ -268,44 +252,29 @@ namespace CodeImp.DoomBuilder.BuilderEffects
|
|||
|
||||
private void ApplyScale()
|
||||
{
|
||||
ApplyScale((float)minScaleX.Value, (float)maxScaleX.Value, (float)minScaleY.Value, (float)maxScaleY.Value);
|
||||
ApplyScale((float)minScale.Value, (float)maxScale.Value);
|
||||
|
||||
//update view
|
||||
if(editingModeName == "ThingsMode") General.Interface.RedrawDisplay();
|
||||
}
|
||||
|
||||
private void ApplyScale(float minX, float maxX, float minY, float maxY)
|
||||
private void ApplyScale(double min, double max)
|
||||
{
|
||||
if(cbUniformScale.Checked)
|
||||
if (min > max) General.Swap(ref min, ref max);
|
||||
|
||||
double diff = max - min;
|
||||
|
||||
for (int i = 0; i < selection.Count; i++)
|
||||
{
|
||||
minY = minX;
|
||||
maxY = maxX;
|
||||
}
|
||||
|
||||
if(minX > maxX) General.Swap(ref minX, ref maxX);
|
||||
if(minY > maxY) General.Swap(ref minY, ref maxY);
|
||||
double jitter = thingData[i].JitterScale;
|
||||
double result;
|
||||
|
||||
float diffX = maxX - minX;
|
||||
float diffY = maxY - minY;
|
||||
if (cbRelativeScale.Checked)
|
||||
result = thingData[i].Scale + min + diff * jitter;
|
||||
else
|
||||
result = min + diff * jitter;
|
||||
|
||||
for(int i = 0; i < selection.Count; i++)
|
||||
{
|
||||
double jitterX = thingData[i].JitterScaleX;
|
||||
double jitterY = (cbUniformScale.Checked ? jitterX : thingData[i].JitterScaleY);
|
||||
double sx, sy;
|
||||
|
||||
if(cbRelativeScale.Checked)
|
||||
{
|
||||
sx = thingData[i].ScaleX + minX + diffX * jitterX;
|
||||
sy = thingData[i].ScaleY + minY + diffY * jitterY;
|
||||
}
|
||||
else
|
||||
{
|
||||
sx = minX + diffX * jitterX;
|
||||
sy = minY + diffY * jitterY;
|
||||
}
|
||||
|
||||
selection[i].SetScale(sx, sy);
|
||||
UniFields.SetFloat(selection[i].Fields, "mobjscale", Math.Round(result, 2));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -388,24 +357,12 @@ namespace CodeImp.DoomBuilder.BuilderEffects
|
|||
}
|
||||
}
|
||||
|
||||
private void UpdateScaleX()
|
||||
private void UpdateScale()
|
||||
{
|
||||
int min = (cbNegativeScaleX.Checked ? -100 : 0);
|
||||
for(int i = 0; i < thingData.Count; i++)
|
||||
for (int i = 0; i < thingData.Count; i++)
|
||||
{
|
||||
ThingData td = thingData[i];
|
||||
td.JitterScaleX = (General.Random(min, 100) / 100f);
|
||||
thingData[i] = td;
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateScaleY()
|
||||
{
|
||||
int min = (cbNegativeScaleY.Checked ? -100 : 0);
|
||||
for(int i = 0; i < thingData.Count; i++)
|
||||
{
|
||||
ThingData td = thingData[i];
|
||||
td.JitterScaleY = (General.Random(min, 100) / 100f);
|
||||
td.JitterScale = (General.Random(0, 100) / 100f);
|
||||
thingData[i] = td;
|
||||
}
|
||||
}
|
||||
|
@ -420,9 +377,6 @@ namespace CodeImp.DoomBuilder.BuilderEffects
|
|||
relativePitch = cbRelativePitch.Checked;
|
||||
relativeRoll = cbRelativeRoll.Checked;
|
||||
relativeScale = cbRelativeScale.Checked;
|
||||
allowNegativeScaleX = cbNegativeScaleX.Checked;
|
||||
allowNegativeScaleY = cbNegativeScaleY.Checked;
|
||||
uniformScale = cbUniformScale.Checked;
|
||||
allowNegativePitch = cbNegativePitch.Checked;
|
||||
allowNegativeRoll = cbNegativeRoll.Checked;
|
||||
|
||||
|
@ -448,37 +402,32 @@ namespace CodeImp.DoomBuilder.BuilderEffects
|
|||
General.Map.UndoRedo.WithdrawUndo(); //undo changes
|
||||
}
|
||||
|
||||
private void positionJitterAmmount_OnValueChanged(object sender, EventArgs e)
|
||||
private void positionJitterAmount_OnValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
ApplyTranslation(positionJitterAmmount.Value);
|
||||
ApplyTranslation(positionJitterAmount.Value);
|
||||
}
|
||||
|
||||
private void rotationJitterAmmount_OnValueChanged(object sender, EventArgs e)
|
||||
private void rotationJitterAmount_OnValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
ApplyRotation(rotationJitterAmmount.Value);
|
||||
ApplyRotation(rotationJitterAmount.Value);
|
||||
}
|
||||
|
||||
private void heightJitterAmmount_OnValueChanging(object sender, EventArgs e)
|
||||
private void heightJitterAmount_OnValueChanging(object sender, EventArgs e)
|
||||
{
|
||||
ApplyHeight(heightJitterAmmount.Value);
|
||||
ApplyHeight(heightJitterAmount.Value);
|
||||
}
|
||||
|
||||
private void pitchAmmount_OnValueChanging(object sender, EventArgs e)
|
||||
private void pitchAmount_OnValueChanging(object sender, EventArgs e)
|
||||
{
|
||||
ApplyPitch(pitchAmmount.Value);
|
||||
ApplyPitch(pitchAmount.Value);
|
||||
}
|
||||
|
||||
private void rollAmmount_OnValueChanging(object sender, EventArgs e)
|
||||
private void rollAmount_OnValueChanging(object sender, EventArgs e)
|
||||
{
|
||||
ApplyRoll(rollAmmount.Value);
|
||||
ApplyRoll(rollAmount.Value);
|
||||
}
|
||||
|
||||
private void minScaleX_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
ApplyScale();
|
||||
}
|
||||
|
||||
private void minScaleY_ValueChanged(object sender, EventArgs e)
|
||||
private void minScale_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
ApplyScale();
|
||||
}
|
||||
|
@ -490,67 +439,60 @@ namespace CodeImp.DoomBuilder.BuilderEffects
|
|||
private void bUpdateTranslation_Click(object sender, EventArgs e)
|
||||
{
|
||||
UpdateOffsetAngles();
|
||||
ApplyTranslation(positionJitterAmmount.Value);
|
||||
ApplyTranslation(positionJitterAmount.Value);
|
||||
}
|
||||
|
||||
private void bUpdateHeight_Click(object sender, EventArgs e)
|
||||
{
|
||||
UpdateHeights();
|
||||
ApplyHeight(heightJitterAmmount.Value);
|
||||
ApplyHeight(heightJitterAmount.Value);
|
||||
}
|
||||
|
||||
private void bUpdateAngle_Click(object sender, EventArgs e)
|
||||
{
|
||||
UpdateRotationAngles();
|
||||
ApplyRotation(rotationJitterAmmount.Value);
|
||||
ApplyRotation(rotationJitterAmount.Value);
|
||||
}
|
||||
|
||||
private void bUpdatePitch_Click(object sender, EventArgs e)
|
||||
{
|
||||
UpdatePitchAngles();
|
||||
ApplyPitch(pitchAmmount.Value);
|
||||
ApplyPitch(pitchAmount.Value);
|
||||
}
|
||||
|
||||
private void bUpdateRoll_Click(object sender, EventArgs e)
|
||||
{
|
||||
UpdateRollAngles();
|
||||
ApplyRoll(rollAmmount.Value);
|
||||
ApplyRoll(rollAmount.Value);
|
||||
}
|
||||
|
||||
private void bUpdateScaleX_Click(object sender, EventArgs e)
|
||||
private void bUpdateScale_Click(object sender, EventArgs e)
|
||||
{
|
||||
UpdateScaleX();
|
||||
ApplyScale();
|
||||
}
|
||||
|
||||
private void bUpdateScaleY_Click(object sender, EventArgs e)
|
||||
{
|
||||
UpdateScaleY();
|
||||
ApplyScale();
|
||||
}
|
||||
|
||||
private void cbRelativePitch_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
UpdatePitchAngles();
|
||||
ApplyPitch(pitchAmmount.Value);
|
||||
ApplyPitch(pitchAmount.Value);
|
||||
}
|
||||
|
||||
private void cbRelativeRoll_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
UpdateRollAngles();
|
||||
ApplyRoll(rollAmmount.Value);
|
||||
ApplyRoll(rollAmount.Value);
|
||||
}
|
||||
|
||||
private void cbNegativePitch_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
UpdatePitchAngles();
|
||||
ApplyPitch(pitchAmmount.Value);
|
||||
ApplyPitch(pitchAmount.Value);
|
||||
}
|
||||
|
||||
private void cbNegativeRoll_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
UpdateRollAngles();
|
||||
ApplyRoll(rollAmmount.Value);
|
||||
ApplyRoll(rollAmount.Value);
|
||||
}
|
||||
|
||||
private void cbRelativeScale_CheckedChanged(object sender, EventArgs e)
|
||||
|
@ -558,28 +500,6 @@ namespace CodeImp.DoomBuilder.BuilderEffects
|
|||
ApplyScale();
|
||||
}
|
||||
|
||||
private void cbUniformScale_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
bUpdateScaleY.Enabled = !cbUniformScale.Checked;
|
||||
minScaleY.Enabled = !cbUniformScale.Checked;
|
||||
maxScaleY.Enabled = !cbUniformScale.Checked;
|
||||
minScaleYLabel.Enabled = !cbUniformScale.Checked;
|
||||
maxScaleYLabel.Enabled = !cbUniformScale.Checked;
|
||||
ApplyScale();
|
||||
}
|
||||
|
||||
private void cbNegativeScaleX_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
UpdateScaleX();
|
||||
ApplyScale();
|
||||
}
|
||||
|
||||
private void cbNegativeScaleY_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
UpdateScaleY();
|
||||
ApplyScale();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
//HALP!
|
||||
|
|
|
@ -112,12 +112,15 @@
|
|||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
Loading…
Reference in a new issue