Insert in Sectors and Linedefs mode now start the Drawing mode

This commit is contained in:
codeimp 2009-02-25 15:37:57 +00:00
parent 575bff4aa8
commit c7ea37b0a1
2 changed files with 27 additions and 3 deletions

View file

@ -524,8 +524,20 @@ namespace CodeImp.DoomBuilder.BuilderModes
// This creates a new vertex at the mouse position
[BeginAction("insertitem", BaseAction = true)]
public virtual void InsertVertexAction() { VerticesMode.InsertVertex(mousemappos, renderer.Scale); }
public virtual void InsertVertexAction()
{
// Start drawing mode
DrawGeometryMode drawmode = new DrawGeometryMode();
if(mouseinside)
{
bool snaptogrid = General.Interface.ShiftState ^ General.Interface.SnapToGrid;
bool snaptonearest = General.Interface.CtrlState ^ General.Interface.AutoMerge;
DrawnVertex v = DrawGeometryMode.GetCurrentPosition(mousemappos, snaptonearest, snaptogrid, renderer, new List<DrawnVertex>());
drawmode.DrawPointAt(v);
}
General.Editing.ChangeMode(drawmode);
}
[BeginAction("deleteitem", BaseAction = true)]
public void DeleteItem()
{

View file

@ -681,7 +681,19 @@ namespace CodeImp.DoomBuilder.BuilderModes
// This creates a new vertex at the mouse position
[BeginAction("insertitem", BaseAction = true)]
public virtual void InsertVertexAction() { VerticesMode.InsertVertex(mousemappos, renderer.Scale); }
public virtual void InsertVertexAction()
{
// Start drawing mode
DrawGeometryMode drawmode = new DrawGeometryMode();
if(mouseinside)
{
bool snaptogrid = General.Interface.ShiftState ^ General.Interface.SnapToGrid;
bool snaptonearest = General.Interface.CtrlState ^ General.Interface.AutoMerge;
DrawnVertex v = DrawGeometryMode.GetCurrentPosition(mousemappos, snaptonearest, snaptogrid, renderer, new List<DrawnVertex>());
drawmode.DrawPointAt(v);
}
General.Editing.ChangeMode(drawmode);
}
[BeginAction("makedoor")]
public void MakeDoor()