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:
MaxED 2013-07-19 15:30:58 +00:00
parent 7f3461209a
commit bafb8ed511
59 changed files with 2695 additions and 1181 deletions

View file

@ -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()
{