mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-31 12:50:52 +00:00
UDMF Controls plugin:
Relative mode is set to false by default. Limits of Brightness slider were set after setting it's value, so values greater than 100 were set to 100. Fixed a bug when a plugin tried to access 3d-floor-specific stuff of walls, which weren't part of 3d-floor. Color Picker plugin: added float representation of current color (like 1.0 0.54 0.29). Should make editing of GLDEFS light definitions easier.
This commit is contained in:
parent
e308d2ff15
commit
b477309168
4 changed files with 211 additions and 167 deletions
|
@ -7,6 +7,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BuilderModes", "..\Plugins\
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GZDoomEditing", "..\Plugins\GZDoomEditing\GZDoomEditing.csproj", "{760A9BC7-CB73-4C36-858B-994C14996FCD}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GZDoomEditing", "..\Plugins\GZDoomEditing\GZDoomEditing.csproj", "{760A9BC7-CB73-4C36-858B-994C14996FCD}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UDMFControls", "..\Plugins\UMDFControls\UDMFControls.csproj", "{2D11C828-295C-463A-8545-CA1AD6D51518}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ColorPicker", "..\Plugins\ColorPicker\ColorPicker.csproj", "{A4761900-0EA3-4FE4-A919-847FD5080EFC}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
@ -47,6 +51,26 @@ Global
|
||||||
{760A9BC7-CB73-4C36-858B-994C14996FCD}.Release|Mixed Platforms.Build.0 = Release|x86
|
{760A9BC7-CB73-4C36-858B-994C14996FCD}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||||
{760A9BC7-CB73-4C36-858B-994C14996FCD}.Release|x86.ActiveCfg = Release|x86
|
{760A9BC7-CB73-4C36-858B-994C14996FCD}.Release|x86.ActiveCfg = Release|x86
|
||||||
{760A9BC7-CB73-4C36-858B-994C14996FCD}.Release|x86.Build.0 = Release|x86
|
{760A9BC7-CB73-4C36-858B-994C14996FCD}.Release|x86.Build.0 = Release|x86
|
||||||
|
{2D11C828-295C-463A-8545-CA1AD6D51518}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||||
|
{2D11C828-295C-463A-8545-CA1AD6D51518}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||||
|
{2D11C828-295C-463A-8545-CA1AD6D51518}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||||
|
{2D11C828-295C-463A-8545-CA1AD6D51518}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
|
{2D11C828-295C-463A-8545-CA1AD6D51518}.Debug|x86.Build.0 = Debug|x86
|
||||||
|
{2D11C828-295C-463A-8545-CA1AD6D51518}.Release|Any CPU.ActiveCfg = Release|x86
|
||||||
|
{2D11C828-295C-463A-8545-CA1AD6D51518}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||||
|
{2D11C828-295C-463A-8545-CA1AD6D51518}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||||
|
{2D11C828-295C-463A-8545-CA1AD6D51518}.Release|x86.ActiveCfg = Release|x86
|
||||||
|
{2D11C828-295C-463A-8545-CA1AD6D51518}.Release|x86.Build.0 = Release|x86
|
||||||
|
{A4761900-0EA3-4FE4-A919-847FD5080EFC}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||||
|
{A4761900-0EA3-4FE4-A919-847FD5080EFC}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||||
|
{A4761900-0EA3-4FE4-A919-847FD5080EFC}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||||
|
{A4761900-0EA3-4FE4-A919-847FD5080EFC}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
|
{A4761900-0EA3-4FE4-A919-847FD5080EFC}.Debug|x86.Build.0 = Debug|x86
|
||||||
|
{A4761900-0EA3-4FE4-A919-847FD5080EFC}.Release|Any CPU.ActiveCfg = Release|x86
|
||||||
|
{A4761900-0EA3-4FE4-A919-847FD5080EFC}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||||
|
{A4761900-0EA3-4FE4-A919-847FD5080EFC}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||||
|
{A4761900-0EA3-4FE4-A919-847FD5080EFC}.Release|x86.ActiveCfg = Release|x86
|
||||||
|
{A4761900-0EA3-4FE4-A919-847FD5080EFC}.Release|x86.Build.0 = Release|x86
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|
|
@ -70,6 +70,9 @@ namespace CodeImp.DoomBuilder.ColorPicker.Controls {
|
||||||
btnOK.BackColor = ColorHandler.RGBtoColor(RGB);
|
btnOK.BackColor = ColorHandler.RGBtoColor(RGB);
|
||||||
btnOK.ForeColor = (RGB.Red < 180 && RGB.Green < 180) ? Color.White : Color.Black;
|
btnOK.ForeColor = (RGB.Red < 180 && RGB.Green < 180) ? Color.White : Color.Black;
|
||||||
|
|
||||||
|
//update float vals
|
||||||
|
tbFloatVals.Text = (float)Math.Round((float)RGB.Red / 255f, 2) + " " + (float)Math.Round((float)RGB.Green / 255f, 2) + " " + (float)Math.Round((float)RGB.Blue / 255f, 2);
|
||||||
|
|
||||||
//dispatch event further
|
//dispatch event further
|
||||||
EventHandler<ColorChangedEventArgs> handler = ColorChanged;
|
EventHandler<ColorChangedEventArgs> handler = ColorChanged;
|
||||||
if (handler != null)
|
if (handler != null)
|
||||||
|
@ -183,5 +186,9 @@ namespace CodeImp.DoomBuilder.ColorPicker.Controls {
|
||||||
if (handler != null)
|
if (handler != null)
|
||||||
handler(this, e);
|
handler(this, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void tbFloatVals_Click(object sender, EventArgs e) {
|
||||||
|
tbFloatVals.Select(0, tbFloatVals.Text.Length);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -23,162 +23,175 @@
|
||||||
/// содержимое данного метода при помощи редактора кода.
|
/// содержимое данного метода при помощи редактора кода.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent() {
|
private void InitializeComponent() {
|
||||||
this.btnCancel = new System.Windows.Forms.Button();
|
this.btnCancel = new System.Windows.Forms.Button();
|
||||||
this.btnOK = new System.Windows.Forms.Button();
|
this.btnOK = new System.Windows.Forms.Button();
|
||||||
this.Label3 = new System.Windows.Forms.Label();
|
this.Label3 = new System.Windows.Forms.Label();
|
||||||
this.nudRed = new System.Windows.Forms.NumericUpDown();
|
this.nudRed = new System.Windows.Forms.NumericUpDown();
|
||||||
this.pnlColor = new System.Windows.Forms.Panel();
|
this.pnlColor = new System.Windows.Forms.Panel();
|
||||||
this.Label1 = new System.Windows.Forms.Label();
|
this.Label1 = new System.Windows.Forms.Label();
|
||||||
this.pnlBrightness = new System.Windows.Forms.Panel();
|
this.pnlBrightness = new System.Windows.Forms.Panel();
|
||||||
this.nudBlue = new System.Windows.Forms.NumericUpDown();
|
this.nudBlue = new System.Windows.Forms.NumericUpDown();
|
||||||
this.nudGreen = new System.Windows.Forms.NumericUpDown();
|
this.nudGreen = new System.Windows.Forms.NumericUpDown();
|
||||||
this.Label2 = new System.Windows.Forms.Label();
|
this.Label2 = new System.Windows.Forms.Label();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.nudRed)).BeginInit();
|
this.tbFloatVals = new System.Windows.Forms.TextBox();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.nudBlue)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.nudRed)).BeginInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.nudGreen)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.nudBlue)).BeginInit();
|
||||||
this.SuspendLayout();
|
((System.ComponentModel.ISupportInitialize)(this.nudGreen)).BeginInit();
|
||||||
//
|
this.SuspendLayout();
|
||||||
// btnCancel
|
//
|
||||||
//
|
// btnCancel
|
||||||
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
//
|
||||||
this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
|
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||||
this.btnCancel.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
|
||||||
this.btnCancel.Location = new System.Drawing.Point(214, 44);
|
this.btnCancel.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.btnCancel.Name = "btnCancel";
|
this.btnCancel.Location = new System.Drawing.Point(214, 44);
|
||||||
this.btnCancel.Size = new System.Drawing.Size(94, 42);
|
this.btnCancel.Name = "btnCancel";
|
||||||
this.btnCancel.TabIndex = 54;
|
this.btnCancel.Size = new System.Drawing.Size(94, 42);
|
||||||
this.btnCancel.Text = "Cancel";
|
this.btnCancel.TabIndex = 54;
|
||||||
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
|
this.btnCancel.Text = "Cancel";
|
||||||
//
|
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
|
||||||
// btnOK
|
//
|
||||||
//
|
// btnOK
|
||||||
this.btnOK.BackColor = System.Drawing.SystemColors.Control;
|
//
|
||||||
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
|
this.btnOK.BackColor = System.Drawing.SystemColors.Control;
|
||||||
this.btnOK.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
|
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||||
this.btnOK.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.btnOK.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
|
||||||
this.btnOK.ForeColor = System.Drawing.SystemColors.ControlText;
|
this.btnOK.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.btnOK.Location = new System.Drawing.Point(214, 3);
|
this.btnOK.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||||
this.btnOK.Name = "btnOK";
|
this.btnOK.Location = new System.Drawing.Point(214, 3);
|
||||||
this.btnOK.Size = new System.Drawing.Size(94, 42);
|
this.btnOK.Name = "btnOK";
|
||||||
this.btnOK.TabIndex = 53;
|
this.btnOK.Size = new System.Drawing.Size(94, 42);
|
||||||
this.btnOK.Text = "OK";
|
this.btnOK.TabIndex = 53;
|
||||||
this.btnOK.UseVisualStyleBackColor = true;
|
this.btnOK.Text = "OK";
|
||||||
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
|
this.btnOK.UseVisualStyleBackColor = true;
|
||||||
//
|
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
|
||||||
// Label3
|
//
|
||||||
//
|
// Label3
|
||||||
this.Label3.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
//
|
||||||
this.Label3.Location = new System.Drawing.Point(214, 147);
|
this.Label3.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.Label3.Name = "Label3";
|
this.Label3.Location = new System.Drawing.Point(214, 133);
|
||||||
this.Label3.Size = new System.Drawing.Size(40, 23);
|
this.Label3.Name = "Label3";
|
||||||
this.Label3.TabIndex = 60;
|
this.Label3.Size = new System.Drawing.Size(40, 23);
|
||||||
this.Label3.Text = "Blue:";
|
this.Label3.TabIndex = 60;
|
||||||
this.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
this.Label3.Text = "Blue:";
|
||||||
//
|
this.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||||
// nudRed
|
//
|
||||||
//
|
// nudRed
|
||||||
this.nudRed.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
//
|
||||||
this.nudRed.Location = new System.Drawing.Point(260, 101);
|
this.nudRed.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.nudRed.Maximum = new decimal(new int[] {
|
this.nudRed.Location = new System.Drawing.Point(260, 89);
|
||||||
|
this.nudRed.Maximum = new decimal(new int[] {
|
||||||
255,
|
255,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0});
|
0});
|
||||||
this.nudRed.Name = "nudRed";
|
this.nudRed.Name = "nudRed";
|
||||||
this.nudRed.Size = new System.Drawing.Size(48, 20);
|
this.nudRed.Size = new System.Drawing.Size(48, 20);
|
||||||
this.nudRed.TabIndex = 55;
|
this.nudRed.TabIndex = 55;
|
||||||
this.nudRed.ValueChanged += new System.EventHandler(this.nudValueChanged);
|
this.nudRed.ValueChanged += new System.EventHandler(this.nudValueChanged);
|
||||||
//
|
//
|
||||||
// pnlColor
|
// pnlColor
|
||||||
//
|
//
|
||||||
this.pnlColor.Location = new System.Drawing.Point(3, 3);
|
this.pnlColor.Location = new System.Drawing.Point(3, 3);
|
||||||
this.pnlColor.Name = "pnlColor";
|
this.pnlColor.Name = "pnlColor";
|
||||||
this.pnlColor.Size = new System.Drawing.Size(176, 176);
|
this.pnlColor.Size = new System.Drawing.Size(176, 176);
|
||||||
this.pnlColor.TabIndex = 61;
|
this.pnlColor.TabIndex = 61;
|
||||||
this.pnlColor.Visible = false;
|
this.pnlColor.Visible = false;
|
||||||
//
|
//
|
||||||
// Label1
|
// Label1
|
||||||
//
|
//
|
||||||
this.Label1.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.Label1.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.Label1.Location = new System.Drawing.Point(214, 99);
|
this.Label1.Location = new System.Drawing.Point(214, 87);
|
||||||
this.Label1.Name = "Label1";
|
this.Label1.Name = "Label1";
|
||||||
this.Label1.Size = new System.Drawing.Size(40, 23);
|
this.Label1.Size = new System.Drawing.Size(40, 23);
|
||||||
this.Label1.TabIndex = 58;
|
this.Label1.TabIndex = 58;
|
||||||
this.Label1.Text = "Red:";
|
this.Label1.Text = "Red:";
|
||||||
this.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
this.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||||
//
|
//
|
||||||
// pnlBrightness
|
// pnlBrightness
|
||||||
//
|
//
|
||||||
this.pnlBrightness.Location = new System.Drawing.Point(185, 3);
|
this.pnlBrightness.Location = new System.Drawing.Point(185, 3);
|
||||||
this.pnlBrightness.Name = "pnlBrightness";
|
this.pnlBrightness.Name = "pnlBrightness";
|
||||||
this.pnlBrightness.Size = new System.Drawing.Size(16, 176);
|
this.pnlBrightness.Size = new System.Drawing.Size(16, 176);
|
||||||
this.pnlBrightness.TabIndex = 62;
|
this.pnlBrightness.TabIndex = 62;
|
||||||
this.pnlBrightness.Visible = false;
|
this.pnlBrightness.Visible = false;
|
||||||
//
|
//
|
||||||
// nudBlue
|
// nudBlue
|
||||||
//
|
//
|
||||||
this.nudBlue.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.nudBlue.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.nudBlue.Location = new System.Drawing.Point(260, 149);
|
this.nudBlue.Location = new System.Drawing.Point(260, 135);
|
||||||
this.nudBlue.Maximum = new decimal(new int[] {
|
this.nudBlue.Maximum = new decimal(new int[] {
|
||||||
255,
|
255,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0});
|
0});
|
||||||
this.nudBlue.Name = "nudBlue";
|
this.nudBlue.Name = "nudBlue";
|
||||||
this.nudBlue.Size = new System.Drawing.Size(48, 20);
|
this.nudBlue.Size = new System.Drawing.Size(48, 20);
|
||||||
this.nudBlue.TabIndex = 57;
|
this.nudBlue.TabIndex = 57;
|
||||||
this.nudBlue.ValueChanged += new System.EventHandler(this.nudValueChanged);
|
this.nudBlue.ValueChanged += new System.EventHandler(this.nudValueChanged);
|
||||||
//
|
//
|
||||||
// nudGreen
|
// nudGreen
|
||||||
//
|
//
|
||||||
this.nudGreen.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.nudGreen.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.nudGreen.Location = new System.Drawing.Point(260, 125);
|
this.nudGreen.Location = new System.Drawing.Point(260, 112);
|
||||||
this.nudGreen.Maximum = new decimal(new int[] {
|
this.nudGreen.Maximum = new decimal(new int[] {
|
||||||
255,
|
255,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0});
|
0});
|
||||||
this.nudGreen.Name = "nudGreen";
|
this.nudGreen.Name = "nudGreen";
|
||||||
this.nudGreen.Size = new System.Drawing.Size(48, 20);
|
this.nudGreen.Size = new System.Drawing.Size(48, 20);
|
||||||
this.nudGreen.TabIndex = 56;
|
this.nudGreen.TabIndex = 56;
|
||||||
this.nudGreen.ValueChanged += new System.EventHandler(this.nudValueChanged);
|
this.nudGreen.ValueChanged += new System.EventHandler(this.nudValueChanged);
|
||||||
//
|
//
|
||||||
// Label2
|
// Label2
|
||||||
//
|
//
|
||||||
this.Label2.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.Label2.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.Label2.Location = new System.Drawing.Point(214, 123);
|
this.Label2.Location = new System.Drawing.Point(214, 110);
|
||||||
this.Label2.Name = "Label2";
|
this.Label2.Name = "Label2";
|
||||||
this.Label2.Size = new System.Drawing.Size(40, 23);
|
this.Label2.Size = new System.Drawing.Size(40, 23);
|
||||||
this.Label2.TabIndex = 59;
|
this.Label2.TabIndex = 59;
|
||||||
this.Label2.Text = "Green:";
|
this.Label2.Text = "Green:";
|
||||||
this.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
this.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||||
//
|
//
|
||||||
// ColorPickerControl
|
// tbFloatVals
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.tbFloatVals.Location = new System.Drawing.Point(217, 158);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.tbFloatVals.Name = "tbFloatVals";
|
||||||
this.Controls.Add(this.btnCancel);
|
this.tbFloatVals.ReadOnly = true;
|
||||||
this.Controls.Add(this.btnOK);
|
this.tbFloatVals.Size = new System.Drawing.Size(90, 20);
|
||||||
this.Controls.Add(this.Label3);
|
this.tbFloatVals.TabIndex = 63;
|
||||||
this.Controls.Add(this.nudRed);
|
this.tbFloatVals.Text = "1.01 0.55 0.33";
|
||||||
this.Controls.Add(this.pnlColor);
|
this.tbFloatVals.Click += new System.EventHandler(this.tbFloatVals_Click);
|
||||||
this.Controls.Add(this.Label1);
|
//
|
||||||
this.Controls.Add(this.pnlBrightness);
|
// ColorPickerControl
|
||||||
this.Controls.Add(this.nudBlue);
|
//
|
||||||
this.Controls.Add(this.nudGreen);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.Controls.Add(this.Label2);
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.Name = "ColorPickerControl";
|
this.Controls.Add(this.tbFloatVals);
|
||||||
this.Size = new System.Drawing.Size(311, 183);
|
this.Controls.Add(this.btnCancel);
|
||||||
this.Load += new System.EventHandler(this.ColorPickerControl_Load);
|
this.Controls.Add(this.btnOK);
|
||||||
this.MouseLeave += new System.EventHandler(this.onMouseUp);
|
this.Controls.Add(this.Label3);
|
||||||
this.Paint += new System.Windows.Forms.PaintEventHandler(this.onPaint);
|
this.Controls.Add(this.nudRed);
|
||||||
this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.handleMouse);
|
this.Controls.Add(this.pnlColor);
|
||||||
this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.ColorPickerControl_MouseDown);
|
this.Controls.Add(this.Label1);
|
||||||
this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.onMouseUp);
|
this.Controls.Add(this.pnlBrightness);
|
||||||
((System.ComponentModel.ISupportInitialize)(this.nudRed)).EndInit();
|
this.Controls.Add(this.nudBlue);
|
||||||
((System.ComponentModel.ISupportInitialize)(this.nudBlue)).EndInit();
|
this.Controls.Add(this.nudGreen);
|
||||||
((System.ComponentModel.ISupportInitialize)(this.nudGreen)).EndInit();
|
this.Controls.Add(this.Label2);
|
||||||
this.ResumeLayout(false);
|
this.Name = "ColorPickerControl";
|
||||||
|
this.Size = new System.Drawing.Size(311, 183);
|
||||||
|
this.Load += new System.EventHandler(this.ColorPickerControl_Load);
|
||||||
|
this.MouseLeave += new System.EventHandler(this.onMouseUp);
|
||||||
|
this.Paint += new System.Windows.Forms.PaintEventHandler(this.onPaint);
|
||||||
|
this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.handleMouse);
|
||||||
|
this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.ColorPickerControl_MouseDown);
|
||||||
|
this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.onMouseUp);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.nudRed)).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.nudBlue)).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.nudGreen)).EndInit();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -194,5 +207,6 @@
|
||||||
internal System.Windows.Forms.NumericUpDown nudBlue;
|
internal System.Windows.Forms.NumericUpDown nudBlue;
|
||||||
internal System.Windows.Forms.NumericUpDown nudGreen;
|
internal System.Windows.Forms.NumericUpDown nudGreen;
|
||||||
internal System.Windows.Forms.Label Label2;
|
internal System.Windows.Forms.Label Label2;
|
||||||
|
private System.Windows.Forms.TextBox tbFloatVals;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ namespace CodeImp.DoomBuilder.UDMFControls
|
||||||
|
|
||||||
private List<string> renderStyles;
|
private List<string> renderStyles;
|
||||||
|
|
||||||
private static bool relativeMode = true;
|
private static bool relativeMode = false;
|
||||||
|
|
||||||
public UDMFControlsForm() {
|
public UDMFControlsForm() {
|
||||||
//capture keys
|
//capture keys
|
||||||
|
@ -111,8 +111,6 @@ namespace CodeImp.DoomBuilder.UDMFControls
|
||||||
|
|
||||||
case VisualGeometryType.WALL_MIDDLE_3D:
|
case VisualGeometryType.WALL_MIDDLE_3D:
|
||||||
walls3dCount++;
|
walls3dCount++;
|
||||||
//if (wall3DIndeces.IndexOf(vg.Sector.Sector.FixedIndex) != -1)
|
|
||||||
//break;
|
|
||||||
wall3DIndeces.Add(vg.Sector.Sector.FixedIndex);
|
wall3DIndeces.Add(vg.Sector.Sector.FixedIndex);
|
||||||
goto case VisualGeometryType.WALL_MIDDLE;
|
goto case VisualGeometryType.WALL_MIDDLE;
|
||||||
|
|
||||||
|
@ -166,7 +164,8 @@ namespace CodeImp.DoomBuilder.UDMFControls
|
||||||
scaleControl.Value = new Vector2D(scaleX, scaleY);
|
scaleControl.Value = new Vector2D(scaleX, scaleY);
|
||||||
positionControl1.Value = new Vector2D(translateX, translateY);
|
positionControl1.Value = new Vector2D(translateX, translateY);
|
||||||
angleControl1.Value = (int)((float)firstFloor.Sector.Fields[KeyNames.GetRotation(firstFloor.GeometryType)].Value);
|
angleControl1.Value = (int)((float)firstFloor.Sector.Fields[KeyNames.GetRotation(firstFloor.GeometryType)].Value);
|
||||||
sliderBrightness.Value = (int)firstFloor.Sector.Fields[KeyNames.GetLight(firstFloor.GeometryType)].Value;
|
sliderBrightness.SetLimits(cblightabsolute.Checked ? 0 : -255, 255);
|
||||||
|
sliderBrightness.Value = (int)firstFloor.Sector.Fields[KeyNames.GetLight(firstFloor.GeometryType)].Value;
|
||||||
nudGravity.Value = (decimal)((float)firstFloor.Sector.Fields[(string)nudGravity.Tag].Value);
|
nudGravity.Value = (decimal)((float)firstFloor.Sector.Fields[(string)nudGravity.Tag].Value);
|
||||||
sliderDesaturation.Value = (float)firstFloor.Sector.Fields[(string)sliderDesaturation.Tag].Value;
|
sliderDesaturation.Value = (float)firstFloor.Sector.Fields[(string)sliderDesaturation.Tag].Value;
|
||||||
|
|
||||||
|
@ -189,8 +188,9 @@ namespace CodeImp.DoomBuilder.UDMFControls
|
||||||
//set values to controls
|
//set values to controls
|
||||||
scaleControl.Value = new Vector2D(scaleX, scaleY);
|
scaleControl.Value = new Vector2D(scaleX, scaleY);
|
||||||
positionControl1.Value = new Vector2D(translateX, translateY);
|
positionControl1.Value = new Vector2D(translateX, translateY);
|
||||||
sliderBrightness.Value = (int)firstWall.Sidedef.Fields[KeyNames.GetLight(firstWall.GeometryType)].Value;
|
|
||||||
cblightabsolute.Checked = (bool)firstWall.Sidedef.Fields[KeyNames.GetLightAbsolute(firstWall.GeometryType)].Value;
|
cblightabsolute.Checked = (bool)firstWall.Sidedef.Fields[KeyNames.GetLightAbsolute(firstWall.GeometryType)].Value;
|
||||||
|
sliderBrightness.SetLimits(cblightabsolute.Checked ? 0 : -255, 255);
|
||||||
|
sliderBrightness.Value = (int)firstWall.Sidedef.Fields[KeyNames.GetLight(firstWall.GeometryType)].Value;
|
||||||
|
|
||||||
//set linedef values
|
//set linedef values
|
||||||
sliderAlpha.Value = (float)firstWall.Linedef.Fields[(string)sliderAlpha.Tag].Value;
|
sliderAlpha.Value = (float)firstWall.Linedef.Fields[(string)sliderAlpha.Tag].Value;
|
||||||
|
@ -201,8 +201,6 @@ namespace CodeImp.DoomBuilder.UDMFControls
|
||||||
if (walls3dCount == wallsMid.Count && wallsTop.Count == 0 && wallsBottom.Count == 0) {
|
if (walls3dCount == wallsMid.Count && wallsTop.Count == 0 && wallsBottom.Count == 0) {
|
||||||
gbAlpha.Enabled = false;
|
gbAlpha.Enabled = false;
|
||||||
bgBrightness.Enabled = false;
|
bgBrightness.Enabled = false;
|
||||||
//cblightabsolute.Checked = true;
|
|
||||||
//cblightabsolute.Enabled = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -215,12 +213,6 @@ namespace CodeImp.DoomBuilder.UDMFControls
|
||||||
gbAlpha.Enabled = false;
|
gbAlpha.Enabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//brightness slider
|
|
||||||
if(cblightabsolute.Checked)
|
|
||||||
sliderBrightness.SetLimits(0, 255);
|
|
||||||
else
|
|
||||||
sliderBrightness.SetLimits(-255, 255);
|
|
||||||
|
|
||||||
Text = "Editing " + rest;
|
Text = "Editing " + rest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -650,18 +642,25 @@ namespace CodeImp.DoomBuilder.UDMFControls
|
||||||
if (vg.GeometryType == VisualGeometryType.CEILING || vg.GeometryType == VisualGeometryType.FLOOR) {
|
if (vg.GeometryType == VisualGeometryType.CEILING || vg.GeometryType == VisualGeometryType.FLOOR) {
|
||||||
sector = vg.GetControlSector();
|
sector = vg.GetControlSector();
|
||||||
sector.Fields.BeforeFieldsChange();
|
sector.Fields.BeforeFieldsChange();
|
||||||
} else {
|
} else if(vg.GeometryType == VisualGeometryType.WALL_MIDDLE_3D) {
|
||||||
linedef = vg.GetControlLinedef();
|
linedef = vg.GetControlLinedef();
|
||||||
|
|
||||||
controlSidedef = linedef.Front;
|
controlSidedef = linedef.Front;
|
||||||
sidedef = vg.Sidedef;
|
sidedef = vg.Sidedef;
|
||||||
|
|
||||||
hasControlLinedef = (controlSidedef.Sector.FixedIndex != sidedef.Sector.FixedIndex);
|
hasControlLinedef = (controlSidedef.Sector.FixedIndex != sidedef.Sector.FixedIndex);
|
||||||
|
|
||||||
linedef.Fields.BeforeFieldsChange();
|
linedef.Fields.BeforeFieldsChange();
|
||||||
controlSidedef.Fields.BeforeFieldsChange();
|
controlSidedef.Fields.BeforeFieldsChange();
|
||||||
sidedef.Fields.BeforeFieldsChange();
|
sidedef.Fields.BeforeFieldsChange();
|
||||||
}
|
} else {
|
||||||
|
hasControlLinedef = false;
|
||||||
|
sidedef = vg.Sidedef;
|
||||||
|
controlSidedef = sidedef;
|
||||||
|
linedef = sidedef.Line;
|
||||||
|
linedef.Fields.BeforeFieldsChange();
|
||||||
|
sidedef.Fields.BeforeFieldsChange();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Update() {
|
public void Update() {
|
||||||
|
|
Loading…
Reference in a new issue