From 6fff1e5784db2af0aa15ee65b204b18ff64a5b46 Mon Sep 17 00:00:00 2001 From: spherallic Date: Wed, 5 Jul 2023 13:47:52 +0200 Subject: [PATCH] Double-hijack linedef info panel to show executor delay --- Source/Core/Controls/LinedefInfoPanel.cs | 34 ++++++++++++++---------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/Source/Core/Controls/LinedefInfoPanel.cs b/Source/Core/Controls/LinedefInfoPanel.cs index 861a100f..b3880096 100755 --- a/Source/Core/Controls/LinedefInfoPanel.cs +++ b/Source/Core/Controls/LinedefInfoPanel.cs @@ -120,28 +120,34 @@ namespace CodeImp.DoomBuilder.Controls if(General.Map.UDMF) { // Hijack activation labels to show lock numer... - activationlabel.Text = "Lock:"; + // For SRB2, hijack to show executor delay + activationlabel.Text = "Exec. delay:"; activationlabel.Visible = true; activation.Visible = true; - int locknum = l.Fields.GetValue("locknumber", 0); + activationlabel.Size = new Size(100, 14); + activationlabel.Location = new Point(78, 34); + activation.Location = new Point(180, 34); + + int locknum = l.Fields.GetValue("executordelay", 0); if(locknum != 0) { activationlabel.Enabled = true; activation.Enabled = true; - if(General.Map.Config.Enums.ContainsKey("keys")) - { - foreach(EnumItem item in General.Map.Config.Enums["keys"]) - { - if(item.GetIntValue() == locknum) - { - activation.Text = locknum + " - " + item.Title; - break; - } - } - } - else + + //if(General.Map.Config.Enums.ContainsKey("keys")) + //{ + // foreach(EnumItem item in General.Map.Config.Enums["keys"]) + // { + // if(item.GetIntValue() == locknum) + // { + // activation.Text = locknum + " - " + item.Title; + // break; + // } + // } + //} + //else { activation.Text = locknum.ToString(); }