Double-hijack linedef info panel to show executor delay

This commit is contained in:
spherallic 2023-07-05 13:47:52 +02:00
parent 841b2e9658
commit 6fff1e5784

View file

@ -120,28 +120,34 @@ namespace CodeImp.DoomBuilder.Controls
if(General.Map.UDMF) if(General.Map.UDMF)
{ {
// Hijack activation labels to show lock numer... // Hijack activation labels to show lock numer...
activationlabel.Text = "Lock:"; // For SRB2, hijack to show executor delay
activationlabel.Text = "Exec. delay:";
activationlabel.Visible = true; activationlabel.Visible = true;
activation.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) if(locknum != 0)
{ {
activationlabel.Enabled = true; activationlabel.Enabled = true;
activation.Enabled = true; activation.Enabled = true;
if(General.Map.Config.Enums.ContainsKey("keys"))
{ //if(General.Map.Config.Enums.ContainsKey("keys"))
foreach(EnumItem item in General.Map.Config.Enums["keys"]) //{
{ // foreach(EnumItem item in General.Map.Config.Enums["keys"])
if(item.GetIntValue() == locknum) // {
{ // if(item.GetIntValue() == locknum)
activation.Text = locknum + " - " + item.Title; // {
break; // activation.Text = locknum + " - " + item.Title;
} // break;
} // }
} // }
else //}
//else
{ {
activation.Text = locknum.ToString(); activation.Text = locknum.ToString();
} }