mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-23 12:22:35 +00:00
Insert in Sectors and Linedefs mode now start the Drawing mode
This commit is contained in:
parent
575bff4aa8
commit
c7ea37b0a1
2 changed files with 27 additions and 3 deletions
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue