From 3846f15d32933ecfbf4a9249a1e8b7336ae41e01 Mon Sep 17 00:00:00 2001 From: spherallic Date: Thu, 28 Dec 2023 15:16:34 +0100 Subject: [PATCH] Show light & fade alpha values in sector info panel --- .../Core/Controls/SectorInfoPanel.Designer.cs | 30 ++++++++++++++++--- Source/Core/Controls/SectorInfoPanel.cs | 8 ++++- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/Source/Core/Controls/SectorInfoPanel.Designer.cs b/Source/Core/Controls/SectorInfoPanel.Designer.cs index e2dd38f8..aecd7abe 100755 --- a/Source/Core/Controls/SectorInfoPanel.Designer.cs +++ b/Source/Core/Controls/SectorInfoPanel.Designer.cs @@ -47,6 +47,8 @@ namespace CodeImp.DoomBuilder.Controls this.panelLightColor = new System.Windows.Forms.Panel(); this.labelFade = new System.Windows.Forms.Label(); this.labelLight = new System.Windows.Forms.Label(); + this.lightalpha = new System.Windows.Forms.Label(); + this.fadealpha = new System.Windows.Forms.Label(); this.brightness = new System.Windows.Forms.Label(); this.height = new System.Windows.Forms.Label(); this.tag = new System.Windows.Forms.Label(); @@ -221,6 +223,8 @@ namespace CodeImp.DoomBuilder.Controls this.sectorinfo.Controls.Add(this.panelLightColor); this.sectorinfo.Controls.Add(this.labelFade); this.sectorinfo.Controls.Add(this.labelLight); + this.sectorinfo.Controls.Add(this.lightalpha); + this.sectorinfo.Controls.Add(this.fadealpha); this.sectorinfo.Controls.Add(this.brightness); this.sectorinfo.Controls.Add(label13); this.sectorinfo.Controls.Add(this.height); @@ -244,7 +248,7 @@ namespace CodeImp.DoomBuilder.Controls // panelFadeColor // this.panelFadeColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panelFadeColor.Location = new System.Drawing.Point(260, 50); + this.panelFadeColor.Location = new System.Drawing.Point(230, 50); this.panelFadeColor.Name = "panelFadeColor"; this.panelFadeColor.Size = new System.Drawing.Size(20, 12); this.panelFadeColor.TabIndex = 21; @@ -252,14 +256,14 @@ namespace CodeImp.DoomBuilder.Controls // panelLightColor // this.panelLightColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panelLightColor.Location = new System.Drawing.Point(260, 35); + this.panelLightColor.Location = new System.Drawing.Point(230, 35); this.panelLightColor.Name = "panelLightColor"; this.panelLightColor.Size = new System.Drawing.Size(20, 12); this.panelLightColor.TabIndex = 20; // // labelFade // - this.labelFade.Location = new System.Drawing.Point(183, 49); + this.labelFade.Location = new System.Drawing.Point(158, 49); this.labelFade.Name = "labelFade"; this.labelFade.Size = new System.Drawing.Size(70, 14); this.labelFade.TabIndex = 19; @@ -268,13 +272,29 @@ namespace CodeImp.DoomBuilder.Controls // // labelLight // - this.labelLight.Location = new System.Drawing.Point(183, 34); + this.labelLight.Location = new System.Drawing.Point(158, 34); this.labelLight.Name = "labelLight"; this.labelLight.Size = new System.Drawing.Size(70, 14); this.labelLight.TabIndex = 18; this.labelLight.Text = "Light:"; this.labelLight.TextAlign = System.Drawing.ContentAlignment.TopRight; // + // lightalpha + // + this.lightalpha.Location = new System.Drawing.Point(257, 34); + this.lightalpha.Name = "lightalpha"; + this.lightalpha.Size = new System.Drawing.Size(38, 14); + this.lightalpha.TabIndex = 18; + this.lightalpha.Text = "0"; + // + // fadealpha + // + this.fadealpha.Location = new System.Drawing.Point(257, 49); + this.fadealpha.Name = "fadealpha"; + this.fadealpha.Size = new System.Drawing.Size(38, 14); + this.fadealpha.TabIndex = 18; + this.fadealpha.Text = "0"; + // // brightness // this.brightness.Location = new System.Drawing.Point(257, 64); @@ -667,6 +687,8 @@ namespace CodeImp.DoomBuilder.Controls private System.Windows.Forms.Panel panelLightColor; private System.Windows.Forms.Label labelFade; private System.Windows.Forms.Label labelLight; + private System.Windows.Forms.Label lightalpha; + private System.Windows.Forms.Label fadealpha; private System.Windows.Forms.GroupBox flagsPanel; private CodeImp.DoomBuilder.Controls.TransparentListView flags; private System.Windows.Forms.GroupBox triggerPanel; diff --git a/Source/Core/Controls/SectorInfoPanel.cs b/Source/Core/Controls/SectorInfoPanel.cs index 60b63e45..b00fc5da 100755 --- a/Source/Core/Controls/SectorInfoPanel.cs +++ b/Source/Core/Controls/SectorInfoPanel.cs @@ -162,8 +162,14 @@ namespace CodeImp.DoomBuilder.Controls labelFade.Enabled = false; } + lightalpha.Text = s.Fields.GetValue("lightalpha", General.Map.Config.MaxColormapAlpha).ToString(); + fadealpha.Text = s.Fields.GetValue("fadealpha", General.Map.Config.MaxColormapAlpha).ToString(); + + lightalpha.Enabled = s.Fields.ContainsKey("lightalpha"); + fadealpha.Enabled = s.Fields.ContainsKey("fadealpha"); + //light - if(s.Fields.ContainsKey("lightceiling") || s.Fields.ContainsKey("lightceilingabsolute")) + if (s.Fields.ContainsKey("lightceiling") || s.Fields.ContainsKey("lightceilingabsolute")) { showExtededCeilingInfo = true; ceilingLight.Enabled = true;