mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2025-01-31 05:00:34 +00:00
Display parameter and flags value (labels) in the Thing info panel, make parameter values easier to edit, update the 2.2 config.
This commit is contained in:
parent
09581306be
commit
88fbbaac2e
7 changed files with 160 additions and 49 deletions
|
@ -3465,6 +3465,7 @@ thingtypes
|
|||
width = 8;
|
||||
height = 28;
|
||||
angletext = "Jump strength";
|
||||
fixedrotation = 1;
|
||||
}
|
||||
103
|
||||
{
|
||||
|
@ -3503,6 +3504,7 @@ thingtypes
|
|||
width = 12;
|
||||
height = 64;
|
||||
angletext = "Firing delay";
|
||||
fixedrotation = 1;
|
||||
}
|
||||
122
|
||||
{
|
||||
|
@ -3843,6 +3845,7 @@ thingtypes
|
|||
height = 16;
|
||||
sprite = "internal:capsule";
|
||||
angletext = "Tag";
|
||||
fixedrotation = 1;
|
||||
}
|
||||
292
|
||||
{
|
||||
|
@ -3853,6 +3856,7 @@ thingtypes
|
|||
flags8text = "[8] Sea Egg shooting point";
|
||||
sprite = "internal:eggmanway";
|
||||
angletext = "No. (Sea Egg)";
|
||||
fixedrotation = 1;
|
||||
flagsvaluetext = "No. (Brak)";
|
||||
parametertext = "Next";
|
||||
}
|
||||
|
@ -4058,6 +4062,7 @@ thingtypes
|
|||
flags8height = 24;
|
||||
flags8text = "[8] Float";
|
||||
angletext = "Tag";
|
||||
fixedrotation = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4072,6 +4077,7 @@ thingtypes
|
|||
flags4text = "[4] Random (Strong)";
|
||||
flags8text = "[8] Random (Weak)";
|
||||
angletext = "Tag";
|
||||
fixedrotation = 1;
|
||||
|
||||
400
|
||||
{
|
||||
|
@ -4203,6 +4209,7 @@ thingtypes
|
|||
height = 44;
|
||||
flags1text = "[1] Run linedef executor on pop";
|
||||
angletext = "Tag";
|
||||
fixedrotation = 1;
|
||||
|
||||
431
|
||||
{
|
||||
|
@ -4300,6 +4307,7 @@ thingtypes
|
|||
height = 128;
|
||||
flags4text = "[4] Respawn at center";
|
||||
angletext = "Angle/Order";
|
||||
fixedrotation = 1;
|
||||
parametertext = "Order";
|
||||
}
|
||||
520
|
||||
|
@ -4331,7 +4339,7 @@ thingtypes
|
|||
flags1text = "[1] Start retracted";
|
||||
flags4text = "[4] Retractable";
|
||||
flags8text = "[8] Intangible";
|
||||
parametertext = "Initial delay";
|
||||
parametertext = "Start delay";
|
||||
}
|
||||
523
|
||||
{
|
||||
|
@ -4343,7 +4351,8 @@ thingtypes
|
|||
flags4text = "[4] Retractable";
|
||||
flags8text = "[8] Intangible";
|
||||
angletext = "Retraction interval";
|
||||
parametertext = "Initial delay";
|
||||
fixedrotation = 1;
|
||||
parametertext = "Start delay";
|
||||
}
|
||||
1130
|
||||
{
|
||||
|
@ -4392,6 +4401,7 @@ thingtypes
|
|||
flags4text = "[4] Invisible";
|
||||
flags8text = "[8] No distance check";
|
||||
angletext = "Lift height";
|
||||
fixedrotation = 1;
|
||||
}
|
||||
541
|
||||
{
|
||||
|
@ -4407,6 +4417,7 @@ thingtypes
|
|||
width = 32;
|
||||
height = 64;
|
||||
angletext = "Strength";
|
||||
fixedrotation = 1;
|
||||
}
|
||||
543
|
||||
{
|
||||
|
@ -4416,6 +4427,7 @@ thingtypes
|
|||
height = 64;
|
||||
flags8text = "[8] Respawn";
|
||||
angletext = "Color";
|
||||
fixedrotation = 1;
|
||||
}
|
||||
550
|
||||
{
|
||||
|
@ -4689,6 +4701,7 @@ thingtypes
|
|||
title = "Slope Vertex";
|
||||
sprite = "internal:vertexslope";
|
||||
angletext = "Tag";
|
||||
fixedrotation = 1;
|
||||
}
|
||||
|
||||
751
|
||||
|
@ -4710,6 +4723,7 @@ thingtypes
|
|||
title = "Zoom Tube Waypoint";
|
||||
sprite = "internal:zoom";
|
||||
angletext = "Order";
|
||||
fixedrotation = 1;
|
||||
}
|
||||
|
||||
754
|
||||
|
@ -4719,6 +4733,7 @@ thingtypes
|
|||
flags8text = "[8] Push using XYZ";
|
||||
sprite = "GWLGA0";
|
||||
angletext = "Radius";
|
||||
fixedrotation = 1;
|
||||
}
|
||||
755
|
||||
{
|
||||
|
@ -4727,6 +4742,7 @@ thingtypes
|
|||
flags8text = "[8] Pull using XYZ";
|
||||
sprite = "GWLRA0";
|
||||
angletext = "Radius";
|
||||
fixedrotation = 1;
|
||||
}
|
||||
756
|
||||
{
|
||||
|
@ -4735,6 +4751,7 @@ thingtypes
|
|||
width = 32;
|
||||
height = 16;
|
||||
angletext = "Tag";
|
||||
fixedrotation = 1;
|
||||
}
|
||||
757
|
||||
{
|
||||
|
@ -4743,6 +4760,7 @@ thingtypes
|
|||
width = 8;
|
||||
height = 16;
|
||||
angletext = "Tag";
|
||||
fixedrotation = 1;
|
||||
}
|
||||
758
|
||||
{
|
||||
|
@ -4754,6 +4772,7 @@ thingtypes
|
|||
title = "PolyObject Anchor";
|
||||
sprite = "internal:polyanchor";
|
||||
angletext = "ID";
|
||||
fixedrotation = 1;
|
||||
}
|
||||
|
||||
761
|
||||
|
@ -4761,6 +4780,7 @@ thingtypes
|
|||
title = "PolyObject Spawn Point";
|
||||
sprite = "internal:polycenter";
|
||||
angletext = "ID";
|
||||
fixedrotation = 1;
|
||||
}
|
||||
|
||||
762
|
||||
|
@ -4768,6 +4788,7 @@ thingtypes
|
|||
title = "PolyObject Spawn Point (Crush)";
|
||||
sprite = "internal:polycentercrush";
|
||||
angletext = "ID";
|
||||
fixedrotation = 1;
|
||||
}
|
||||
780
|
||||
{
|
||||
|
@ -4775,6 +4796,7 @@ thingtypes
|
|||
sprite = "internal:skyb";
|
||||
flags4text = "[4] In-map centerpoint";
|
||||
parametertext = "ID";
|
||||
fixedrotation = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4969,6 +4991,7 @@ thingtypes
|
|||
height = 16;
|
||||
hangs = 1;
|
||||
angletext = "Dripping interval";
|
||||
fixedrotation = 1;
|
||||
}
|
||||
1003
|
||||
{
|
||||
|
@ -5110,6 +5133,8 @@ thingtypes
|
|||
flags4text = "[4] No sounds";
|
||||
flags8text = "[8] Double size";
|
||||
angletext = "Tag";
|
||||
parametertext = "Spokes";
|
||||
fixedrotation = 1;
|
||||
}
|
||||
1105
|
||||
{
|
||||
|
@ -5120,6 +5145,8 @@ thingtypes
|
|||
flags4text = "[4] No sounds";
|
||||
flags8text = "[8] Double size";
|
||||
angletext = "Tag";
|
||||
parametertext = "Spokes";
|
||||
fixedrotation = 1;
|
||||
}
|
||||
1106
|
||||
{
|
||||
|
@ -5130,6 +5157,8 @@ thingtypes
|
|||
flags4text = "[4] No sounds";
|
||||
flags8text = "[8] Red spring";
|
||||
angletext = "Tag";
|
||||
parametertext = "Spokes";
|
||||
fixedrotation = 1;
|
||||
}
|
||||
1107
|
||||
{
|
||||
|
@ -5139,6 +5168,8 @@ thingtypes
|
|||
height = 34;
|
||||
flags8text = "[8] Double size";
|
||||
angletext = "Tag";
|
||||
parametertext = "Spokes";
|
||||
fixedrotation = 1;
|
||||
}
|
||||
1108
|
||||
{
|
||||
|
@ -5158,6 +5189,8 @@ thingtypes
|
|||
flags4text = "[4] No sounds";
|
||||
flags8text = "[8] Double size";
|
||||
angletext = "Tag";
|
||||
parametertext = "Spokes";
|
||||
fixedrotation = 1;
|
||||
}
|
||||
1110
|
||||
{
|
||||
|
@ -5167,6 +5200,8 @@ thingtypes
|
|||
height = 34;
|
||||
flags4text = "[4] No sounds";
|
||||
angletext = "Tag";
|
||||
parametertext = "Spokes";
|
||||
fixedrotation = 1;
|
||||
}
|
||||
1111
|
||||
{
|
||||
|
@ -5344,6 +5379,7 @@ thingtypes
|
|||
width = 8;
|
||||
height = 16;
|
||||
angletext = "Tag";
|
||||
fixedrotation = 1;
|
||||
}
|
||||
1203
|
||||
{
|
||||
|
@ -5539,6 +5575,7 @@ thingtypes
|
|||
height = 40;
|
||||
flags8text = "[8] Waves vertically";
|
||||
angletext = "On/Off time";
|
||||
fixedrotation = 1;
|
||||
parametertext = "Strength";
|
||||
}
|
||||
1301
|
||||
|
@ -5549,6 +5586,7 @@ thingtypes
|
|||
height = 40;
|
||||
flags8text = "[8] Shoot downwards";
|
||||
angletext = "On/Off time";
|
||||
fixedrotation = 1;
|
||||
parametertext = "Strength";
|
||||
}
|
||||
1302
|
||||
|
@ -5572,6 +5610,7 @@ thingtypes
|
|||
width = 30;
|
||||
height = 32;
|
||||
angletext = "Initial delay";
|
||||
fixedrotation = 1;
|
||||
flags8text = "[8] Double size";
|
||||
}
|
||||
1305
|
||||
|
@ -5973,6 +6012,7 @@ thingtypes
|
|||
width = 8;
|
||||
height = 4096;
|
||||
sprite = "UNKNA0";
|
||||
fixedrotation = 1;
|
||||
|
||||
1700
|
||||
{
|
||||
|
@ -6031,6 +6071,7 @@ thingtypes
|
|||
flags4text = "[4] Align player to top";
|
||||
flags8text = "[8] Die upon time up";
|
||||
angletext = "Time limit";
|
||||
fixedrotation = 1;
|
||||
parametertext = "Height";
|
||||
}
|
||||
1704
|
||||
|
@ -6043,6 +6084,7 @@ thingtypes
|
|||
unflippable = true;
|
||||
flagsvaluetext = "Pitch";
|
||||
angletext = "Yaw";
|
||||
fixedrotation = 1;
|
||||
}
|
||||
1705
|
||||
{
|
||||
|
@ -6055,6 +6097,7 @@ thingtypes
|
|||
centerHitbox = true;
|
||||
flagsvaluetext = "Height";
|
||||
angletext = "Pitch/Yaw";
|
||||
fixedrotation = 1;
|
||||
}
|
||||
1706
|
||||
{
|
||||
|
@ -6176,6 +6219,7 @@ thingtypes
|
|||
width = 8;
|
||||
height = 16;
|
||||
angletext = "Jump strength";
|
||||
fixedrotation = 1;
|
||||
}
|
||||
1806
|
||||
{
|
||||
|
@ -6408,6 +6452,7 @@ thingtypes
|
|||
width = 18;
|
||||
height = 28;
|
||||
angletext = "Initial delay";
|
||||
fixedrotation = 1;
|
||||
}
|
||||
2001
|
||||
{
|
||||
|
@ -6544,6 +6589,7 @@ thingtypes
|
|||
flags4text = "[4] No movement";
|
||||
flags8text = "[8] Hop";
|
||||
angletext = "Radius";
|
||||
fixedrotation = 1;
|
||||
|
||||
2200
|
||||
{
|
||||
|
|
|
@ -54,6 +54,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
public bool AllowDecimal { get { return textbox.AllowDecimal; } set { textbox.AllowDecimal = value; UpdateButtonsTooltip(); } }
|
||||
public bool AllowNegative { get { return textbox.AllowNegative; } set { textbox.AllowNegative = value; } }
|
||||
public bool AllowRelative { get { return textbox.AllowRelative; } set { textbox.AllowRelative = value; } }
|
||||
public int MaximumValue { get { return textbox.MaximumValue; } set { textbox.MaximumValue = value; } }
|
||||
public int ButtonStep { get { return stepsize; } set { stepsize = value; } }
|
||||
public float ButtonStepFloat { get { return stepsizeFloat; } set { stepsizeFloat = value; } } //mxd. This is used when AllowDecimal is true
|
||||
public float ButtonStepBig { get { return stepsizeBig; } set { stepsizeBig = value; } } //mxd
|
||||
|
|
|
@ -36,7 +36,8 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
|
||||
private bool allownegative; // Allow negative numbers
|
||||
private bool allowrelative; // Allow ++, --, * and / prefix for relative changes
|
||||
private bool allowdecimal; // Allow decimal (float) numbers
|
||||
private bool allowdecimal; // Allow decimal (float) numbers
|
||||
private int maximumvalue = System.Int32.MaxValue;
|
||||
private bool controlpressed;
|
||||
private int incrementstep; //mxd. Step for +++ and --- prefixes
|
||||
private readonly ToolTip tooltip; //mxd
|
||||
|
@ -48,6 +49,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
public bool AllowNegative { get { return allownegative; } set { allownegative = value; } }
|
||||
public bool AllowRelative { get { return allowrelative; } set { allowrelative = value; UpdateTextboxStyle(); } }
|
||||
public bool AllowDecimal { get { return allowdecimal; } set { allowdecimal = value; } }
|
||||
public int MaximumValue { get { return maximumvalue; } set { maximumvalue = value; } }
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -227,7 +229,9 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
{
|
||||
// Add number to original
|
||||
int.TryParse(textpart, out result);
|
||||
return original + result * step;
|
||||
int newvalue = original + result * step;
|
||||
if (newvalue > maximumvalue) newvalue = maximumvalue;
|
||||
return newvalue;
|
||||
}
|
||||
//mxd. Prefixed with ---?
|
||||
if(this.Text.StartsWith("---"))
|
||||
|
@ -235,7 +239,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
// Subtract number from original
|
||||
int.TryParse(textpart, out result);
|
||||
int newvalue = original - result * step;
|
||||
if(!allownegative && (newvalue < 0)) newvalue = 0;
|
||||
if (!allownegative && (newvalue < 0)) newvalue = 0;
|
||||
return newvalue;
|
||||
}
|
||||
// Prefixed with ++?
|
||||
|
@ -243,7 +247,9 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
{
|
||||
// Add number to original
|
||||
int.TryParse(textpart, out result);
|
||||
return original + result;
|
||||
int newvalue = original + result;
|
||||
if (newvalue > maximumvalue) newvalue = maximumvalue;
|
||||
return newvalue;
|
||||
}
|
||||
// Prefixed with --?
|
||||
if(this.Text.StartsWith("--"))
|
||||
|
@ -251,7 +257,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
// Subtract number from original
|
||||
int.TryParse(textpart, out result);
|
||||
int newvalue = original - result;
|
||||
if(!allownegative && (newvalue < 0)) newvalue = 0;
|
||||
if (!allownegative && (newvalue < 0)) newvalue = 0;
|
||||
return newvalue;
|
||||
}
|
||||
//mxd. Prefixed with *?
|
||||
|
@ -261,7 +267,8 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
float resultf;
|
||||
float.TryParse(textpart, NumberStyles.Float, CultureInfo.CurrentCulture, out resultf);
|
||||
int newvalue = (int)Math.Round(original * resultf);
|
||||
if(!allownegative && (newvalue < 0)) newvalue = 0;
|
||||
if (newvalue > maximumvalue) newvalue = maximumvalue;
|
||||
if (!allownegative && (newvalue < 0)) newvalue = 0;
|
||||
return newvalue;
|
||||
}
|
||||
//mxd. Prefixed with /?
|
||||
|
@ -272,13 +279,15 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
float.TryParse(textpart, NumberStyles.Float, CultureInfo.CurrentCulture, out resultf);
|
||||
if(resultf == 0) return original;
|
||||
int newvalue = (int)Math.Round(original / resultf);
|
||||
if(!allownegative && (newvalue < 0)) newvalue = 0;
|
||||
if (newvalue > maximumvalue) newvalue = maximumvalue;
|
||||
if (!allownegative && (newvalue < 0)) newvalue = 0;
|
||||
return newvalue;
|
||||
}
|
||||
|
||||
//mxd. Return the new value
|
||||
if(!int.TryParse(this.Text, out result)) return original;
|
||||
if(!allownegative && (result < 0)) return 0;
|
||||
if (result > maximumvalue) return maximumvalue;
|
||||
if (!allownegative && (result < 0)) return 0;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
11
Source/Core/Controls/ThingBrowserControl.Designer.cs
generated
11
Source/Core/Controls/ThingBrowserControl.Designer.cs
generated
|
@ -50,7 +50,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
this.typelist = new CodeImp.DoomBuilder.GZBuilder.Controls.MultiSelectTreeview();
|
||||
this.spritetex = new CodeImp.DoomBuilder.Controls.ConfigurablePictureBox();
|
||||
this.typeid = new CodeImp.DoomBuilder.Controls.NumericTextbox();
|
||||
this.parameterid = new CodeImp.DoomBuilder.Controls.NumericTextbox();
|
||||
this.parameterid = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
|
||||
this.fulltypecaption = new System.Windows.Forms.Label();
|
||||
this.fulltypelabel = new System.Windows.Forms.Label();
|
||||
this.infopanel.SuspendLayout();
|
||||
|
@ -101,7 +101,6 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
this.parametercaption.Size = new System.Drawing.Size(60, 13);
|
||||
this.parametercaption.TabIndex = 10;
|
||||
this.parametercaption.Text = "Parameter:";
|
||||
this.parametercaption.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// sizelabel
|
||||
//
|
||||
|
@ -316,14 +315,16 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
//
|
||||
this.parameterid.AllowDecimal = false;
|
||||
this.parameterid.AllowNegative = false;
|
||||
this.parameterid.AllowRelative = false;
|
||||
this.parameterid.AllowRelative = true;
|
||||
this.parameterid.ButtonStep = 1;
|
||||
this.parameterid.MaximumValue = 15;
|
||||
this.parameterid.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
this.parameterid.ImeMode = System.Windows.Forms.ImeMode.Off;
|
||||
this.parameterid.Location = new System.Drawing.Point(66, 24);
|
||||
this.parameterid.Name = "parameterid";
|
||||
this.parameterid.Size = new System.Drawing.Size(68, 20);
|
||||
this.parameterid.TabIndex = 2;
|
||||
this.parameterid.TextChanged += new System.EventHandler(this.parameterid_TextChanged);
|
||||
this.parameterid.WhenTextChanged += new System.EventHandler(this.parameterid_WhenTextChanged);
|
||||
//
|
||||
// fulltypecaption
|
||||
//
|
||||
|
@ -370,7 +371,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
private System.Windows.Forms.Label blockinglabel;
|
||||
private System.Windows.Forms.Label positionlabel;
|
||||
private NumericTextbox typeid;
|
||||
private NumericTextbox parameterid;
|
||||
private ButtonsNumericTextbox parameterid;
|
||||
private System.Windows.Forms.ImageList thingimages;
|
||||
private System.Windows.Forms.Panel infopanel;
|
||||
private System.Windows.Forms.Label sizecaption;
|
||||
|
|
|
@ -365,7 +365,12 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
default: blockinglabel.Text = "Unknown"; break;
|
||||
}
|
||||
|
||||
// Parameter
|
||||
parametercaption.Text = thinginfo.ParameterText + ":";
|
||||
var g = CreateGraphics();
|
||||
int offset = 2 + (int)g.MeasureString(parametercaption.Text, parametercaption.Font).Width;
|
||||
parametercaption.Location = new System.Drawing.Point(Math.Max(60 - offset, 0), 27);
|
||||
parametercaption.Size = new System.Drawing.Size(offset, 13);
|
||||
}
|
||||
|
||||
if(doupdatenode)
|
||||
|
@ -426,7 +431,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
}
|
||||
|
||||
//Parameter changed
|
||||
private void parameterid_TextChanged(object sender, EventArgs e)
|
||||
private void parameterid_WhenTextChanged(object sender, EventArgs e)
|
||||
{
|
||||
fulltypelabel.Text = GetFullType(0).ToString();
|
||||
|
||||
|
|
66
Source/Core/Controls/ThingInfoPanel.Designer.cs
generated
66
Source/Core/Controls/ThingInfoPanel.Designer.cs
generated
|
@ -28,8 +28,6 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.Windows.Forms.Label label5;
|
||||
System.Windows.Forms.Label label4;
|
||||
System.Windows.Forms.Label label3;
|
||||
System.Windows.Forms.Label label1;
|
||||
this.labelaction = new System.Windows.Forms.Label();
|
||||
|
@ -62,8 +60,10 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
this.spritetex = new CodeImp.DoomBuilder.Controls.ConfigurablePictureBox();
|
||||
this.flagsPanel = new System.Windows.Forms.GroupBox();
|
||||
this.flags = new System.Windows.Forms.ListView();
|
||||
label5 = new System.Windows.Forms.Label();
|
||||
label4 = new System.Windows.Forms.Label();
|
||||
this.flagsvaluelabel = new System.Windows.Forms.Label();
|
||||
this.flagsvalue = new System.Windows.Forms.Label();
|
||||
this.labelangle = new System.Windows.Forms.Label();
|
||||
this.labeltag = new System.Windows.Forms.Label();
|
||||
label3 = new System.Windows.Forms.Label();
|
||||
label1 = new System.Windows.Forms.Label();
|
||||
this.infopanel.SuspendLayout();
|
||||
|
@ -73,23 +73,23 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
this.flagsPanel.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label5
|
||||
// labelangle
|
||||
//
|
||||
label5.AutoSize = true;
|
||||
label5.Location = new System.Drawing.Point(165, 79);
|
||||
label5.Name = "label5";
|
||||
label5.Size = new System.Drawing.Size(37, 13);
|
||||
label5.TabIndex = 8;
|
||||
label5.Text = "Angle:";
|
||||
this.labelangle.AutoSize = true;
|
||||
this.labelangle.Location = new System.Drawing.Point(165, 79);
|
||||
this.labelangle.Name = "labelangle";
|
||||
this.labelangle.Size = new System.Drawing.Size(40, 13);
|
||||
this.labelangle.TabIndex = 8;
|
||||
this.labelangle.Text = "Angle:";
|
||||
//
|
||||
// label4
|
||||
// labeltag
|
||||
//
|
||||
label4.AutoSize = true;
|
||||
label4.Location = new System.Drawing.Point(31, 79);
|
||||
label4.Name = "label4";
|
||||
label4.Size = new System.Drawing.Size(29, 13);
|
||||
label4.TabIndex = 4;
|
||||
label4.Text = "Tag:";
|
||||
this.labeltag.AutoSize = true;
|
||||
this.labeltag.Location = new System.Drawing.Point(31, 79);
|
||||
this.labeltag.Name = "labeltag";
|
||||
this.labeltag.Size = new System.Drawing.Size(29, 13);
|
||||
this.labeltag.TabIndex = 4;
|
||||
this.labeltag.Text = "Tag:";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
|
@ -145,12 +145,12 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
this.infopanel.Controls.Add(this.arg2);
|
||||
this.infopanel.Controls.Add(this.arg1);
|
||||
this.infopanel.Controls.Add(this.angle);
|
||||
this.infopanel.Controls.Add(label5);
|
||||
this.infopanel.Controls.Add(this.labelangle);
|
||||
this.infopanel.Controls.Add(this.tag);
|
||||
this.infopanel.Controls.Add(this.position);
|
||||
this.infopanel.Controls.Add(this.action);
|
||||
this.infopanel.Controls.Add(this.fulltype);
|
||||
this.infopanel.Controls.Add(label4);
|
||||
this.infopanel.Controls.Add(this.labeltag);
|
||||
this.infopanel.Controls.Add(label3);
|
||||
this.infopanel.Controls.Add(this.labelaction);
|
||||
this.infopanel.Controls.Add(this.labelfulltype);
|
||||
|
@ -412,6 +412,8 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
// flagsPanel
|
||||
//
|
||||
this.flagsPanel.Controls.Add(this.flags);
|
||||
this.flagsPanel.Controls.Add(this.flagsvalue);
|
||||
this.flagsPanel.Controls.Add(this.flagsvaluelabel);
|
||||
this.flagsPanel.Location = new System.Drawing.Point(571, 0);
|
||||
this.flagsPanel.Name = "flagsPanel";
|
||||
this.flagsPanel.Size = new System.Drawing.Size(568, 100);
|
||||
|
@ -434,6 +436,24 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
this.flags.UseCompatibleStateImageBehavior = false;
|
||||
this.flags.View = System.Windows.Forms.View.List;
|
||||
//
|
||||
// flagsvalue
|
||||
//
|
||||
this.flagsvalue.AutoSize = true;
|
||||
this.flagsvalue.Location = new System.Drawing.Point(70, 80);
|
||||
this.flagsvalue.Name = "flagsvalue";
|
||||
this.flagsvalue.Size = new System.Drawing.Size(32, 13);
|
||||
this.flagsvalue.TabIndex = 0;
|
||||
this.flagsvalue.Text = "0";
|
||||
//
|
||||
// flagsvaluelabel
|
||||
//
|
||||
this.flagsvaluelabel.AutoSize = true;
|
||||
this.flagsvaluelabel.Location = new System.Drawing.Point(6, 80);
|
||||
this.flagsvaluelabel.Name = "flagsvaluelabel";
|
||||
this.flagsvaluelabel.Size = new System.Drawing.Size(60, 13);
|
||||
this.flagsvaluelabel.TabIndex = 0;
|
||||
this.flagsvaluelabel.Text = "Flags value:";
|
||||
//
|
||||
// ThingInfoPanel
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||
|
@ -479,7 +499,11 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
private System.Windows.Forms.GroupBox infopanel;
|
||||
private System.Windows.Forms.GroupBox flagsPanel;
|
||||
private System.Windows.Forms.ListView flags;
|
||||
private System.Windows.Forms.Label labelaction;
|
||||
private System.Windows.Forms.Label flagsvalue;
|
||||
private System.Windows.Forms.Label flagsvaluelabel;
|
||||
private System.Windows.Forms.Label labelangle;
|
||||
private System.Windows.Forms.Label labeltag;
|
||||
private System.Windows.Forms.Label labelaction;
|
||||
private System.Windows.Forms.Label labelfulltype;
|
||||
private CodeImp.DoomBuilder.GZBuilder.Controls.AngleControl anglecontrol;
|
||||
private ConfigurablePictureBox spritetex;
|
||||
|
|
|
@ -105,20 +105,35 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
type.Text = t.SRB2Type + " - " + ti.Title;
|
||||
if(ti.IsObsolete) type.Text += " - OBSOLETE"; //mxd
|
||||
action.Text = actioninfo;
|
||||
labelclass.Visible = !General.Map.SRB2;
|
||||
classname.Visible = !General.Map.SRB2;
|
||||
labelparameter.Enabled = General.Map.SRB2;
|
||||
parameter.Enabled = General.Map.SRB2;
|
||||
labelparameter.Visible = General.Map.SRB2;
|
||||
parameter.Visible = General.Map.SRB2;
|
||||
bool displayclassname = !General.Map.SRB2 && !string.IsNullOrEmpty(ti.ClassName) && !ti.ClassName.StartsWith("$"); //mxd
|
||||
labelclass.Enabled = displayclassname; //mxd
|
||||
classname.Enabled = displayclassname; //mxd
|
||||
|
||||
classname.Visible = labelclass.Visible = !General.Map.SRB2;
|
||||
parameter.Enabled = labelparameter.Enabled = General.Map.SRB2;
|
||||
parameter.Visible = labelparameter.Visible = General.Map.SRB2;
|
||||
parameter.Text = t.Parameter.ToString(CultureInfo.InvariantCulture);
|
||||
|
||||
bool displayclassname = !General.Map.SRB2 && !string.IsNullOrEmpty(ti.ClassName) && !ti.ClassName.StartsWith("$"); //mxd
|
||||
labelclass.Enabled = classname.Enabled = displayclassname; //mxd
|
||||
classname.Text = (displayclassname ? ti.ClassName : "--"); //mxd
|
||||
parameter.Text = t.Parameter.ToString(CultureInfo.InvariantCulture);
|
||||
|
||||
fulltype.Text = t.FullType.ToString(CultureInfo.InvariantCulture);
|
||||
position.Text = t.Position.x.ToString(CultureInfo.InvariantCulture) + ", " + t.Position.y.ToString(CultureInfo.InvariantCulture) + ", " + zinfo;
|
||||
|
||||
tag.Text = t.Tag + (General.Map.Options.TagLabels.ContainsKey(t.Tag) ? " - " + General.Map.Options.TagLabels[t.Tag] : string.Empty);
|
||||
tag.Enabled = labeltag.Enabled = !General.Map.SRB2;
|
||||
|
||||
if (General.Map.SRB2)
|
||||
{
|
||||
labelangle.Text = ((ti == null) ? "Angle" : ti.AngleText) + ":";
|
||||
labelparameter.Text = ((ti == null) ? "Parameter" : ti.ParameterText) + ":";
|
||||
var g = CreateGraphics();
|
||||
int offset = Math.Max(40, (int)g.MeasureString(labelangle.Text, labelangle.Font).Width);
|
||||
labelangle.Location = new System.Drawing.Point(205 - offset, 79);
|
||||
labelangle.Size = new System.Drawing.Size(offset, 13);
|
||||
offset = 2 + (int)g.MeasureString(labelparameter.Text, labelparameter.Font).Width;
|
||||
labelparameter.Location = new System.Drawing.Point(Math.Max(60 - offset, 0), 34);
|
||||
labelparameter.Size = new System.Drawing.Size(offset, 34);
|
||||
}
|
||||
|
||||
angle.Text = t.AngleDoom + "\u00B0";
|
||||
anglecontrol.Angle = t.AngleDoom;
|
||||
anglecontrol.Left = angle.Right + 1;
|
||||
|
@ -211,14 +226,24 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
flags.Items.Add(new ListViewItem(group.Value) { Checked = true });
|
||||
}
|
||||
|
||||
// Display flags value
|
||||
if (General.Map.SRB2)
|
||||
{
|
||||
flagsvaluelabel.Text = (ti == null) ? "Flags value:" : ti.FlagsValueText + ":";
|
||||
flagsvaluelabel.BringToFront();
|
||||
flagsvalue.Text = t.GetFlagsValue().ToString();
|
||||
flagsvalue.BringToFront();
|
||||
flagsvalue.Enabled = flagsvaluelabel.Enabled = !(flagsvaluelabel.Text == "Flags value:");
|
||||
}
|
||||
|
||||
//mxd. Flags panel visibility and size
|
||||
flagsPanel.Visible = (flags.Items.Count > 0);
|
||||
if(flags.Items.Count > 0)
|
||||
if (flags.Items.Count > 0)
|
||||
{
|
||||
flags.Width = flags.GetItemRect(0).Width * (int)Math.Ceiling(flags.Items.Count / 4.0f);
|
||||
flagsPanel.Width = flags.Width + flags.Left * 2;
|
||||
}
|
||||
|
||||
|
||||
// Show the whole thing
|
||||
this.Show();
|
||||
this.Update();
|
||||
|
|
Loading…
Reference in a new issue