mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-02-17 01:22:18 +00:00
Using --- and +++ now also works correctly for the height offset in the edit sector properties dialog
This commit is contained in:
parent
c9e7551ca3
commit
31eaf98cbe
4 changed files with 57 additions and 14 deletions
|
@ -239,6 +239,12 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
}
|
||||
}
|
||||
|
||||
// biwa
|
||||
public void ResetIncrementStep()
|
||||
{
|
||||
textbox.ResetIncrementStep();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -444,6 +444,12 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
tooltip.RemoveAll();
|
||||
}
|
||||
}
|
||||
|
||||
// biwa
|
||||
public void ResetIncrementStep()
|
||||
{
|
||||
incrementstep = 1;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
|
|
@ -229,18 +229,27 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
}
|
||||
else
|
||||
{
|
||||
offset = heightoffset.GetResult(0);
|
||||
// Reset increment steps, otherwise it's just keep counting and counting
|
||||
heightoffset.ResetIncrementStep();
|
||||
|
||||
//restore values
|
||||
if(string.IsNullOrEmpty(ceilingheight.Text))
|
||||
if (string.IsNullOrEmpty(ceilingheight.Text))
|
||||
{
|
||||
foreach(Sector s in sectors)
|
||||
foreach (Sector s in sectors)
|
||||
{
|
||||
// To get the steps for ---/+++ into effect the offset has to be retrieved again for each sector
|
||||
offset = heightoffset.GetResult(0);
|
||||
s.CeilHeight = sectorprops[i++].CeilHeight + offset;
|
||||
}
|
||||
}
|
||||
else //update values
|
||||
{
|
||||
foreach(Sector s in sectors)
|
||||
foreach (Sector s in sectors)
|
||||
{
|
||||
// To get the steps for ---/+++ into effect the offset has to be retrieved again for each sector
|
||||
offset = heightoffset.GetResult(0);
|
||||
s.CeilHeight = ceilingheight.GetResult(sectorprops[i++].CeilHeight) + offset;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -264,18 +273,27 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
}
|
||||
else
|
||||
{
|
||||
offset = heightoffset.GetResult(0);
|
||||
|
||||
// Reset increment steps, otherwise it's just keep counting and counting
|
||||
heightoffset.ResetIncrementStep();
|
||||
|
||||
//restore values
|
||||
if(string.IsNullOrEmpty(floorheight.Text))
|
||||
if (string.IsNullOrEmpty(floorheight.Text))
|
||||
{
|
||||
foreach(Sector s in sectors)
|
||||
foreach (Sector s in sectors)
|
||||
{
|
||||
// To get the steps for ---/+++ into effect the offset has to be retrieved again for each sector
|
||||
offset = heightoffset.GetResult(0);
|
||||
s.FloorHeight = sectorprops[i++].FloorHeight + offset;
|
||||
}
|
||||
}
|
||||
else //update values
|
||||
{
|
||||
foreach(Sector s in sectors)
|
||||
foreach (Sector s in sectors)
|
||||
{
|
||||
// To get the steps for ---/+++ into effect the offset has to be retrieved again for each sector
|
||||
offset = heightoffset.GetResult(0);
|
||||
s.FloorHeight = floorheight.GetResult(sectorprops[i++].FloorHeight) + offset;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -751,21 +751,29 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
}
|
||||
else
|
||||
{
|
||||
offset = heightoffset.GetResult(0);
|
||||
|
||||
//restore values
|
||||
if(string.IsNullOrEmpty(ceilingheight.Text))
|
||||
{
|
||||
foreach(Sector s in sectors)
|
||||
// Reset increment steps, otherwise it's just keep counting and counting
|
||||
heightoffset.ResetIncrementStep();
|
||||
|
||||
foreach (Sector s in sectors)
|
||||
{
|
||||
// To get the steps for ---/+++ into effect the offset has to be retrieved again for each sector
|
||||
offset = heightoffset.GetResult(0);
|
||||
s.CeilHeight = sectorprops[s].CeilHeight + offset;
|
||||
SynchCeilSlopeOffsetToHeight(s);
|
||||
}
|
||||
}
|
||||
else //update values
|
||||
{
|
||||
foreach(Sector s in sectors)
|
||||
// Reset increment steps, otherwise it's just keep counting and counting
|
||||
heightoffset.ResetIncrementStep();
|
||||
|
||||
foreach (Sector s in sectors)
|
||||
{
|
||||
// To get the steps for ---/+++ into effect the offset has to be retrieved again for each sector
|
||||
offset = heightoffset.GetResult(0);
|
||||
s.CeilHeight = ceilingheight.GetResult(sectorprops[s].CeilHeight) + offset;
|
||||
SynchCeilSlopeOffsetToHeight(s);
|
||||
}
|
||||
|
@ -790,13 +798,16 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
}
|
||||
else
|
||||
{
|
||||
offset = heightoffset.GetResult(0);
|
||||
// Reset increment steps, otherwise it's just keep counting and counting
|
||||
heightoffset.ResetIncrementStep();
|
||||
|
||||
//restore values
|
||||
if(string.IsNullOrEmpty(floorheight.Text))
|
||||
{
|
||||
foreach(Sector s in sectors)
|
||||
{
|
||||
// To get the steps for ---/+++ into effect the offset has to be retrieved again for each sector
|
||||
offset = heightoffset.GetResult(0);
|
||||
s.FloorHeight = sectorprops[s].FloorHeight + offset;
|
||||
SynchFloorSlopeOffsetToHeight(s);
|
||||
}
|
||||
|
@ -805,6 +816,8 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
{
|
||||
foreach(Sector s in sectors)
|
||||
{
|
||||
// To get the steps for ---/+++ into effect the offset has to be retrieved again for each sector
|
||||
offset = heightoffset.GetResult(0);
|
||||
s.FloorHeight = floorheight.GetResult(sectorprops[s].FloorHeight) + offset;
|
||||
SynchFloorSlopeOffsetToHeight(s);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue