mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-31 04:40:55 +00:00
Z-height of a thing can now be changed in absolute and relative mode in Thing Edit form.
Lower and Upper portal icons were swapped.
This commit is contained in:
parent
df9c61bd95
commit
9e6cd07adc
5 changed files with 654 additions and 645 deletions
Binary file not shown.
Before Width: | Height: | Size: 337 B After Width: | Height: | Size: 360 B |
Binary file not shown.
Before Width: | Height: | Size: 360 B After Width: | Height: | Size: 337 B |
1239
Source/Core/Windows/ThingEditForm.Designer.cs
generated
1239
Source/Core/Windows/ThingEditForm.Designer.cs
generated
File diff suppressed because it is too large
Load diff
|
@ -47,8 +47,10 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
private ThingTypeInfo thinginfo;
|
||||
private bool preventchanges = false;
|
||||
//mxd
|
||||
private Vector2D initialPosition; //initial position of a thing used to fill posX and posY fields
|
||||
|
||||
private Vector3D initialPosition; //initial position of a thing used to fill posX, posY and posZ fields
|
||||
private int initialFloorHeight; //floor height of the sector first thing is in
|
||||
private static bool ABSOLUTE_HEIGHT;
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Properties
|
||||
|
@ -86,8 +88,9 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
tabs.TabPages.Remove(tabeffects);
|
||||
|
||||
// Thing height?
|
||||
height.Visible = General.Map.FormatInterface.HasThingHeight;
|
||||
heightlabel.Visible = General.Map.FormatInterface.HasThingHeight;
|
||||
posZ.Visible = General.Map.FormatInterface.HasThingHeight;
|
||||
zlabel.Visible = General.Map.FormatInterface.HasThingHeight;
|
||||
cbAbsoluteHeight.Visible = General.Map.FormatInterface.HasThingHeight; //mxd
|
||||
|
||||
// Setup types list
|
||||
thingtype.Setup();
|
||||
|
@ -119,14 +122,18 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
|
||||
// Coordination
|
||||
angle.Text = ft.AngleDoom.ToString();
|
||||
height.Text = ((int)ft.Position.z).ToString();
|
||||
zlabel.Text = ABSOLUTE_HEIGHT ? "Z:" : "Height:"; //mxd
|
||||
cbAbsoluteHeight.Checked = ABSOLUTE_HEIGHT; //mxd
|
||||
|
||||
//mxd
|
||||
initialPosition = ft.Position;
|
||||
initialFloorHeight = ft.Sector.FloorHeight;
|
||||
posX.Text = ((int)ft.Position.x).ToString();
|
||||
posY.Text = ((int)ft.Position.y).ToString();
|
||||
posZ.Text = ABSOLUTE_HEIGHT ? ((int)ft.Position.z + ft.Sector.FloorHeight).ToString() : ((int)ft.Position.z).ToString();
|
||||
posX.ButtonStep = General.Map.Grid.GridSize;
|
||||
posY.ButtonStep = General.Map.Grid.GridSize;
|
||||
posZ.ButtonStep = General.Map.Grid.GridSize;
|
||||
|
||||
//mxd. setup arg0str
|
||||
arg0str.Location = arg0.Location;
|
||||
|
@ -170,7 +177,13 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
|
||||
// Coordination
|
||||
if(t.AngleDoom.ToString() != angle.Text) angle.Text = "";
|
||||
if(((int)t.Position.z).ToString() != height.Text) height.Text = "";
|
||||
|
||||
//mxd
|
||||
if(ABSOLUTE_HEIGHT) {
|
||||
if(((int)t.Position.z + t.Sector.FloorHeight).ToString() != posZ.Text) posZ.Text = "";
|
||||
} else {
|
||||
if(((int)t.Position.z).ToString() != posZ.Text) posZ.Text = "";
|
||||
}
|
||||
|
||||
// Action/tags
|
||||
if(t.Action != action.Value) action.Empty = true;
|
||||
|
@ -210,6 +223,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
arg0str.SelectedIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//mxd
|
||||
private void setNamedScripts(string selectedValue) {
|
||||
arg0str.Items.Clear();
|
||||
|
@ -402,7 +416,8 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
t.Rotate(angle.GetResult(t.AngleDoom));
|
||||
//mxd
|
||||
//t.Move(t.Position.x, t.Position.y, (float)height.GetResult((int)t.Position.z));
|
||||
t.Move(t.Position.x + delta.x, t.Position.y + delta.y, (float)height.GetResult((int)t.Position.z));
|
||||
float z = (float)posZ.GetResult((int)t.Position.z);
|
||||
t.Move(t.Position.x + delta.x, t.Position.y + delta.y, ABSOLUTE_HEIGHT ? z - t.Sector.FloorHeight : z);
|
||||
|
||||
// Apply all flags
|
||||
foreach(CheckBox c in flags.Checkboxes)
|
||||
|
@ -491,6 +506,13 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
arg0str.Text = (string)fieldslist.GetValue(fieldname);
|
||||
}
|
||||
|
||||
//mxd
|
||||
private void cbAbsoluteHeight_CheckedChanged(object sender, EventArgs e) {
|
||||
ABSOLUTE_HEIGHT = cbAbsoluteHeight.Checked;
|
||||
zlabel.Text = ABSOLUTE_HEIGHT ? "Z:" : "Height:";
|
||||
posZ.Text = (ABSOLUTE_HEIGHT ? initialFloorHeight + initialPosition.z : initialPosition.z).ToString();
|
||||
}
|
||||
|
||||
// Help
|
||||
private void ThingEditForm_HelpRequested(object sender, HelpEventArgs hlpevent)
|
||||
{
|
||||
|
|
|
@ -123,21 +123,12 @@
|
|||
<metadata name="groupBox1.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="thingtype.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="thingtype.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="groupBox2.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="label5.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="label5.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="taglabel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
|
@ -150,9 +141,6 @@
|
|||
<metadata name="label7.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="tabproperties.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="tabeffects.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
|
@ -216,16 +204,4 @@
|
|||
<metadata name="fieldslist.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="tag.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="newtag.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="fieldslist.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
Loading…
Reference in a new issue