mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-27 06:02:11 +00:00
Draw Settings panel: added "Get From Selection" buttons.
+a couple of cosmetic changes.
This commit is contained in:
parent
64e198451d
commit
b08f64accb
4 changed files with 127 additions and 10 deletions
|
@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
|
|||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("GZDoom Builder")]
|
||||
[assembly: AssemblyDescription("GZDoom map editor")]
|
||||
[assembly: AssemblyDescription("ZDoom, GZDoom and Zandronum map editor")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("CodeImp, MaxED")]
|
||||
[assembly: AssemblyProduct("GZDoom Builder")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2007, 2014")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2007, 2015")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
|
|
1
Source/Core/Windows/ConfigForm.Designer.cs
generated
1
Source/Core/Windows/ConfigForm.Designer.cs
generated
|
@ -826,7 +826,6 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.tooltip.AutomaticDelay = 0;
|
||||
this.tooltip.AutoPopDelay = 30000;
|
||||
this.tooltip.InitialDelay = 10;
|
||||
this.tooltip.IsBalloon = true;
|
||||
this.tooltip.ReshowDelay = 100;
|
||||
this.tooltip.ToolTipTitle = "Supported Placeholders:";
|
||||
this.tooltip.UseAnimation = false;
|
||||
|
|
|
@ -65,6 +65,9 @@
|
|||
this.clearceiling = new System.Windows.Forms.Button();
|
||||
this.clearall = new System.Windows.Forms.Button();
|
||||
this.groupBox5 = new System.Windows.Forms.GroupBox();
|
||||
this.getsidetexturesfromselection = new System.Windows.Forms.Button();
|
||||
this.getheightandbrightnessfromselection = new System.Windows.Forms.Button();
|
||||
this.getsectortexturesfromselection = new System.Windows.Forms.Button();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.groupBox2.SuspendLayout();
|
||||
this.groupBox3.SuspendLayout();
|
||||
|
@ -76,13 +79,14 @@
|
|||
//
|
||||
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.getsectortexturesfromselection);
|
||||
this.groupBox1.Controls.Add(this.ceiling);
|
||||
this.groupBox1.Controls.Add(this.floor);
|
||||
this.groupBox1.Controls.Add(this.cbOverrideFloorTexture);
|
||||
this.groupBox1.Controls.Add(this.cbOverrideCeilingTexture);
|
||||
this.groupBox1.Location = new System.Drawing.Point(3, 3);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(243, 137);
|
||||
this.groupBox1.Size = new System.Drawing.Size(243, 166);
|
||||
this.groupBox1.TabIndex = 0;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Sector texture overrides:";
|
||||
|
@ -135,6 +139,7 @@
|
|||
//
|
||||
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.getheightandbrightnessfromselection);
|
||||
this.groupBox2.Controls.Add(this.label1);
|
||||
this.groupBox2.Controls.Add(this.label14);
|
||||
this.groupBox2.Controls.Add(this.cbBrightness);
|
||||
|
@ -143,9 +148,9 @@
|
|||
this.groupBox2.Controls.Add(this.cbCeilHeight);
|
||||
this.groupBox2.Controls.Add(this.cbFloorHeight);
|
||||
this.groupBox2.Controls.Add(this.ceilHeight);
|
||||
this.groupBox2.Location = new System.Drawing.Point(3, 397);
|
||||
this.groupBox2.Location = new System.Drawing.Point(3, 347);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Size = new System.Drawing.Size(243, 118);
|
||||
this.groupBox2.Size = new System.Drawing.Size(243, 138);
|
||||
this.groupBox2.TabIndex = 21;
|
||||
this.groupBox2.TabStop = false;
|
||||
this.groupBox2.Text = "Geometry overrides:";
|
||||
|
@ -319,15 +324,16 @@
|
|||
//
|
||||
this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.groupBox3.Controls.Add(this.getsidetexturesfromselection);
|
||||
this.groupBox3.Controls.Add(this.cbOverrideBottomTexture);
|
||||
this.groupBox3.Controls.Add(this.top);
|
||||
this.groupBox3.Controls.Add(this.cbOverrideMiddleTexture);
|
||||
this.groupBox3.Controls.Add(this.middle);
|
||||
this.groupBox3.Controls.Add(this.bottom);
|
||||
this.groupBox3.Controls.Add(this.cbOverrideTopTexture);
|
||||
this.groupBox3.Location = new System.Drawing.Point(3, 146);
|
||||
this.groupBox3.Location = new System.Drawing.Point(3, 175);
|
||||
this.groupBox3.Name = "groupBox3";
|
||||
this.groupBox3.Size = new System.Drawing.Size(243, 137);
|
||||
this.groupBox3.Size = new System.Drawing.Size(243, 166);
|
||||
this.groupBox3.TabIndex = 29;
|
||||
this.groupBox3.TabStop = false;
|
||||
this.groupBox3.Text = "Sidedef texture overrides:";
|
||||
|
@ -342,7 +348,7 @@
|
|||
this.groupBox4.Controls.Add(this.fillupper);
|
||||
this.groupBox4.Controls.Add(this.fillfloor);
|
||||
this.groupBox4.Controls.Add(this.fillceiling);
|
||||
this.groupBox4.Location = new System.Drawing.Point(3, 289);
|
||||
this.groupBox4.Location = new System.Drawing.Point(3, 491);
|
||||
this.groupBox4.Name = "groupBox4";
|
||||
this.groupBox4.Size = new System.Drawing.Size(243, 48);
|
||||
this.groupBox4.TabIndex = 30;
|
||||
|
@ -492,13 +498,43 @@
|
|||
this.groupBox5.Controls.Add(this.clearupper);
|
||||
this.groupBox5.Controls.Add(this.clearfloor);
|
||||
this.groupBox5.Controls.Add(this.clearceiling);
|
||||
this.groupBox5.Location = new System.Drawing.Point(3, 343);
|
||||
this.groupBox5.Location = new System.Drawing.Point(3, 545);
|
||||
this.groupBox5.Name = "groupBox5";
|
||||
this.groupBox5.Size = new System.Drawing.Size(243, 48);
|
||||
this.groupBox5.TabIndex = 31;
|
||||
this.groupBox5.TabStop = false;
|
||||
this.groupBox5.Text = "Remove Textures form Selection:";
|
||||
//
|
||||
// getsidetexturesfromselection
|
||||
//
|
||||
this.getsidetexturesfromselection.Location = new System.Drawing.Point(6, 137);
|
||||
this.getsidetexturesfromselection.Name = "getsidetexturesfromselection";
|
||||
this.getsidetexturesfromselection.Size = new System.Drawing.Size(230, 23);
|
||||
this.getsidetexturesfromselection.TabIndex = 31;
|
||||
this.getsidetexturesfromselection.Text = "Get From Selection";
|
||||
this.getsidetexturesfromselection.UseVisualStyleBackColor = true;
|
||||
this.getsidetexturesfromselection.Click += new System.EventHandler(this.getsidetexturesfromselection_Click);
|
||||
//
|
||||
// getheightandbrightnessfromselection
|
||||
//
|
||||
this.getheightandbrightnessfromselection.Location = new System.Drawing.Point(6, 108);
|
||||
this.getheightandbrightnessfromselection.Name = "getheightandbrightnessfromselection";
|
||||
this.getheightandbrightnessfromselection.Size = new System.Drawing.Size(230, 23);
|
||||
this.getheightandbrightnessfromselection.TabIndex = 32;
|
||||
this.getheightandbrightnessfromselection.Text = "Get From Selection";
|
||||
this.getheightandbrightnessfromselection.UseVisualStyleBackColor = true;
|
||||
this.getheightandbrightnessfromselection.Click += new System.EventHandler(this.getheightandbrightnessfromselection_Click);
|
||||
//
|
||||
// getsectortexturesfromselection
|
||||
//
|
||||
this.getsectortexturesfromselection.Location = new System.Drawing.Point(6, 137);
|
||||
this.getsectortexturesfromselection.Name = "getsectortexturesfromselection";
|
||||
this.getsectortexturesfromselection.Size = new System.Drawing.Size(230, 23);
|
||||
this.getsectortexturesfromselection.TabIndex = 32;
|
||||
this.getsectortexturesfromselection.Text = "Get From Selection";
|
||||
this.getsectortexturesfromselection.UseVisualStyleBackColor = true;
|
||||
this.getsectortexturesfromselection.Click += new System.EventHandler(this.getsectortexturesfromselection_Click);
|
||||
//
|
||||
// SectorDrawingOptionsPanel
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||
|
@ -560,5 +596,8 @@
|
|||
private CodeImp.DoomBuilder.Controls.FlatSelectorControl ceiling;
|
||||
private System.Windows.Forms.Button fillall;
|
||||
private System.Windows.Forms.Button clearall;
|
||||
private System.Windows.Forms.Button getheightandbrightnessfromselection;
|
||||
private System.Windows.Forms.Button getsidetexturesfromselection;
|
||||
private System.Windows.Forms.Button getsectortexturesfromselection;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ using System;
|
|||
using System.Windows.Forms;
|
||||
using System.Collections.Generic;
|
||||
using CodeImp.DoomBuilder.Map;
|
||||
using CodeImp.DoomBuilder.Windows;
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -39,6 +40,10 @@ namespace CodeImp.DoomBuilder.BuilderModes.Interface
|
|||
cbFloorHeight.Checked = General.Map.Options.OverrideFloorHeight;
|
||||
cbBrightness.Checked = General.Map.Options.OverrideBrightness;
|
||||
|
||||
getsectortexturesfromselection.Enabled = (cbOverrideCeilingTexture.Checked || cbOverrideFloorTexture.Checked);
|
||||
getsidetexturesfromselection.Enabled = (cbOverrideTopTexture.Checked || cbOverrideMiddleTexture.Checked || cbOverrideBottomTexture.Checked);
|
||||
getheightandbrightnessfromselection.Enabled = (cbCeilHeight.Checked || cbFloorHeight.Checked || cbBrightness.Checked);
|
||||
|
||||
ceiling.Enabled = cbOverrideCeilingTexture.Checked;
|
||||
floor.Enabled = cbOverrideFloorTexture.Checked;
|
||||
top.Enabled = cbOverrideTopTexture.Checked;
|
||||
|
@ -57,6 +62,8 @@ namespace CodeImp.DoomBuilder.BuilderModes.Interface
|
|||
{
|
||||
ceiling.Enabled = cbOverrideCeilingTexture.Checked;
|
||||
General.Map.Options.OverrideCeilingTexture = cbOverrideCeilingTexture.Checked;
|
||||
|
||||
getsectortexturesfromselection.Enabled = (cbOverrideCeilingTexture.Checked || cbOverrideFloorTexture.Checked);
|
||||
}
|
||||
|
||||
private void cbOverrideFloorTexture_CheckedChanged(object sender, EventArgs e)
|
||||
|
@ -69,36 +76,48 @@ namespace CodeImp.DoomBuilder.BuilderModes.Interface
|
|||
{
|
||||
top.Enabled = cbOverrideTopTexture.Checked;
|
||||
General.Map.Options.OverrideTopTexture = cbOverrideTopTexture.Checked;
|
||||
|
||||
getsidetexturesfromselection.Enabled = (cbOverrideTopTexture.Checked || cbOverrideMiddleTexture.Checked || cbOverrideBottomTexture.Checked);
|
||||
}
|
||||
|
||||
private void cbOverrideMiddleTexture_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
middle.Enabled = cbOverrideMiddleTexture.Checked;
|
||||
General.Map.Options.OverrideMiddleTexture = cbOverrideMiddleTexture.Checked;
|
||||
|
||||
getsidetexturesfromselection.Enabled = (cbOverrideTopTexture.Checked || cbOverrideMiddleTexture.Checked || cbOverrideBottomTexture.Checked);
|
||||
}
|
||||
|
||||
private void cbOverrideBottomTexture_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
bottom.Enabled = cbOverrideBottomTexture.Checked;
|
||||
General.Map.Options.OverrideBottomTexture = cbOverrideBottomTexture.Checked;
|
||||
|
||||
getsidetexturesfromselection.Enabled = (cbOverrideTopTexture.Checked || cbOverrideMiddleTexture.Checked || cbOverrideBottomTexture.Checked);
|
||||
}
|
||||
|
||||
private void cbCeilHeight_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
ceilHeight.Enabled = cbCeilHeight.Checked;
|
||||
General.Map.Options.OverrideCeilingHeight = cbCeilHeight.Checked;
|
||||
|
||||
getheightandbrightnessfromselection.Enabled = (cbCeilHeight.Checked || cbFloorHeight.Checked || cbBrightness.Checked);
|
||||
}
|
||||
|
||||
private void cbFloorHeight_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
floorHeight.Enabled = cbFloorHeight.Checked;
|
||||
General.Map.Options.OverrideFloorHeight = cbFloorHeight.Checked;
|
||||
|
||||
getheightandbrightnessfromselection.Enabled = (cbCeilHeight.Checked || cbFloorHeight.Checked || cbBrightness.Checked);
|
||||
}
|
||||
|
||||
private void cbBrightness_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
brightness.Enabled = cbBrightness.Checked;
|
||||
General.Map.Options.OverrideBrightness = cbBrightness.Checked;
|
||||
|
||||
getheightandbrightnessfromselection.Enabled = (cbCeilHeight.Checked || cbFloorHeight.Checked || cbBrightness.Checked);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -482,5 +501,65 @@ namespace CodeImp.DoomBuilder.BuilderModes.Interface
|
|||
|
||||
#endregion
|
||||
|
||||
#region ================== Get Properties from Selection Events
|
||||
|
||||
private void getsectortexturesfromselection_Click(object sender, EventArgs e)
|
||||
{
|
||||
ICollection<Sector> sectors = General.Map.Map.GetSelectedSectors(true);
|
||||
if(sectors.Count == 0)
|
||||
{
|
||||
General.Interface.DisplayStatus(StatusType.Warning, "This action requires selected sector");
|
||||
return;
|
||||
}
|
||||
|
||||
Sector s = General.GetByIndex(sectors, 0);
|
||||
if(cbOverrideCeilingTexture.Checked) ceiling.TextureName = s.CeilTexture;
|
||||
if(cbOverrideFloorTexture.Checked) floor.TextureName = s.FloorTexture;
|
||||
}
|
||||
|
||||
private void getsidetexturesfromselection_Click(object sender, EventArgs e)
|
||||
{
|
||||
ICollection<Linedef> lines = General.Map.Map.GetSelectedLinedefs(true);
|
||||
if(lines.Count == 0)
|
||||
{
|
||||
General.Interface.DisplayStatus(StatusType.Warning, "This action requires selected linedef");
|
||||
return;
|
||||
}
|
||||
|
||||
Sidedef s = null;
|
||||
foreach (Linedef l in lines)
|
||||
{
|
||||
s = (l.Front ?? l.Back);
|
||||
if(s.MiddleTexture != "-" || s.HighTexture != "-" || s.LowTexture != "-") break;
|
||||
}
|
||||
|
||||
if(s == null)
|
||||
{
|
||||
General.Interface.DisplayStatus(StatusType.Warning, "Selection doesn't contain suitable sidedefs");
|
||||
return;
|
||||
}
|
||||
|
||||
if(cbOverrideTopTexture.Checked) top.TextureName = s.HighTexture;
|
||||
if(cbOverrideMiddleTexture.Checked) middle.TextureName = s.MiddleTexture;
|
||||
if(cbOverrideBottomTexture.Checked) bottom.TextureName = s.LowTexture;
|
||||
}
|
||||
|
||||
private void getheightandbrightnessfromselection_Click(object sender, EventArgs e)
|
||||
{
|
||||
ICollection<Sector> sectors = General.Map.Map.GetSelectedSectors(true);
|
||||
if(sectors.Count == 0)
|
||||
{
|
||||
General.Interface.DisplayStatus(StatusType.Warning, "This action requires selected sector");
|
||||
return;
|
||||
}
|
||||
|
||||
Sector s = General.GetByIndex(sectors, 0);
|
||||
if(cbCeilHeight.Checked) ceilHeight.Text = s.CeilHeight.ToString();
|
||||
if(cbFloorHeight.Checked) floorHeight.Text = s.FloorHeight.ToString();
|
||||
if(cbBrightness.Checked) brightness.Text = s.Brightness.ToString();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue