mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-05-30 08:32:00 +00:00
UDMF: sidedef flags are now defined in game configuration instead of being hardcoded.
Texture scale controls now have "Link" button. Thing, Sector (UDMF) and Linedef edit forms now work in realtime mode. Some more fixes in Edit form realtime update stuff. Removed some unused variables and functions.
This commit is contained in:
parent
7f3461209a
commit
bafb8ed511
59 changed files with 2695 additions and 1181 deletions
|
@ -684,6 +684,24 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
General.Interface.DisplayStatus(StatusType.Selection, result);
|
||||
}
|
||||
|
||||
//mxd
|
||||
internal void StartRealtimeInterfaceUpdate(SelectionType selectionType) {
|
||||
if(selectionType == SelectionType.Sectors || selectionType == SelectionType.Linedefs || selectionType == SelectionType.All) {
|
||||
General.Interface.OnEditFormValuesChanged += new EventHandler(Interface_OnSectorEditFormValuesChanged);
|
||||
} else {
|
||||
General.Interface.OnEditFormValuesChanged += new EventHandler(Interface_OnEditFormValuesChanged);
|
||||
}
|
||||
}
|
||||
|
||||
//mxd
|
||||
internal void StopRealtimeInterfaceUpdate(SelectionType selectionType) {
|
||||
if(selectionType == SelectionType.Sectors || selectionType == SelectionType.Linedefs || selectionType == SelectionType.All) {
|
||||
General.Interface.OnEditFormValuesChanged -= Interface_OnSectorEditFormValuesChanged;
|
||||
} else {
|
||||
General.Interface.OnEditFormValuesChanged -= Interface_OnEditFormValuesChanged;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -1303,6 +1321,35 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
//mxd
|
||||
updateSelectionInfo();
|
||||
}
|
||||
|
||||
//mxd
|
||||
private void Interface_OnSectorEditFormValuesChanged(object sender, EventArgs e) {
|
||||
if(allsectors == null) return;
|
||||
|
||||
// Reset changed flags
|
||||
foreach(KeyValuePair<Sector, VisualSector> vs in allsectors) {
|
||||
BaseVisualSector bvs = (vs.Value as BaseVisualSector);
|
||||
foreach(VisualFloor vf in bvs.ExtraFloors)
|
||||
vf.Changed = false;
|
||||
foreach(VisualCeiling vc in bvs.ExtraCeilings)
|
||||
vc.Changed = false;
|
||||
foreach(VisualFloor vf in bvs.ExtraBackFloors)
|
||||
vf.Changed = false;
|
||||
foreach(VisualCeiling vc in bvs.ExtraBackCeilings)
|
||||
vc.Changed = false;
|
||||
bvs.Floor.Changed = false;
|
||||
bvs.Ceiling.Changed = false;
|
||||
}
|
||||
|
||||
UpdateChangedObjects();
|
||||
ShowTargetInfo();
|
||||
}
|
||||
|
||||
//mxd
|
||||
private void Interface_OnEditFormValuesChanged(object sender, EventArgs e) {
|
||||
UpdateChangedObjects();
|
||||
ShowTargetInfo();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -1713,37 +1760,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
public void EndEdit()
|
||||
{
|
||||
PreActionNoChange();
|
||||
|
||||
//mxd
|
||||
General.Interface.OnEditFormValuesChanged += new EventHandler(Interface_OnEditFormValuesChanged);
|
||||
|
||||
GetTargetEventReceiver(false).OnEditEnd();
|
||||
PostAction();
|
||||
}
|
||||
|
||||
//mxd
|
||||
private void Interface_OnEditFormValuesChanged(object sender, EventArgs e) {
|
||||
if(allsectors == null) return;
|
||||
|
||||
// Reset changed flags
|
||||
foreach(KeyValuePair<Sector, VisualSector> vs in allsectors) {
|
||||
BaseVisualSector bvs = (vs.Value as BaseVisualSector);
|
||||
foreach(VisualFloor vf in bvs.ExtraFloors)
|
||||
vf.Changed = false;
|
||||
foreach(VisualCeiling vc in bvs.ExtraCeilings)
|
||||
vc.Changed = false;
|
||||
foreach(VisualFloor vf in bvs.ExtraBackFloors)
|
||||
vf.Changed = false;
|
||||
foreach(VisualCeiling vc in bvs.ExtraBackCeilings)
|
||||
vc.Changed = false;
|
||||
bvs.Floor.Changed = false;
|
||||
bvs.Ceiling.Changed = false;
|
||||
}
|
||||
|
||||
UpdateChangedObjects();
|
||||
ShowTargetInfo();
|
||||
}
|
||||
|
||||
[BeginAction("raisesector8")]
|
||||
public void RaiseSector8()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue