Sector info panel: replace effect with damage type, add trigger info

This commit is contained in:
spherallic 2023-07-17 17:42:51 +02:00
parent a6d0531c95
commit a92cd89ff0
2 changed files with 76 additions and 9 deletions

View file

@ -72,6 +72,11 @@ namespace CodeImp.DoomBuilder.Controls
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.flagsPanel = new System.Windows.Forms.GroupBox(); this.flagsPanel = new System.Windows.Forms.GroupBox();
this.flags = new CodeImp.DoomBuilder.Controls.TransparentListView(); this.flags = new CodeImp.DoomBuilder.Controls.TransparentListView();
this.triggerPanel = new System.Windows.Forms.GroupBox();
this.triggertag = new System.Windows.Forms.Label();
this.triggertaglabel = new System.Windows.Forms.Label();
this.triggerer = new System.Windows.Forms.Label();
this.triggererlabel = new System.Windows.Forms.Label();
label13 = new System.Windows.Forms.Label(); label13 = new System.Windows.Forms.Label();
label5 = new System.Windows.Forms.Label(); label5 = new System.Windows.Forms.Label();
this.sectorinfo.SuspendLayout(); this.sectorinfo.SuspendLayout();
@ -81,6 +86,7 @@ namespace CodeImp.DoomBuilder.Controls
((System.ComponentModel.ISupportInitialize)(this.floortex)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.floortex)).BeginInit();
this.flowLayoutPanel1.SuspendLayout(); this.flowLayoutPanel1.SuspendLayout();
this.flagsPanel.SuspendLayout(); this.flagsPanel.SuspendLayout();
this.triggerPanel.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// label13 // label13
@ -130,11 +136,11 @@ namespace CodeImp.DoomBuilder.Controls
// //
// effectlabel // effectlabel
// //
this.effectlabel.Location = new System.Drawing.Point(8, 19); this.effectlabel.Location = new System.Drawing.Point(2, 19);
this.effectlabel.Name = "effectlabel"; this.effectlabel.Name = "effectlabel";
this.effectlabel.Size = new System.Drawing.Size(44, 14); this.effectlabel.Size = new System.Drawing.Size(50, 14);
this.effectlabel.TabIndex = 0; this.effectlabel.TabIndex = 0;
this.effectlabel.Text = "Effect:"; this.effectlabel.Text = "Damage:";
this.effectlabel.TextAlign = System.Drawing.ContentAlignment.TopRight; this.effectlabel.TextAlign = System.Drawing.ContentAlignment.TopRight;
// //
// ceilingLightLabel // ceilingLightLabel
@ -316,7 +322,7 @@ namespace CodeImp.DoomBuilder.Controls
this.effect.Name = "effect"; this.effect.Name = "effect";
this.effect.Size = new System.Drawing.Size(123, 13); this.effect.Size = new System.Drawing.Size(123, 13);
this.effect.TabIndex = 1; this.effect.TabIndex = 1;
this.effect.Text = "0 - Whacky Pool of Fluid"; this.effect.Text = "None";
// //
// ceilingLight // ceilingLight
// //
@ -515,6 +521,7 @@ namespace CodeImp.DoomBuilder.Controls
this.flowLayoutPanel1.Controls.Add(this.sectorinfo); this.flowLayoutPanel1.Controls.Add(this.sectorinfo);
this.flowLayoutPanel1.Controls.Add(this.floorpanel); this.flowLayoutPanel1.Controls.Add(this.floorpanel);
this.flowLayoutPanel1.Controls.Add(this.ceilingpanel); this.flowLayoutPanel1.Controls.Add(this.ceilingpanel);
this.flowLayoutPanel1.Controls.Add(this.triggerPanel);
this.flowLayoutPanel1.Controls.Add(this.flagsPanel); this.flowLayoutPanel1.Controls.Add(this.flagsPanel);
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0); this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0);
@ -524,6 +531,56 @@ namespace CodeImp.DoomBuilder.Controls
this.flowLayoutPanel1.TabIndex = 5; this.flowLayoutPanel1.TabIndex = 5;
this.flowLayoutPanel1.WrapContents = false; this.flowLayoutPanel1.WrapContents = false;
// //
// triggerPanel
//
this.triggerPanel.Controls.Add(this.triggertag);
this.triggerPanel.Controls.Add(this.triggertaglabel);
this.triggerPanel.Controls.Add(this.triggerer);
this.triggerPanel.Controls.Add(this.triggererlabel);
this.triggerPanel.Location = new System.Drawing.Point(709, 0);
this.triggerPanel.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
this.triggerPanel.Name = "triggerPanel";
this.triggerPanel.Size = new System.Drawing.Size(125, 100);
this.triggerPanel.TabIndex = 7;
this.triggerPanel.TabStop = false;
this.triggerPanel.Text = " Trigger";
//
// triggertag
//
this.triggertag.AutoSize = true;
this.triggertag.Location = new System.Drawing.Point(70, 19);
this.triggertag.Name = "triggertag";
this.triggertag.Size = new System.Drawing.Size(50, 13);
this.triggertag.TabIndex = 0;
this.triggertag.Text = "0";
//
// triggertaglabel
//
this.triggertaglabel.Location = new System.Drawing.Point(2, 19);
this.triggertaglabel.Name = "triggertaglabel";
this.triggertaglabel.Size = new System.Drawing.Size(65, 14);
this.triggertaglabel.TabIndex = 0;
this.triggertaglabel.Text = "Trigger tag:";
this.triggertaglabel.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// triggerer
//
this.triggerer.AutoSize = true;
this.triggerer.Location = new System.Drawing.Point(70, 34);
this.triggerer.Name = "triggerer";
this.triggerer.Size = new System.Drawing.Size(50, 13);
this.triggerer.TabIndex = 0;
this.triggerer.Text = "Player";
//
// triggererlabel
//
this.triggererlabel.Location = new System.Drawing.Point(2, 34);
this.triggererlabel.Name = "triggererlabel";
this.triggererlabel.Size = new System.Drawing.Size(65, 14);
this.triggererlabel.TabIndex = 0;
this.triggererlabel.Text = "Triggerer:";
this.triggererlabel.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// flagsPanel // flagsPanel
// //
this.flagsPanel.Controls.Add(this.flags); this.flagsPanel.Controls.Add(this.flags);
@ -569,6 +626,7 @@ namespace CodeImp.DoomBuilder.Controls
((System.ComponentModel.ISupportInitialize)(this.floortex)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.floortex)).EndInit();
this.flowLayoutPanel1.ResumeLayout(false); this.flowLayoutPanel1.ResumeLayout(false);
this.flagsPanel.ResumeLayout(false); this.flagsPanel.ResumeLayout(false);
this.triggerPanel.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
} }
@ -611,6 +669,11 @@ namespace CodeImp.DoomBuilder.Controls
private System.Windows.Forms.Label labelLight; private System.Windows.Forms.Label labelLight;
private System.Windows.Forms.GroupBox flagsPanel; private System.Windows.Forms.GroupBox flagsPanel;
private CodeImp.DoomBuilder.Controls.TransparentListView flags; private CodeImp.DoomBuilder.Controls.TransparentListView flags;
private System.Windows.Forms.GroupBox triggerPanel;
private System.Windows.Forms.Label triggertag;
private System.Windows.Forms.Label triggertaglabel;
private System.Windows.Forms.Label triggerer;
private System.Windows.Forms.Label triggererlabel;
private System.Windows.Forms.Label taglabel; private System.Windows.Forms.Label taglabel;
private System.Windows.Forms.Label effectlabel; private System.Windows.Forms.Label effectlabel;
private System.Windows.Forms.Label labelfloor; private System.Windows.Forms.Label labelfloor;

View file

@ -68,11 +68,11 @@ namespace CodeImp.DoomBuilder.Controls
int sheight = s.CeilHeight - s.FloorHeight; int sheight = s.CeilHeight - s.FloorHeight;
// Lookup effect description in config // Lookup effect description in config
string effectinfo = s.Effect + " - " + General.Map.Config.GetSectorEffectInfo(s.Effect).Title; //mxd //string effectinfo = s.Effect + " - " + General.Map.Config.GetSectorEffectInfo(s.Effect).Title; //mxd
// Sector info // Sector info
sectorinfo.Text = " Sector " + s.Index + " (" + (s.Sidedefs == null ? "no" : s.Sidedefs.Count.ToString()) + " sidedefs)"; //mxd sectorinfo.Text = " Sector " + s.Index + " (" + (s.Sidedefs == null ? "no" : s.Sidedefs.Count.ToString()) + " sidedefs)"; //mxd
effect.Text = effectinfo; effect.Text = s.Fields.GetValue("damagetype", "None"); // SRB2 hack
ceiling.Text = s.CeilHeight.ToString(); ceiling.Text = s.CeilHeight.ToString();
floor.Text = s.FloorHeight.ToString(); floor.Text = s.FloorHeight.ToString();
height.Text = sheight.ToString(); height.Text = sheight.ToString();
@ -99,8 +99,8 @@ namespace CodeImp.DoomBuilder.Controls
} }
//mxd //mxd
effect.Enabled = (s.Effect != 0); effect.Enabled = s.Fields.GetValue("damagetype", "None") != "None";
effectlabel.Enabled = (s.Effect != 0); effectlabel.Enabled = s.Fields.GetValue("damagetype", "None") != "None";
//mxd. Texture size //mxd. Texture size
if(s.LongFloorTexture == MapSet.EmptyLongName) if(s.LongFloorTexture == MapSet.EmptyLongName)
@ -345,8 +345,12 @@ namespace CodeImp.DoomBuilder.Controls
flagsPanel.Width = flags.Width + flags.Left * 2; flagsPanel.Width = flags.Width + flags.Left * 2;
} }
triggertag.Text = s.Fields.GetValue("triggertag", 0).ToString();
triggerer.Text = s.Fields.GetValue("triggerer", "Player");
triggerPanel.Visible = triggertag.Text != "0";
//mxd. Toggle visibility //mxd. Toggle visibility
foreach(Label label in floorinfolabels) label.Visible = showExtededFloorInfo; foreach (Label label in floorinfolabels) label.Visible = showExtededFloorInfo;
foreach(Label label in floorlabels) label.Visible = showExtededFloorInfo; foreach(Label label in floorlabels) label.Visible = showExtededFloorInfo;
foreach(Label label in ceilinfolabels) label.Visible = showExtededCeilingInfo; foreach(Label label in ceilinfolabels) label.Visible = showExtededCeilingInfo;
foreach(Label label in ceillabels) label.Visible = showExtededCeilingInfo; foreach(Label label in ceillabels) label.Visible = showExtededCeilingInfo;