Rewrote unofficial 2.10 over latest official commit

This commit is contained in:
justburner 2020-08-29 15:26:59 +01:00 committed by spherallic
parent de4a8445d3
commit 9ff08fe97b
95 changed files with 15683 additions and 1955 deletions

View file

@ -16,6 +16,14 @@
<param name="Name" value="Terminology">
<param name="Local" value="terminology.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="What's new - Unofficial">
<param name="Local" value="e_unofficial_whatsnew.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Changelog - Unofficial">
<param name="Local" value="e_unofficial_changelog.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="User Interface">
<param name="Local" value="userinterface.html">
@ -338,6 +346,10 @@
<param name="Name" value="Draw Ellipse mode">
<param name="Local" value="gzdb\features\classic_modes\mode_drawellipse.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Draw Shape mode">
<param name="Local" value="mode_drawshape.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Draw Curve mode">
<param name="Local" value="gzdb\features\classic_modes\mode_drawcurve.html">
@ -346,6 +358,26 @@
<param name="Name" value="Draw Grid mode">
<param name="Local" value="gzdb\features\classic_modes\mode_drawgrid.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Perpendicular Linedef">
<param name="Local" value="e_perpendicularlinedef.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Perpendicular Vertex">
<param name="Local" value="e_perpendicularvertex.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Parallel Linedef">
<param name="Local" value="e_parallellinedef.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Vertex into Shape">
<param name="Local" value="e_vertexintoshape.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Vertex Slope Assistant">
<param name="Local" value="e_vertexslopeassistant.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Sound Propagation Mode">
<param name="Local" value="gzdb\features\classic_modes\mode_soundpropagation.html">

View file

@ -0,0 +1,91 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Parallel Linedef Mode</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="default.css" media="screen" title="Default" />
<script type="text/javascript" src="scripts.js"></script>
</head>
<body>
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="keyword" value="Parallel Linedef Mode">
</object>
<div id="title"><h1>Parallel Linedef Mode</h1></div>
<div id="contents">
<p>
NEW IN UNOFFICIAL 2.10!<br>
Parallel linedefs are created alongside each linedef.<br>
<br>
This mode is helpful for:<br>
• Creating tracks quickly.<br>
• Expand/shrink shape.<br>
<br>
This mode shows a small dialog window that you can use to create parallel linedef(s) from a linedef or multiple linedefs.
Although this mode shows a dialog window, you can still use the main interface and zoom/move your view around the map.<br />
<br>
This mode is volatile, which means that this mode returns to the previous stable mode when the map is saved or closed, either accepting or discarding your preview changes. You can access this mode through the <a href="e_vertices.html">Vertices Mode</a>, <a href="e_linedefs.html">Linedefs Mode</a> or <a href="e_sectors.html">Sectors Mode</a> but is recommended to access from <a href="e_linedefs.html">Linedefs Mode</a>.<br>
<br>
<b>WARNING!</b><br>
• Selected vertices with intersections (more than 2 selected linedefs connected) can result in undesirable result! The mode will warn about this whatsoever.<br>
• Open-paths will ignore linedefs front/back dir. on the middle, if both end tips are facing opposite directions then the direction will be unpredictable.<br>
• Close-paths will ignore all linedefs front/back dir. and always parallel into inside, use "Backwards" to place elements outside.<br>
<h2>Dialog Settings</h2>
<table border="0" cellspacing="6" width="90%">
<tr>
<td width="150" valign="top"><b>Create as...</b></td>
<td>Select which type of elements to create, see below for more information.</td>
</tr>
<tr>
<td valign="top"><b>Distance</b></td>
<td>Set distance between selected linedef(s) and parallel linedef(s).</td>
</tr>
<tr>
<td valign="top"><b>Close Open-Paths Ends</b></td>
<td>Attach linedefs between original paths and open-paths at both ends. Only available for linedef elements and doesn't affect close-paths.</td>
</tr>
<tr>
<td valign="top"><b>Backwards / Outside</b></td>
<td>When checked, it creates parallel path on the opposite side.</td>
</tr>
</table>
<h2>"Create as..." types</h2>
<table border="0" cellspacing="6" width="90%">
<tr>
<td width="150" valign="top"><b>Linked Linedef</b></td>
<td>Creates a normal parallel linedef.</td>
</tr>
<tr>
<td valign="top"><b>Unlinked Linedef</b></td>
<td>Creates an isolated parallel linedef that won't intersect or merge into elements on the map. Not recommended.</td>
</tr>
<tr>
<td valign="top"><b>Vertices</b></td>
<td>Creates a vertex at each point of the parallel.</td>
</tr>
<tr>
<td valign="top"><b>Thing</b></td>
<td>Creates a thing at each point of the parallel.</td>
</tr>
</table>
<h2>Default Controls</h2>
<table border="0" cellspacing="6" width="90%">
<tr>
<td width="150" valign="top"><b>Enter</b></td>
<td>Accept and apply the changes, and return to the previous mode.</td>
</tr>
<tr>
<td valign="top"><b>Escape</b></td>
<td>Discard the changes and return to the previous mode.</td>
</tr>
</table>
</p>
</div>
</body>

View file

@ -0,0 +1,97 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Perpendicular Linedef Mode</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="default.css" media="screen" title="Default" />
<script type="text/javascript" src="scripts.js"></script>
</head>
<body>
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="keyword" value="Perpendicular Linedef Mode">
</object>
<div id="title"><h1>Perpendicular Linedef Mode</h1></div>
<div id="contents">
<p>
NEW IN UNOFFICIAL 2.10!<br>
Perpendiculars are created alongside each linedef.<br>
<br>
This mode is helpful for:<br>
• Creating track segments. <i>(Due to float inaccuracies you need to use "Snap distance")</i><br>
• Placing things parallel to a path.<br>
<br>
This mode shows a small dialog window that you can use to create a perpendicular linedef, vertex or thing from a linedef or multiple linedefs.
Although this mode shows a dialog window, you can still use the main interface and zoom/move your view around the map.<br />
<br>
This mode is volatile, which means that this mode returns to the previous stable mode when the map is saved or closed, either accepting or discarding your preview changes. You can access this mode through the <a href="e_vertices.html">Vertices Mode</a>, <a href="e_linedefs.html">Linedefs Mode</a> or <a href="e_sectors.html">Sectors Mode</a> but is recommended to access from <a href="e_linedefs.html">Linedefs Mode</a>.<br>
<br>
<b>WARNING!</b><br>
• Perpendiculars are only created on selected vertices with 1 or 2 selected linedefs connected! (aka. a path line)<br>
<h2>Dialog Settings</h2>
<table border="0" cellspacing="6" width="90%">
<tr>
<td width="150" valign="top"><b>Create as...</b></td>
<td>Select which type of elements to create, see below for more information.</td>
</tr>
<tr>
<td valign="top"><b>Distance</b></td>
<td>Set distance between selected linedef(s) and the end of the perpendicular.</td>
</tr>
<tr>
<td valign="top"><b>Offset %</b></td>
<td>Sets offset along each linedef of where the perpendicular should intersect. 50% means exactly in the center.</td>
</tr>
<tr>
<td valign="top"><b>Backwards</b></td>
<td>When checked, it creates a perpendicular on the opposite side of where the linedefs are facing.</td>
</tr>
<tr>
<td valign="top"><b>Snap distance</b></td>
<td>Adjust snap distance to vertices that already exist in the map so perpendiculars get connected to them. Set to zero to disable snapping.</td>
</tr>
</table>
<h2>"Create as..." types</h2>
<table border="0" cellspacing="6" width="90%">
<tr>
<td width="150" valign="top"><b>Linked Linedef</b></td>
<td>Creates a normal perpendicular linedef.</td>
</tr>
<tr>
<td valign="top"><b>Unlinked Linedef</b></td>
<td>Creates an isolated perpendicular linedef that won't intersect or merge into elements on the map. Not recommended.</td>
</tr>
<tr>
<td valign="top"><b>Vertices</b></td>
<td>Creates a vertex at the end of the perpendicular.</td>
</tr>
<tr>
<td valign="top"><b>Vertices with<br/>Linedef Split</b></td>
<td>Creates a vertex at the end of the perpendicular and split the linedef on same offset.</td>
</tr>
<tr>
<td valign="top"><b>Thing</b></td>
<td>Creates a thing at the end of the perpendicular.</td>
</tr>
</table>
<h2>Default Controls</h2>
<table border="0" cellspacing="6" width="90%">
<tr>
<td width="150" valign="top"><b>Enter</b></td>
<td>Accept and apply the changes, and return to the previous mode.</td>
</tr>
<tr>
<td valign="top"><b>Escape</b></td>
<td>Discard the changes and return to the previous mode.</td>
</tr>
</table>
</p>
</div>
</body>

View file

@ -0,0 +1,94 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Perpendicular Vertex Mode</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="default.css" media="screen" title="Default" />
<script type="text/javascript" src="scripts.js"></script>
</head>
<body>
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="keyword" value="Perpendicular Vertex Mode">
</object>
<div id="title"><h1>Perpendicular Vertex Mode</h1></div>
<div id="contents">
<p>
NEW IN UNOFFICIAL 2.10!<br>
Perpendiculars are created on each vertex. It's <b>required</b> a path with linedefs connected to the selected vertices for the mode to work, it cannot operate on vertices alone!<br>
<br>
This mode is helpful for:<br>
• Creating track segments. <i>(Due to float inaccuracies you need to use "Snap distance")</i><br>
• Alternative to <a href="e_linedefs.html">Parallel Linedef Mode</a> for placing things parallel to a path.<br>
<br>
This mode shows a small dialog window that you can use to create a perpendicular linedef, vertex or thing from a vertex or multiple vertices.
Although this mode shows a dialog window, you can still use the main interface and zoom/move your view around the map.<br />
<br>
This mode is volatile, which means that this mode returns to the previous stable mode when the map is saved or closed, either accepting or discarding your preview changes. You can access this mode through the <a href="e_vertices.html">Vertices Mode</a>, <a href="e_linedefs.html">Linedefs Mode</a> or <a href="e_sectors.html">Sectors Mode</a> but is recommended to access from <a href="e_linedefs.html">Linedefs Mode</a>.<br>
<br>
<b>WARNING!</b><br>
• Perpendiculars are only created on selected vertices with 1 or 2 selected linedefs connected! (aka. a path line)<br>
• Path with opposite facing linedefs will not produce any perpendicular.<br>
<h2>Dialog Settings</h2>
<table border="0" cellspacing="6" width="90%">
<tr>
<td width="150" valign="top"><b>Create as...</b></td>
<td>Select which type of elements to create, see below for more information.</td>
</tr>
<tr>
<td valign="top"><b>Distance</b></td>
<td>Set distance between selected linedef(s) and the end of the perpendicular.</td>
</tr>
<tr>
<td valign="top"><b>Process tips</b></td>
<td>When unchecked, vertices with only one linedef selected won't be processed.</td>
</tr>
<tr>
<td valign="top"><b>Backwards</b></td>
<td>When checked, it creates a perpendicular on the opposite side of where the linedefs are facing.</td>
</tr>
<tr>
<td valign="top"><b>Snap distance</b></td>
<td>Adjust snap distance to vertices that already exist in the map so perpendiculars get connected to them. Set to zero to disable snapping.</td>
</tr>
</table>
<h2>"Create as..." types</h2>
<table border="0" cellspacing="6" width="90%">
<tr>
<td width="150" valign="top"><b>Linked Linedef</b></td>
<td>Creates a normal perpendicular linedef.</td>
</tr>
<tr>
<td valign="top"><b>Unlinked Linedef</b></td>
<td>Creates an isolated perpendicular linedef that won't intersect or merge into elements on the map. Not recommended.</td>
</tr>
<tr>
<td valign="top"><b>Vertices</b></td>
<td>Creates a vertex at the end of the perpendicular.</td>
</tr>
<tr>
<td valign="top"><b>Thing</b></td>
<td>Creates a thing at the end of the perpendicular.</td>
</tr>
</table>
<h2>Default Controls</h2>
<table border="0" cellspacing="6" width="90%">
<tr>
<td width="150" valign="top"><b>Enter</b></td>
<td>Accept and apply the changes, and return to the previous mode.</td>
</tr>
<tr>
<td valign="top"><b>Escape</b></td>
<td>Discard the changes and return to the previous mode.</td>
</tr>
</table>
</p>
</div>
</body>

View file

@ -0,0 +1,57 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Changelog - Zone Builder Unofficial</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="default.css" media="screen" title="Default" />
<script type="text/javascript" src="scripts.js"></script>
</head>
<body>
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="keyword" value="Changelog Unofficial">
</object>
<div id="title"><h1>Changelog - Zone Builder Unofficial</h1></div>
<div id="contents">
<p>
<h2>2.10.0.2506 - 2019/09/23</h2>
Bugfixes and other minor changes.<br>
<h2>~~ Older history: ~~</h2>
<h2>2.10.0.2505 beta - 2019/09/19</h2>
Bugfixes and other minor changes.<br>
<h2>2.10.0.2504 beta - 2019/09/15</h2>
Visual mode now display absolute Z Vertex Slopes properly.<br>
Added support for absolute Z in "Vertex Slopes Assistant".<br>
"Vertex Slopes Assistant" is more user friendly: group options is also available by right-click on map, ability to create empty triangles and Shift+Wheel for scrolling Tag #.<br>
Other minor changes.<br>
<h2>2.10.0.2503 beta - 2019/09/10</h2>
Added some missing linedef actions in SRB2 Kart such as "Encore Load".<br>
Placed "Point to Cursor" shortcut on "manual" toolstrip in <a href="e_things.html">Things Mode</a>.<br>
New "Vertex Slope Assistant" to help managing and creating vertex slopes, available in <a href="e_things.html">Things Mode</a>.<br>
Added tooltips on all new tools and other minor changes.<br>
Added randomizer on "Vertex Into Shape" to generate random shapes per vertex.<br>
Updated help file with information of the new tool and corrections on previous tools.<br>
Implemented SRB2 2.2 / SRB2 Kart Sector Flat Alignment.<br>
<h2>2.10.0.2502 beta - 2019/08/22</h2>
Placed "Place things" shortcut on "manual" toolstrip in <a href="e_vertices.html">Vertices Mode</a>, <a href="e_linedefs.html">Linedefs Mode</a> and <a href="e_sectors.html">Sectors Mode</a>.<br>
New "Perpendicular Tool" to create elements perpendicular to linedefs or vertices, available in <a href="e_vertices.html">Vertices Mode</a>, <a href="e_linedefs.html">Linedefs Mode</a> and <a href="e_sectors.html">Sectors Mode</a>.<br>
New "Parallel Tool" to create elements parallel to linedefs, available in <a href="e_vertices.html">Vertices Mode</a>, <a href="e_linedefs.html">Linedefs Mode</a> and <a href="e_sectors.html">Sectors Mode</a>.<br>
New "Draw Shapes Mode" (Alt+D), it peforms the same as <a href="gzdb/features/classic_modes/mode_drawellipse.html">Draw Ellipse Mode</a> and Insert Things Radially Mode but with added functionality.<br>
New "Vertex Into Shape" to create multiple shapes, available in <a href="e_vertices.html">Vertices Mode</a>.<br>
Updated help file with information of the new tools.<br>
<h2>2.10.0.2501 beta - 2019/04/30</h2>
Angle component now support loops separated from angle, very useful for creating checkpoints in SRB2 Kart.<br>
Dragging while holding middle-button on angle component changes the number of loops.<br>
</p>
</div>
</body>

View file

@ -0,0 +1,38 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>What's New - Zone Builder Unofficial</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="default.css" media="screen" title="Default" />
<script type="text/javascript" src="scripts.js"></script>
</head>
<body>
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="keyword" value="New in Unofficial">
</object>
<div id="title"><h1>What's New - Zone Builder Unofficial</h1></div>
<div id="contents">
<p>
<h2>Quick way to set laps</h2>
Angle UI component supports "loops", very useful for creating checkpoints in SRB2 Kart.<br>
Dragging mouse while holding middle-button on angle component changes the number of loops.<br>
<h2>New building tools</h2>
<b>Perpendicular Tool</b>, create elements perpendicular to linedefs or vertices, available in Vertices Mode, Linedefs Mode and Sectors Mode.<br>
<b>Parallel Tool</b>, create elements parallel to linedefs, available in Vertices Mode, Linedefs Mode and Sectors Mode.<br>
<b>Draw Shapes Mode</b> (Alt+D), it peforms the same as Draw Ellipse Mode and Insert Things Radially Mode but with added functionality.<br>
<b>Vertex Into Shape</b> to create multiple shapes, available in Vertices Mode, works similar to Draw Shapes Mode.<br>
<b>Vertex Slope Assistant</b> to help managing and creating vertex slopes, available in Things Mode.<br>
<h2>Better support for SRB2 Kart</h2>
<b>SRB2 2.2 / SRB2 Kart Sector Flat Alignment</b> support (by MascaraSnake).<br>
<b>VSlope Absolute Z</b>, Visual mode now display absolute Z Vertex Slopes properly.<br>
<b>Improved SRB2 Kart configs</b>, added missing sector type "Invert Encore Remap" and linedef trigger "Encore Load" and more.<br>
</p>
</div>
</body>

150
Help/e_vertexintoshape.html Normal file
View file

@ -0,0 +1,150 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Vertex into Shape Mode</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="default.css" media="screen" title="Default" />
<script type="text/javascript" src="scripts.js"></script>
</head>
<body>
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="keyword" value="Vertex into Shape Mode">
</object>
<div id="title"><h1>Vertex into Shape Mode</h1></div>
<div id="contents">
<p>
NEW IN UNOFFICIAL 2.10!<br>
Shapes are created on each vertex.<br>
<br>
This mode is helpful for:<br>
• Creating multiple copies of geometric shapes at same time.<br>
<br>
This mode shows a small dialog window that you can use to adjust the shape to be placed in a vertex or multiple vertices.
Although this mode shows a dialog window, you can still use the main interface and zoom/move your view around the map.<br />
<br>
This mode is volatile, which means that this mode returns to the previous stable mode when the map is saved or closed, either accepting or discarding your preview changes. You can access this mode through the <a href="e_vertices.html">Vertices Mode</a>.<br>
<h2>Dialog Settings</h2>
<table border="0" cellspacing="6" width="90%">
<tr>
<td width="150" valign="top"><b>Preview Reference</b></td>
<td>Visual only. The reference circle will be shown on screen when checked.</td>
</tr>
<tr>
<td valign="top"><b>Remove Vertices</b></td>
<td>When checked it will remove the vertices that were used to place the shapes.</td>
</tr>
<tr>
<td valign="top"><b>Radius</b></td>
<td>Sets the radius.</td>
</tr>
<tr>
<td valign="top"><b>Ellipse</b></td>
<td>Shape can only be scaled in one axis when unchecked.</td>
</tr>
<tr>
<td width="150" valign="top"><b>Create shape as...</b></td>
<td>Select which type of elements to create, see below for more information.</td>
</tr>
<tr>
<td valign="top"><b>Front Outside /<br>Flip Linedefs</b></td>
<td>Shape linedefs will point outside when checked, ignored if "Create shape as.." is "Vertices" or "Things".</td>
</tr>
<tr>
<td valign="top"><b>Sides</b></td>
<td>Sets number of sides that the shape should have, note that reducing sweep angle won't reduce the number of sides.</td>
</tr>
<tr>
<td valign="top"><b>Spikiness</b></td>
<td>Sets percentage of spikiness. Except "Draw Ellipse behaviour" spike type, in that case spikiness is in mp.</td>
</tr>
<tr>
<td valign="top"><b><i>Spike type combo box</i></b></td>
<td>Controls how spikes behave in relation to the Spikiness level, see below for more information.</td>
</tr>
<tr>
<td valign="top"><b>Start Angle</b></td>
<td>Controls the starting angle of the first point.</td>
</tr>
<tr>
<td valign="top"><b>Sweep Angle</b></td>
<td>Controls the sweep angle of the slice, 360º will create a closed shape without slices.</td>
</tr>
<tr>
<td valign="top"><b>Lock to one quadrant</b></td>
<td>Locks start angle to top-right quadrant when checked, internally the angle will automatically adjust based of which quadrant the mouse is in.</td>
</tr>
</table>
<h2>"Create as..." types</h2>
<table border="0" cellspacing="6" width="90%">
<tr>
<td width="150" valign="top"><b>Close shape<br>towards origin</b></td>
<td>Sliced shape will be cut towards origin creating a pie look.</td>
</tr>
<tr>
<td valign="top"><b>Close shape<br>first to last vertex</b></td>
<td>Sliced shape will be closed by a linedef connected from the first to last vertex of the shape.</td>
</tr>
<tr>
<td valign="top"><b>Open or close shape</b></td>
<td>Sliced shape won't be closed.</td>
</tr>
<tr>
<td valign="top"><b>Shape w/o intersect<br>or sectors</b></td>
<td>Creates an isolated shape that won't intersect or merge into elements on the map. Not recommended.</td>
</tr>
<tr>
<td valign="top"><b>Vertices</b></td>
<td>Creates a shape without linedefs.</td>
</tr>
<tr>
<td valign="top"><b>Thing</b></td>
<td>Creates a thing at each point of the shape.</td>
</tr>
</table>
<h2>Spike types combo box</h2>
<table border="0" cellspacing="6" width="90%">
<tr>
<td width="150" valign="top"><b>Spike outside</b></td>
<td>Spike will go outside of the reference circle.</td>
</tr>
<tr>
<td width="150" valign="top"><b>Spike inside</b></td>
<td>Spike will go inside of the reference circle, spikiness should not be more than 100!</td>
</tr>
<tr>
<td valign="top"><b>Spike zig-zag</b></td>
<td>Spike will go outside and inside of the reference circle causing it to be 2x more severe, spikiness should not be more than 100!</td>
</tr>
<tr>
<td valign="top"><b>Spike gear</b></td>
<td>Spike create a gear shape inside and outside of the reference circle, spikiness should not be more than 100! Number of sides must be multiple of 4 in this type.</td>
</tr>
<tr>
<td valign="top"><b>DrawEllipse behaviour</b></td>
<td>Simulates Draw Ellipse bevel behaviour, in this case the spikiness will be distance of spikes away from the reference circle rather than a percentage.</td>
</tr>
</table>
If Spikiness is more than 0 then sides must be multiple of 2 (except Spike Gear that requires 4).<br>
<h2>Default Controls</h2>
<table border="0" cellspacing="6" width="90%">
<tr>
<td width="150" valign="top"><b>Enter</b></td>
<td>Accept and apply the changes, and return to the previous mode.</td>
</tr>
<tr>
<td valign="top"><b>Escape</b></td>
<td>Discard the changes and return to the previous mode.</td>
</tr>
</table>
</p>
</div>
</body>

View file

@ -0,0 +1,176 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Vertex Slope Assistant</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="default.css" media="screen" title="Default" />
<script type="text/javascript" src="scripts.js"></script>
</head>
<body>
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="keyword" value="Vertex Slope Assistant">
</object>
<div id="title"><h1>Vertex Slope Assistant</h1></div>
<div id="contents">
<p>
NEW IN UNOFFICIAL 2.10!<br>
Tool to assist on creating and managing Vertex Slopes.<br>
(Only for SRB2 and SRB2 Kart!)<br>
<br>
This mode shows a small dialog window that you can use to manage your Vertex Slopes.<br>
Although this mode shows a dialog window, you can still use the main interface and zoom/move your view around the map.<br>
<br>
This mode is volatile, which means that this mode returns to the previous stable mode when the map is saved or closed, either accepting or discarding your preview changes. You can access this mode through the <a href="e_things.html">Things Mode</a>.<br>
<h2>Creating Vertex Slopes</h2>
There's 2 ways to create vertex slopes, either by using a Triangle Group or 3x Vertex Groups.<br>
Note: To create a new group the selected tag should not have an existing group!<br>
<h2>Creating Vertex Slopes with Triangle Group</h2>
Triangle groups allow to quickly create triangles with individual vertices.<br>
• Select a free unused tag in "Tag #" or clicking "New" next to "Tag #".<br>
• If no shape exists on map use "Draw New Tagged Triangle" to create both shape and vertex slopes, otherwise use "New Triangle Group" and mark the corner points of the triangle geometry.<br>
• You can adjust heights of each individual vertex slope after the group has been created.<br>
• On map, right-click one of the linedef that form the triangle and apply the correct action.<br>
<h2>Creating Vertex Slopes with 3 Vertex Groups</h2>
Vertex groups allows sharing vertex slopes between triangles to optimize resources.<br>
If no shape exists on map you can use "Draw New Empty Triangle" to quickly create a triangle shape.<br>
• Select a free unused tag in "Tag #" or clicking "New" next to "Tag #".<br>
• If a corner of the triangle geometry doesn't have a vertex slope create one with "New Triangle Vertex".<br>
• Repeat those steps for each corner of the triangle.<br>
• On map, right-click one of the linedef that form the triangle and apply the correct action, you'll need to double-click on the list the other 2 groups that form the triangle.<br>
<h2>Managing Vertex Slopes</h2>
You can select a vertex slope group by left-clicking a group in the listbox, alternatively you can left-click a triangle group in the map (doesn't work on vertex groups).<br>
To manage the group you either can right-click in the listbox, use the toolstrip buttons or right-click on the map.<br>
Note: Different set of options are available depending if the selected tag have an existing group or not.<br>
<h2>Dialog Settings</h2>
<table border="0" cellspacing="6" width="90%">
<tr>
<td width="150" valign="top"><b>Tag #</b></td>
<td>Tag number to be used for the vertex slope, should be between 1 to 65535.</td>
</tr>
<tr>
<td valign="top"><b>New <i>(next to Tag #)</i></b></td>
<td>Find a new unused tag, that is, not being used by any sector or linedef.</td>
</tr>
<tr>
<td valign="top"><b>Move Vertex Slopes...</b></td>
<td>When checked, all Vertex Slopes will slightly move inside the the triangle so height can be adjusted freely without any neighbour sectors affecting it but this will also cause an error of >= 1 pixel on the slope edges.<br>
This setting affects: Create New Triangle, New Triangle Group and Remake Group (On triangle groups only).</td>
</tr>
<tr>
<td valign="top"><b><i>Vertex Slope listbox</i></b></td>
<td>Select tagged group of vertex slopes for editing. Right-click will open context menu.</td>
</tr>
<tr>
<td valign="top"><b>Selected Vertex Slope Group</b></td>
<td>Set position and height of all Vertex Slopes.</td>
</tr>
<tr>
<td valign="top"><b>Absolute Z (unique for each vertex)</b></td>
<td>When checked the Z position of vertex will be absolute otherwise the value is added into sector height. Note: Absolute Z cannot be positioned less than zero.</td>
</tr>
<tr>
<td valign="top"><b>Rotate (All)</b></td>
<td>Rotate the Vertex Slope order on the triangle. Affects position and height.</td>
</tr>
<tr>
<td valign="top"><b>Flip (All)</b></td>
<td>Flip the 2nd and 3rd Vertex Slope order on the triangle. Affects position and height.</td>
</tr>
<tr>
<td valign="top"><b>Rotate (Height)</b></td>
<td>Rotate the Vertex Slope order on the triangle but only affects Height. Useful if you remade the group with the wrong order.</td>
</tr>
<tr>
<td valign="top"><b>Flip (Height)</b></td>
<td>Flip the 2nd and 3rd Vertex Slope order on the triangle. Useful if you remade the group with the wrong order.</td>
</tr>
<tr>
<td valign="top"><b>Adj. Heights</b></td>
<td>Adjust all heights together. Any negative value will be clipped to zero.</td>
</tr>
</table>
<h2>Vertex Slope Group options</h2>
<table border="0" cellspacing="6" width="90%">
<tr>
<td width="150" valign="top"><b>New Triangle Group</b></td>
<td>Create a new Triangle Group that consist of 3 vertex slopes.</td>
</tr>
<tr>
<td valign="top"><b>New Vertex Group</b></td>
<td>Create a new Vertex Group that consist of a single vertex slope.</td>
</tr>
<tr>
<td valign="top"><b>Remake Group</b></td>
<td>Remake selected tagged group by moving the vertex slope(s) position. Invalid group will be valid by having 3 vertex slopes only. Single vertex group will only remake 1 vertex.</td>
</tr>
<tr>
<td valign="top"><b>Remake Group as Triangle</b></td>
<td>Remake selected tagged group by moving the vertex slope(s) position. Invalid group will be valid by having 3 vertex slopes only. Group will be remade with 3 vertex slopes.</td>
</tr>
<tr>
<td valign="top"><b>Remake Group as Vertex</b></td>
<td>Remake selected tagged group by moving the vertex slope(s) position. Invalid group will be valid by having 1 vertex slope only. Group will be remade with a single vertex slope.</td>
</tr>
<tr>
<td valign="top"><b>Change Group Tag</b></td>
<td>Set a new tag to the selected tagged group. Using a tag that belong to another group is not allowed.</td>
</tr>
<tr>
<td valign="top"><b>Delete Group</b></td>
<td>Delete current tagged group, all vertex slopes will be erased!</td>
</tr>
<tr>
<td valign="top"><b>Draw New Tagged Triangle</b></td>
<td>Draw a new triangle shape with linedefs and attach 3 tagged vertex slopes inside it. Right-click any linedef inside the map to setup a vertex slope action.</td>
</tr>
<tr>
<td valign="top"><b>Draw New Empty Triangle</b></td>
<td>Draw a new triangle shape with linedefs.</td>
</tr>
</table>
<h2>Default Controls</h2>
<table border="0" cellspacing="6" width="90%">
<tr>
<td width="150" valign="top"><b>Enter</b></td>
<td>Accept and apply all changes, and return to the previous mode.</td>
</tr>
<tr>
<td valign="top"><b>Escape</b></td>
<td>Discard all changes and return to the previous mode.</td>
</tr>
<tr>
<td valign="top"><b>Backspace</b></td>
<td>While creating or remarking: Removes the last drawn vertex.</td>
</tr>
<tr>
<td valign="top"><b>LMB</b></td>
<td>While creating or remarking: Marks a new point.<br>In selection mode: Selects a triangle group.</td>
</tr>
<tr>
<td valign="top"><b>RMB</b></td>
<td>Brings up context menu.</td>
</tr>
<tr>
<td valign="top"><b>Shift+MWheel</b></td>
<td>Increase or decrease Tag #.</td>
</tr>
<tr>
<td valign="top"><b>Ctrl+MWheel</b></td>
<td>Increase or decrease Tag #.</td>
</tr>
</table>
</p>
</div>
</body>

200
Help/mode_drawshape.html Normal file
View file

@ -0,0 +1,200 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Draw Shape Mode</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="default.css" media="screen" title="Default" />
<script type="text/javascript" src="scripts.js"></script>
</head>
<body>
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="keyword" value="Draw Shape Mode">
</object>
<div id="title"><h1>Draw Shape Mode</h1></div>
<div id="contents">
<p>
NEW IN UNOFFICIAL 2.10!<br>
Creates shapes, this tool peforms the same as <a href="gzdb/features/classic_modes/mode_drawellipse.html">Draw Ellipse Mode</a> and Insert Things Radially Mode but with added functionality.<br>
<b>Default key:</b> Alt-D.<br>
<br>
This mode lets you draw various shapes, including but not limited to:<br>
<table border="0" cellspacing="6" width="90%">
<tr>
<td width="150" valign="top"><b>Triangle</b></td>
<td>3 Sides, no spikiness.</td>
</tr>
<tr>
<td valign="top"><b>Square or Rectangle</b></td>
<td>4 Sides, no spikiness. Size depends of reference circle.</td>
</tr>
<tr>
<td valign="top"><b>Pentagon</b></td>
<td>5 Sides, no spikiness.</td>
</tr>
<tr>
<td valign="top"><b>Hexagon</b></td>
<td>6 Sides, no spikiness.</td>
</tr>
<tr>
<td valign="top"><b>Heptagon</b></td>
<td>7 Sides, no spikiness.</td>
</tr>
<tr>
<td valign="top"><b>Octagon</b></td>
<td>8 Sides, no spikiness.</td>
</tr>
<tr>
<td valign="top"><b>Circle or ellipse</b></td>
<td>High number of sides, no spikiness.</td>
</tr>
<tr>
<td valign="top"><b>Star</b></td>
<td>10 Sides, with spikiness, "spike inside".</td>
</tr>
<tr>
<td valign="top"><b>Gear</b></td>
<td>8+ Sides (multiple of 4), with spikiness, "spike gear".</td>
</tr>
<tr>
<td valign="top"><b>Pac-man</b></td>
<td>16+ Sides, no spikiness, 45º Start Angle, 270º Sweep Angle.</td>
</tr>
</table>
...each of this shapes can be sliced.<br>
All geometry will fit a reference circle in exception of spikes.<br>
Make sure to expand the right panel under "Draw Shape" to see the settings:<br>
<img src="mode_drawshape.png" /><br>
<h2>Dialog Settings</h2>
<table border="0" cellspacing="6" width="90%">
<tr>
<td width="150" valign="top"><b>Preview Reference</b></td>
<td>Visual only. The reference circle will be shown on screen when checked.</td>
</tr>
<tr>
<td valign="top"><b>Ellipse</b></td>
<td>Shape can only be scaled in one axis when unchecked, this also allows to be much easier to setup angles with the mouse.</td>
</tr>
<tr>
<td valign="top"><b>1st Point as...</b></td>
<td>Select how the shape will be placed in the map: starting from origin, replicate Draw Ellipse Mode behaviour or side/corner into origin.</td>
</tr>
<tr>
<td width="150" valign="top"><b>Create shape as...</b></td>
<td>Select which type of elements to create, see below for more information.</td>
</tr>
<tr>
<td valign="top"><b>Front Outside /<br>Flip Linedefs</b></td>
<td>Shape linedefs will point outside when checked, ignored if "Create shape as.." is "Vertices" or "Things".</td>
</tr>
<tr>
<td valign="top"><b>Sides</b></td>
<td>Sets number of sides that the shape should have, note that reducing sweep angle won't reduce the number of sides.</td>
</tr>
<tr>
<td valign="top"><b>Spikiness</b></td>
<td>Sets percentage of spikiness. Except "Draw Ellipse behaviour" spike type, in that case spikiness is in mp.</td>
</tr>
<tr>
<td valign="top"><b><i>Spike type combo box</i></b></td>
<td>Controls how spikes behave in relation to the Spikiness level, see below for more information.</td>
</tr>
<tr>
<td valign="top"><b>Start Angle</b></td>
<td>Controls the starting angle of the first point.</td>
</tr>
<tr>
<td valign="top"><b>Sweep Angle</b></td>
<td>Controls the sweep angle of the slice, 360º will create a closed shape without slices.</td>
</tr>
<tr>
<td valign="top"><b>Lock to one quadrant</b></td>
<td>Locks start angle to top-right quadrant when checked, internally the angle will automatically adjust based of which quadrant the mouse is in.</td>
</tr>
</table>
<h2>"Create as..." types</h2>
<table border="0" cellspacing="6" width="90%">
<tr>
<td width="150" valign="top"><b>Close shape<br>towards origin</b></td>
<td>Sliced shape will be cut towards origin creating a pie look.</td>
</tr>
<tr>
<td valign="top"><b>Close shape<br>first to last vertex</b></td>
<td>Sliced shape will be closed by a linedef connected from the first to last vertex of the shape.</td>
</tr>
<tr>
<td valign="top"><b>Open or close shape</b></td>
<td>Sliced shape won't be closed.</td>
</tr>
<tr>
<td valign="top"><b>Shape w/o intersect<br>or sectors</b></td>
<td>Creates an isolated shape that won't intersect or merge into elements on the map. Not recommended.</td>
</tr>
<tr>
<td valign="top"><b>Vertices</b></td>
<td>Creates a shape without linedefs.</td>
</tr>
<tr>
<td valign="top"><b>Thing</b></td>
<td>Creates a thing at each point of the shape.</td>
</tr>
</table>
<h2>Spike types combo box</h2>
<table border="0" cellspacing="6" width="90%">
<tr>
<td width="150" valign="top"><b>Spike outside</b></td>
<td>Spike will go outside of the reference circle.</td>
</tr>
<tr>
<td width="150" valign="top"><b>Spike inside</b></td>
<td>Spike will go inside of the reference circle, spikiness should not be more than 100!</td>
</tr>
<tr>
<td valign="top"><b>Spike zig-zag</b></td>
<td>Spike will go outside and inside of the reference circle causing it to be 2x more severe, spikiness should not be more than 100!</td>
</tr>
<tr>
<td valign="top"><b>Spike gear</b></td>
<td>Spike create a gear shape inside and outside of the reference circle, spikiness should not be more than 100! Number of sides must be multiple of 4 in this type.</td>
</tr>
<tr>
<td valign="top"><b>DrawEllipse behaviour</b></td>
<td>Simulates Draw Ellipse bevel behaviour, in this case the spikiness will be distance of spikes away from the reference circle rather than a percentage.</td>
</tr>
</table>
If Spikiness is more than 0 then sides must be multiple of 2 (except Spike Gear that requires 4).<br>
<h2>Default Controls</h2>
<table border="0" cellspacing="6" width="90%">
<tr>
<td width="150" valign="top"><b>Alt+D</b></td>
<td>Start this drawing mode (available from any classic mode).</td>
</tr>
<tr>
<td width="150" valign="top"><b>Enter</b></td>
<td>Accept and apply the changes, and return to the previous mode.</td>
</tr>
<tr>
<td valign="top"><b>Escape</b></td>
<td>Discard the changes and return to the previous mode.</td>
</tr>
<tr>
<td valign="top"><b>Drag Middle Button</b></td>
<td>Sets Start Angle in relation to the origin and mouse position.</td>
</tr>
<tr>
<td valign="top"><b>Drag Middle Button while holding Ctrl</b></td>
<td>Sets Sweep Angle in relation to the origin, start angle and mouse position.</td>
</tr>
</table>
</p>
</div>
</body>

BIN
Help/mode_drawshape.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View file

@ -170,6 +170,13 @@
<Compile Include="Actions\ActionManager.cs" />
<Compile Include="Config\CompilerInfo.cs" />
<Compile Include="Config\ConfigurationInfo.cs" />
<Compile Include="Geometry\TracksTracer.cs" />
<Compile Include="GZBuilder\Controls\AngleControlF.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="GZBuilder\Controls\AngleControlF.designer.cs">
<DependentUpon>AngleControlF.cs</DependentUpon>
</Compile>
<Compile Include="GZBuilder\Controls\PairedFloatControl.cs">
<SubType>UserControl</SubType>
</Compile>
@ -442,6 +449,12 @@
<Compile Include="Windows\TextureSetForm.Designer.cs">
<DependentUpon>TextureSetForm.cs</DependentUpon>
</Compile>
<Compile Include="Windows\ThingBrowser2Form.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Windows\ThingBrowser2Form.designer.cs">
<DependentUpon>ThingBrowser2Form.cs</DependentUpon>
</Compile>
<Compile Include="Windows\ThingEditForm.cs">
<SubType>Form</SubType>
</Compile>
@ -557,6 +570,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="GZBuilder\Controls\AngleControlF.resx">
<DependentUpon>AngleControlF.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GZBuilder\Controls\PairedFloatControl.resx">
<DependentUpon>PairedFloatControl.cs</DependentUpon>
</EmbeddedResource>
@ -708,6 +724,7 @@
<None Include="Resources\ZBLogo.png" />
<None Include="Resources\axis1.png" />
<None Include="Resources\ZB16.png" />
<Content Include="Resources\Snap1mp.png" />
<Content Include="ZB.ico" />
<None Include="Resources\zonebuilder.png" />
<None Include="Resources\ZoneBuilder.bmp" />
@ -1332,6 +1349,9 @@
<SubType>Designer</SubType>
<DependentUpon>TextureSetForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Windows\ThingBrowser2Form.resx">
<DependentUpon>ThingBrowser2Form.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Windows\ThingBrowserForm.resx">
<SubType>Designer</SubType>
<DependentUpon>ThingBrowserForm.cs</DependentUpon>

View file

@ -35,7 +35,7 @@ namespace CodeImp.DoomBuilder.Controls
private List<GeneralizedCategory> generalizedcategories;
private List<GeneralizedOption> generalizedoptions; //mxd
private bool controlpressed;
private readonly bool grayout;
private bool grayout;
// Constants
private const string NUMBER_SEPERATOR = "\t";
@ -43,16 +43,17 @@ namespace CodeImp.DoomBuilder.Controls
// Properties
public bool Empty { get { return (number.Text.Length == 0); } set { if(value) number.Text = ""; } }
public int Value { get { return GetValue(); } set { number.Text = value.ToString(); } }
public bool GrayOut { get { return grayout; } set { grayout = value; } }
public List<GeneralizedCategory> GeneralizedCategories { get { return generalizedcategories; } set { generalizedcategories = value; } }
public List<GeneralizedOption> GeneralizedOptions { get { return generalizedoptions; } set { generalizedoptions = value; } } //mxd
// Constructor
public ActionSelectorControl(bool grayout = true)
public ActionSelectorControl()
{
// Initialize
InitializeComponent();
number.MouseWheel += number_OnMouseWheel; //mxd
this.grayout = grayout;
this.grayout = true;
}
// This returns the numeric value

View file

@ -39,14 +39,13 @@ namespace CodeImp.DoomBuilder.Controls
#region ================== Properties
public event KeyEventHandler OnKeyReleased; //mxd. Sometimes it's handeled here, not by MainForm
public Point LocationAbs { get { return this.PointToScreen(new Point(-(General.MainWindow.Width - General.MainWindow.ClientSize.Width) / 2, 0)); } } //mxd
#endregion
#region ================== Constructor / Disposer
// Constructor
internal RenderTargetControl()
public RenderTargetControl()
{
// Initialize
this.SetStyle(ControlStyles.FixedWidth, true);
@ -77,11 +76,17 @@ namespace CodeImp.DoomBuilder.Controls
{
if(OnKeyReleased != null) OnKeyReleased(this, e);
}
#endregion
#region ================== Methods
//JBR removed from properties as was causing issues in Component Properties panel
public Point GetLocationAbs()
{
return this.PointToScreen(new Point(-(General.MainWindow.Width - General.MainWindow.ClientSize.Width) / 2, 0));
}
// This sets up the control to display the splash logo
public void SetSplashLogoDisplay()
{

View file

@ -39,11 +39,11 @@
this.Name = "AngleControl";
this.Size = new System.Drawing.Size(40, 40);
this.toolTip.SetToolTip(this, "Left-click (and drag) to set angle snapped to 45-degree increment.\r\nRight-click (" +
"and drag) to set precise angle.");
"and drag) to set precise angle.\r\nMiddle-click (and drag) to set loop number.");
this.Load += new System.EventHandler(this.AngleSelector_Load);
this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.AngleSelector_MouseMove);
this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.AngleSelector_MouseDown);
this.SizeChanged += new System.EventHandler(this.AngleSelector_SizeChanged);
this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.AngleSelector_MouseDown);
this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.AngleSelector_MouseMove);
this.ResumeLayout(false);
}

View file

@ -9,9 +9,11 @@ using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Geometry;
using System.ComponentModel;
#endregion
//JBR Loops implementation by me, rest remains untouched
namespace CodeImp.DoomBuilder.GZBuilder.Controls
{
public partial class AngleControl : UserControl
@ -20,12 +22,17 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls
private int angle;
private int angleoffset;
private bool allowLoops = true; //JBR
private bool startAtOne = true; //JBR
private int turnThrehold = 16; //JBR
private Rectangle drawRegion;
private const int drawOffset = 2;
private const int markScaler = 5;
private Point origin;
private Point startClick; //JBR
//UI colors
private readonly Color fillColor = SystemColors.Window;
private readonly Color fillInactiveColor = SystemColors.Control;
@ -35,6 +42,8 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls
private readonly Color needleInactiveColor = SystemColors.ControlDarkDark;
private readonly Color marksColor = SystemColors.ActiveBorder;
private readonly Color marksInactiveColor = SystemColors.ControlDark;
private readonly Color turnTextColor = SystemColors.ControlText;
private readonly Color turnTextInactiveColor = SystemColors.ControlDarkDark;
#endregion
@ -46,6 +55,33 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls
public int AngleOffset { get { return angleoffset; } set { angleoffset = value; this.Refresh(); } }
public const int NO_ANGLE = int.MinValue;
[Description("Allow loop changing, setting to false will restore old behaviour.")]
[DefaultValue(true)]
public bool AllowLoops //JBR
{
get { return allowLoops; }
set
{
allowLoops = value;
if (value)
{
this.toolTip.SetToolTip(this, "Left-click (and drag) to set snapped angle.\r\nRight-click (and drag) to set precise angle.\r\nMiddle-click (and drag) to set loop number.");
}
else
{
this.toolTip.SetToolTip(this, "Left-click (and drag) to set snapped angle.\r\nRight-click (and drag) to set precise angle.");
}
}
}
[Description("Start at loop 1 instead of loop 0, useful for checkpoint number match in SRB2.")]
[DefaultValue(true)]
public bool StartAtOne { get { return startAtOne; } set { startAtOne = value; } } //JBR
[Description("Drag distance in pixels for user to change the loop number.")]
[DefaultValue(16)]
public int TurnThrehold { get { return turnThrehold; } set { turnThrehold = value; } } //JBR
#endregion
public AngleControl()
@ -87,6 +123,13 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls
return ((int)Math.Round(Math.Atan2(-yDiff, xDiff) * 180.0 / Angle2D.PI) + 360) % 360;
}
private static int GetNumLoops(int angle) //JBR
{
if (angle == NO_ANGLE) return 0;
if (angle > 0) return angle / 360;
return (angle - 359) / 360;
}
#endregion
#region Events
@ -111,14 +154,16 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls
Pen marks;
SolidBrush fill;
Brush center;
Brush text;
if(this.Enabled)
if (this.Enabled)
{
outline = new Pen(outlineColor, 2.0f);
fill = new SolidBrush(fillColor);
needle = new Pen(needleColor);
center = new SolidBrush(needleColor);
marks = new Pen(marksColor);
text = new SolidBrush(turnTextColor);
}
else
{
@ -127,6 +172,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls
needle = new Pen(needleInactiveColor);
center = new SolidBrush(needleInactiveColor);
marks = new Pen(marksInactiveColor);
text = new SolidBrush(turnTextInactiveColor);
}
Rectangle originSquare = new Rectangle(origin.X - 1, origin.Y - 1, 3, 3);
@ -138,15 +184,34 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls
// Draw angle marks
int offset = this.Height / markScaler;
for(int i = 0; i < 360; i += 45)
for (int i = 0; i < 360; i += 45)
{
PointF p1 = DegreesToXY(i, origin.X - 6, origin);
PointF p2 = DegreesToXY(i, origin.X - offset, origin);
g.DrawLine(marks, p1, p2);
}
//JBR Draw loop number
if (allowLoops)
{
int loop = GetNumLoops(angle);
if (startAtOne && loop >= 0) loop++;
string loopStr = "↺" + loop.ToString();
StringFormat strFormat = new StringFormat();
strFormat.LineAlignment = StringAlignment.Far;
strFormat.Alignment = StringAlignment.Far;
if (loop != (startAtOne ? 1 : 0))
{
g.DrawString(loopStr, Font, fill, drawRegion.Right - 1, drawRegion.Bottom - 1, strFormat);
g.DrawString(loopStr, Font, fill, drawRegion.Right + 1, drawRegion.Bottom - 1, strFormat);
g.DrawString(loopStr, Font, fill, drawRegion.Right - 1, drawRegion.Bottom + 1, strFormat);
g.DrawString(loopStr, Font, fill, drawRegion.Right + 1, drawRegion.Bottom + 1, strFormat);
g.DrawString(loopStr, Font, text, drawRegion.Right, drawRegion.Bottom, strFormat);
}
}
// Draw needle
if(angle != NO_ANGLE)
if (angle != NO_ANGLE)
{
PointF anglePoint = DegreesToXY(angle, origin.X - 4, origin);
g.DrawLine(needle, origin, anglePoint);
@ -165,17 +230,21 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls
base.OnPaint(e);
}
private void AngleSelector_MouseDown(object sender, MouseEventArgs e)
private void AngleSelector_MouseDown(object sender, MouseEventArgs e) //JBR supports looping
{
int thisAngle = XYToDegrees(new Point(e.X, e.Y), origin);
startClick = new Point(e.X, e.Y);
if(e.Button == MouseButtons.Left)
if (e.Button == MouseButtons.Middle) return;
int thisAngle = XYToDegrees(startClick, origin);
if (e.Button == MouseButtons.Left)
{
thisAngle = (int)Math.Round(thisAngle / 45f) * 45;
if(thisAngle == 360) thisAngle = 0;
}
if (allowLoops) thisAngle += GetNumLoops(angle) * 360;
if(thisAngle != angle)
if (thisAngle != angle)
{
angle = thisAngle;
if(!this.DesignMode && AngleChanged != null) AngleChanged(this, EventArgs.Empty); //Raise event
@ -183,19 +252,40 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls
}
}
private void AngleSelector_MouseMove(object sender, MouseEventArgs e)
private void AngleSelector_MouseMove(object sender, MouseEventArgs e) //JBR supports looping
{
if(e.Button == MouseButtons.Left || e.Button == MouseButtons.Right)
if (allowLoops && e.Button == MouseButtons.Middle)
{
int thisAngle = XYToDegrees(new Point(e.X, e.Y), origin);
int dist = (e.X - startClick.X) - (e.Y - startClick.Y);
if (dist < -turnThrehold || dist >= turnThrehold)
{
startClick = new Point(e.X, e.Y);
int thisAngle = angle + 360;
if (dist < 0) thisAngle = angle - 360;
if(e.Button == MouseButtons.Left)
if (thisAngle != angle)
{
angle = thisAngle;
if (!this.DesignMode && AngleChanged != null) AngleChanged(this, EventArgs.Empty); //Raise event
this.Refresh();
}
}
}
if (e.Button == MouseButtons.Left || e.Button == MouseButtons.Right)
{
startClick = new Point(e.X, e.Y);
int thisAngle = XYToDegrees(startClick, origin);
if (e.Button == MouseButtons.Left)
{
thisAngle = (int)Math.Round(thisAngle / 45f) * 45;
if(thisAngle == 360) thisAngle = 0;
}
if(thisAngle != angle)
if (allowLoops) thisAngle += GetNumLoops(angle) * 360;
if (thisAngle != angle)
{
angle = thisAngle;
if(!this.DesignMode && AngleChanged != null) AngleChanged(this, EventArgs.Empty); //Raise event

View file

@ -0,0 +1,55 @@
namespace CodeImp.DoomBuilder.GZBuilder.Controls
{
partial class AngleControlF
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if(disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
this.SuspendLayout();
//
// AngleControlF
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.Name = "AngleControlF";
this.Size = new System.Drawing.Size(40, 40);
this.toolTip.SetToolTip(this, "Left-click (and drag) to set snapped angle.\r\nRight-click (and drag) to set precis" +
"e angle.\r\nMiddle-click (and drag) to set loop number.");
this.Load += new System.EventHandler(this.AngleSelector_Load);
this.SizeChanged += new System.EventHandler(this.AngleSelector_SizeChanged);
this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.AngleSelector_MouseDown);
this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.AngleSelector_MouseMove);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.ToolTip toolTip;
}
}

View file

@ -0,0 +1,306 @@
#region Namespaces
//Downloaded from
//Visual C# Kicks - http://vckicks.110mb.com
//The Code Project - http://www.codeproject.com
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Geometry;
using System.ComponentModel;
#endregion
// JBR Float version of the AngleControl!
// Supports changing snap angle
namespace CodeImp.DoomBuilder.GZBuilder.Controls
{
public partial class AngleControlF : UserControl
{
#region Variables
private float angle;
private float angleoffset;
private bool allowLoops = true; //JBR
private bool startAtOne = true; //JBR
private int turnThrehold = 16; //JBR
private float snapangle = 45f; //JBR
private Rectangle drawRegion;
private const int drawOffset = 2;
private const int markScaler = 5;
private Point origin;
private Point startClick; //JBR
//UI colors
private readonly Color fillColor = SystemColors.Window;
private readonly Color fillInactiveColor = SystemColors.Control;
private readonly Color outlineColor = SystemColors.WindowFrame;
private readonly Color outlineInactiveColor = SystemColors.ControlDarkDark;
private readonly Color needleColor = SystemColors.ControlText;
private readonly Color needleInactiveColor = SystemColors.ControlDarkDark;
private readonly Color marksColor = SystemColors.ActiveBorder;
private readonly Color marksInactiveColor = SystemColors.ControlDark;
private readonly Color turnTextColor = SystemColors.ControlText;
private readonly Color turnTextInactiveColor = SystemColors.ControlDarkDark;
#endregion
#region Properties
public event EventHandler AngleChanged;
public float Angle { get { return (angle == NO_ANGLE ? NO_ANGLE : angle - angleoffset); } set { angle = (value == NO_ANGLE ? NO_ANGLE : value + angleoffset); this.Refresh(); } }
public float AngleOffset { get { return angleoffset; } set { angleoffset = value; this.Refresh(); } }
public const float NO_ANGLE = float.MinValue;
[Description("Allow loop changing, setting to false will restore old behaviour.")]
[DefaultValue(true)]
public bool AllowLoops //JBR
{
get { return allowLoops; }
set
{
allowLoops = value;
if (value)
{
this.toolTip.SetToolTip(this, "Left-click (and drag) to set snapped angle.\r\nRight-click (and drag) to set precise angle.\r\nMiddle-click (and drag) to set loop number.");
}
else
{
this.toolTip.SetToolTip(this, "Left-click (and drag) to set snapped angle.\r\nRight-click (and drag) to set precise angle.");
}
}
}
[Description("Start at loop 1 instead of loop 0, useful for checkpoint number match in SRB2.")]
[DefaultValue(true)]
public bool StartAtOne { get { return startAtOne; } set { startAtOne = value; } } //JBR
[Description("Drag distance in pixels for user to change the loop number.")]
[DefaultValue(16)]
public int TurnThrehold { get { return turnThrehold; } set { turnThrehold = value; } } //JBR
[Description("Snap angle in degrees.")]
[DefaultValue(45f)]
public float SnapAngle { get { return snapangle; } set { snapangle = value; } } //JBR
#endregion
public AngleControlF()
{
InitializeComponent();
this.DoubleBuffered = true;
}
#region Methods
private void SetDrawRegion()
{
drawRegion = new Rectangle(0, 0, this.Width, this.Height);
drawRegion.X += 2;
drawRegion.Y += 2;
drawRegion.Width -= 4;
drawRegion.Height -= 4;
origin = new Point(drawRegion.Width / 2 + drawOffset, drawRegion.Height / 2 + drawOffset);
this.Refresh();
}
private static PointF DegreesToXY(float degrees, float radius, Point origin)
{
PointF xy = new PointF();
float radians = degrees * Angle2D.PI / 180.0f;
xy.X = (float)Math.Cos(radians) * radius + origin.X;
xy.Y = (float)Math.Sin(-radians) * radius + origin.Y;
return xy;
}
private static float XYToDegrees(Point xy, Point origin)
{
float xDiff = xy.X - origin.X;
float yDiff = xy.Y - origin.Y;
float angle = ((float)Math.Atan2(-yDiff, xDiff) * 180f / Angle2D.PI) + 360f;
if (angle < 0f) angle += 360f;
if (angle >= 360f) angle -= 360f;
return angle;
}
private static int GetNumLoops(float angle) //JBR
{
if (angle == NO_ANGLE) return 0;
if (angle > 0f) return (int)angle / 360;
return ((int)angle - 359) / 360;
}
#endregion
#region Events
private void AngleSelector_Load(object sender, EventArgs e)
{
SetDrawRegion();
}
private void AngleSelector_SizeChanged(object sender, EventArgs e)
{
this.Height = this.Width; // Keep it there and keep it square!
SetDrawRegion();
}
protected override void OnPaint(PaintEventArgs e)
{
Graphics g = e.Graphics;
Pen outline;
Pen needle;
Pen marks;
SolidBrush fill;
Brush center;
Brush text;
if (this.Enabled)
{
outline = new Pen(outlineColor, 2.0f);
fill = new SolidBrush(fillColor);
needle = new Pen(needleColor);
center = new SolidBrush(needleColor);
marks = new Pen(marksColor);
text = new SolidBrush(turnTextColor);
}
else
{
outline = new Pen(outlineInactiveColor, 2.0f);
fill = new SolidBrush(fillInactiveColor);
needle = new Pen(needleInactiveColor);
center = new SolidBrush(needleInactiveColor);
marks = new Pen(marksInactiveColor);
text = new SolidBrush(turnTextInactiveColor);
}
Rectangle originSquare = new Rectangle(origin.X - 1, origin.Y - 1, 3, 3);
//Draw circle
g.SmoothingMode = SmoothingMode.AntiAlias;
g.DrawEllipse(outline, drawRegion);
g.FillEllipse(fill, drawRegion);
// Draw angle marks
int offset = this.Height / markScaler;
for (float di = 0f; di < 360f; di += snapangle)
{
PointF p1 = DegreesToXY(di, origin.X - 6, origin);
PointF p2 = DegreesToXY(di, origin.X - offset, origin);
g.DrawLine(marks, p1, p2);
}
//JBR Draw loop number
if (allowLoops)
{
int loop = GetNumLoops(angle);
if (startAtOne && loop >= 0) loop++;
string loopStr = "↺" + loop.ToString();
StringFormat strFormat = new StringFormat();
strFormat.LineAlignment = StringAlignment.Far;
strFormat.Alignment = StringAlignment.Far;
if (loop != (startAtOne ? 1 : 0))
{
g.DrawString(loopStr, Font, fill, drawRegion.Right - 1, drawRegion.Bottom - 1, strFormat);
g.DrawString(loopStr, Font, fill, drawRegion.Right + 1, drawRegion.Bottom - 1, strFormat);
g.DrawString(loopStr, Font, fill, drawRegion.Right - 1, drawRegion.Bottom + 1, strFormat);
g.DrawString(loopStr, Font, fill, drawRegion.Right + 1, drawRegion.Bottom + 1, strFormat);
g.DrawString(loopStr, Font, text, drawRegion.Right, drawRegion.Bottom, strFormat);
}
}
// Draw needle
if (angle != NO_ANGLE)
{
PointF anglePoint = DegreesToXY(angle, origin.X - 4, origin);
g.DrawLine(needle, origin, anglePoint);
}
g.SmoothingMode = SmoothingMode.HighSpeed; //Make the square edges sharp
g.FillRectangle(center, originSquare);
//mxd. Dispose brushes
fill.Dispose();
center.Dispose();
outline.Dispose();
marks.Dispose();
needle.Dispose();
base.OnPaint(e);
}
private void AngleSelector_MouseDown(object sender, MouseEventArgs e) //JBR supports looping
{
startClick = new Point(e.X, e.Y);
if (e.Button == MouseButtons.Middle) return;
float thisAngle = XYToDegrees(startClick, origin);
if (e.Button == MouseButtons.Left)
{
thisAngle = (float)Math.Round(thisAngle / snapangle) * snapangle;
if (thisAngle == 360f) thisAngle = 0f;
}
if (allowLoops) thisAngle += (float)GetNumLoops(angle) * 360f;
if (thisAngle != angle)
{
angle = thisAngle;
if (!this.DesignMode && AngleChanged != null) AngleChanged(this, EventArgs.Empty); //Raise event
this.Refresh();
}
}
private void AngleSelector_MouseMove(object sender, MouseEventArgs e) //JBR supports looping
{
if (allowLoops && e.Button == MouseButtons.Middle)
{
int dist = (e.X - startClick.X) - (e.Y - startClick.Y);
if (dist < -turnThrehold || dist >= turnThrehold)
{
startClick = new Point(e.X, e.Y);
float thisAngle = angle + 360f;
if (dist < 0) thisAngle = angle - 360f;
if (thisAngle != angle)
{
angle = thisAngle;
if (!this.DesignMode && AngleChanged != null) AngleChanged(this, EventArgs.Empty); //Raise event
this.Refresh();
}
}
}
if (e.Button == MouseButtons.Left || e.Button == MouseButtons.Right)
{
startClick = new Point(e.X, e.Y);
float thisAngle = XYToDegrees(startClick, origin);
if (e.Button == MouseButtons.Left)
{
thisAngle = (float)Math.Round(thisAngle / snapangle) * snapangle;
if (thisAngle == 360f) thisAngle = 0f;
}
if (allowLoops) thisAngle += (float)GetNumLoops(angle) * 360f;
if (thisAngle != angle)
{
angle = thisAngle;
if (!this.DesignMode && AngleChanged != null) AngleChanged(this, EventArgs.Empty); //Raise event
this.Refresh();
}
}
}
#endregion
}
}

View file

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View file

@ -2554,8 +2554,67 @@ namespace CodeImp.DoomBuilder
Cursor.Current = Cursors.Default;
}
//JBR
[BeginAction("snapvertsto1mp")]
private void SnapSelectedMapElementsTo1mp()
{
// Get selected elements
ICollection<Vertex> verts = map.GetSelectedVertices(true);
ICollection<Linedef> lines = map.GetSelectedLinedefs(true); // Sector lines are auto-selected when a sector is selected
ICollection<Thing> things = map.GetSelectedThings(true);
// Get vertices from selection
Dictionary<int, Vertex> vertstosnap = new Dictionary<int, Vertex>(verts.Count);
foreach (Vertex v in verts) vertstosnap.Add(v.Index, v);
foreach (Linedef l in lines)
{
if (!vertstosnap.ContainsKey(l.Start.Index)) vertstosnap.Add(l.Start.Index, l.Start);
if (!vertstosnap.ContainsKey(l.End.Index)) vertstosnap.Add(l.End.Index, l.End);
}
// Anything to snap?
if (vertstosnap.Count == 0 && things.Count == 0)
{
General.Interface.DisplayStatus(StatusType.Warning, "Select any map element first!");
return;
}
// Make undo
undoredo.CreateUndo("Force snap map elements to 1mp");
// Do the snapping
Cursor.Current = Cursors.AppStarting;
// Snap vertices?
int snappedverts = (vertstosnap.Count > 0 ? SnapVertices(vertstosnap.Values, false, true) : 0);
// Snap things?..
int snappedthings = (things.Count > 0 ? SnapThings(things, false, true) : 0);
// Assemble status message
List<string> message = new List<string>();
if (snappedverts > 0) message.Add(snappedverts + " vertices");
if (snappedthings > 0) message.Add(snappedthings + " things");
// Display status
General.Interface.DisplayStatus(StatusType.Info, "Force snapped " + string.Join(" and ", message.ToArray()));
// Invoke clear selection to update sector highlight overlay
//General.Actions.InvokeAction("builder_clearselection");
// Update cached values
General.Map.Map.Update();
// Map is changed
General.Map.IsChanged = true;
// Done
General.Interface.RedrawDisplay();
Cursor.Current = Cursors.Default;
}
//mxd
private int SnapVertices(IEnumerable<Vertex> verts)
private int SnapVertices(IEnumerable<Vertex> verts, bool snapToGrid = true, bool addAll = false) //JBR Added snapToGrid & addAll
{
int snappedCount = 0;
List<Vertex> movedVerts = new List<Vertex>();
@ -2565,9 +2624,10 @@ namespace CodeImp.DoomBuilder
foreach(Vertex v in verts)
{
Vector2D pos = v.Position;
v.SnapToGrid();
if (snapToGrid) v.SnapToGrid();
else v.Move(GridSetup.SnappedToGrid(v.Position, 1f, 1f));
if(v.Position.x != pos.x || v.Position.y != pos.y)
if (v.Position.x != pos.x || v.Position.y != pos.y || addAll)
{
snappedCount++;
movedVerts.Add(v);
@ -2654,7 +2714,7 @@ namespace CodeImp.DoomBuilder
}
//mxd
private static int SnapThings(IEnumerable<Thing> things)
private static int SnapThings(IEnumerable<Thing> things, bool snapToGrid = true, bool addAll = false) //JBR Added snapToGrid & addAll
{
int snappedCount = 0;
@ -2662,8 +2722,9 @@ namespace CodeImp.DoomBuilder
foreach(Thing t in things)
{
Vector2D pos = t.Position;
t.SnapToGrid();
if(t.Position.x != pos.x || t.Position.y != pos.y) snappedCount++;
if (snapToGrid) t.SnapToGrid();
else t.Move(GridSetup.SnappedToGrid(t.Position, 1f, 1f));
if (t.Position.x != pos.x || t.Position.y != pos.y || addAll) snappedCount++;
}
return snappedCount;

View file

@ -28,6 +28,7 @@ namespace CodeImp.DoomBuilder.Geometry
public const float PI = (float)Math.PI;
public const float PIHALF = (float)Math.PI * 0.5f;
public const float PIANDHALF = (float)Math.PI * 1.5f; //JBR
public const float PI2 = (float)Math.PI * 2f;
public const float PIDEG = 57.295779513082320876798154814105f;
public const float SQRT2 = 1.4142135623730950488016887242097f;

View file

@ -0,0 +1,290 @@
using System;
using System.Collections.Generic;
using CodeImp.DoomBuilder.Map;
using System.Collections.ObjectModel;
using CodeImp.DoomBuilder.IO;
//JBR Tracks tracer
namespace CodeImp.DoomBuilder.Geometry
{
public class TracksTracer
{
private List<List<Vector2D>> openpaths;
private List<List<Vector2D>> closepaths;
private bool isvalid;
public List<List<Vector2D>> OpenPaths { get { return openpaths; } }
public List<List<Vector2D>> ClosePaths { get { return closepaths; } }
public bool IsValid { get { return isvalid; } }
#region ==== Public methods ====
/// <summary>
/// Create tracks tracer class
/// </summary>
/// <param name="lines">Linedefs to trace</param>
public TracksTracer(ICollection<Linedef> lines)
{
isvalid = true;
// Get all vertices connected to the linedefs
List<Vertex> allvertices = new List<Vertex>();
foreach (Linedef ld in lines)
{
if (!allvertices.Contains(ld.Start)) allvertices.Add(ld.Start);
if (!allvertices.Contains(ld.End)) allvertices.Add(ld.End);
}
// Create a list of valid vertices
List<Vertex> vertices = new List<Vertex>();
foreach (Vertex v in allvertices)
{
List<Linedef> list = GetSelectedLinedefFromVertex(lines, v);
if (list.Count == 1 || list.Count == 2) vertices.Add(v);
}
// Scan for open paths
openpaths = new List<List<Vector2D>>();
List<Vector2D> processed = new List<Vector2D>(); // for holding processed locations
foreach (Vertex v in vertices)
{
if (!processed.Contains(v.Position))
{
List<Linedef> list1 = GetSelectedLinedefFromVertex(lines, v);
if (list1.Count == 1)
{
List<Vector2D> path = new List<Vector2D>();
processed.Add(v.Position);
path.Add(v.Position);
Vertex v2 = (list1[0].Start == v) ? list1[0].End : list1[0].Start;
bool reverse = (list1[0].Start == v);
do
{
processed.Add(v2.Position);
path.Add(v2.Position);
List<Linedef> list2 = GetSelectedLinedefFromVertex(lines, v2);
if (list2.Count == 1)
{
// Linedef continue on the opposide side
v2 = (list2[0].Start == v2) ? list2[0].End : list2[0].Start;
}
else if (list2.Count == 2)
{
// Linedef continue in one of the opposide sides
Vertex v3 = (list2[0].Start == v2) ? list2[0].End : list2[0].Start;
if (processed.Contains(v3.Position))
{
v2 = (list2[1].Start == v2) ? list2[1].End : list2[1].Start;
}
else
{
v2 = v3;
}
}
else
{
// Collided with a 3+ way vertex, no good...
isvalid = false;
break;
}
} while (!processed.Contains(v2.Position));
if (reverse) path.Reverse();
openpaths.Add(path);
}
}
}
// Scan for close paths
closepaths = new List<List<Vector2D>>();
foreach (Vertex v in vertices)
{
if (!processed.Contains(v.Position))
{
List<Linedef> list1 = GetSelectedLinedefFromVertex(lines, v);
List<Vector2D> path = new List<Vector2D>();
processed.Add(v.Position);
path.Add(v.Position);
Vertex v2 = (list1[0].Start == v) ? list1[0].End : list1[0].Start;
do
{
processed.Add(v2.Position);
path.Add(v2.Position);
List<Linedef> list2 = GetSelectedLinedefFromVertex(lines, v2);
if (list2.Count == 2)
{
// Linedef continue in one of the opposide sides
Vertex v3 = (list2[0].Start == v2) ? list2[0].End : list2[0].Start;
if (processed.Contains(v3.Position))
{
v2 = (list2[1].Start == v2) ? list2[1].End : list2[1].Start;
}
else
{
v2 = v3;
}
}
else
{
// Collided with a 3+ way vertex, no good...
isvalid = false;
break;
}
} while (!processed.Contains(v2.Position));
path.Add(path[0]); // Close it by looping back to 0
if (!InsideCheckFlip(path)) path.Reverse(); // Reverse if parallel was created outside
closepaths.Add(path);
}
}
}
/// <summary>
/// Parallelize open-path, used to create roads
/// </summary>
/// <param name="path">Path in OpenPaths</param>
/// <param name="distance">Distance between parallels / Width of the track</param>
/// <param name="flip">Flip to the other side?</param>
/// <returns>Parallel path</returns>
public static List<Vector2D> ParallelizeOpenPath(List<Vector2D> path, float distance, bool flip)
{
List<Vector2D> parallel = new List<Vector2D>();
if (path.Count < 2) return parallel;
parallel.Add(GetPerpendicular3(path[0], path[0], path[1], distance, flip));
int i = 2;
for (; i < path.Count; i++)
{
parallel.Add(GetPerpendicular3(path[i - 2], path[i - 1], path[i], distance, flip));
}
parallel.Add(GetPerpendicular3(path[i - 2], path[i - 1], path[i - 1], distance, flip));
return parallel;
}
/// <summary>
/// Parallelize close-path, used to create roads
/// </summary>
/// <param name="path">Path in ClosePaths</param>
/// <param name="distance">Distance between parallels / Width of the track</param>
/// <param name="flip">Flip to the other side?</param>
/// <returns>Parallel path</returns>
public static List<Vector2D> ParallelizeClosePath(List<Vector2D> path, float distance, bool flip)
{
List<Vector2D> parallel = new List<Vector2D>();
if (path.Count < 2) return parallel;
int i = path.Count;
parallel.Add(GetPerpendicular3(path[i - 2], path[0], path[1], distance, flip));
for (i = 2; i < path.Count; i++)
{
parallel.Add(GetPerpendicular3(path[i - 2], path[i - 1], path[i], distance, flip));
}
parallel.Add(GetPerpendicular3(path[i - 2], path[i - 1], path[1], distance, flip));
return parallel;
}
/// <summary>
/// Add path into DrawnVertex list
/// </summary>
/// <param name="dvl">DrawnVertex list</param>
/// <param name="path">Path to add</param>
/// <param name="stitch">Stitch?</param>
/// <param name="stitchline">Stitchline?</param>
/// <returns>Number of elements added</returns>
public static int AddPathToDrawnVertex(List<DrawnVertex> dvl, List<Vector2D> path, bool stitch, bool stitchline)
{
int elements = 0;
DrawnVertex newpoint = new DrawnVertex(); // struct
newpoint.stitch = stitch;
newpoint.stitchline = stitchline;
foreach (Vector2D pos in path)
{
if (pos.x < General.Map.Config.LeftBoundary || pos.x > General.Map.Config.RightBoundary ||
pos.y > General.Map.Config.TopBoundary || pos.y < General.Map.Config.BottomBoundary)
continue;
newpoint.pos = pos;
dvl.Add(newpoint);
elements++;
}
return elements;
}
/// <summary>
/// Add point into DrawnVertex list
/// </summary>
/// <param name="dvl">DrawnVertex list</param>
/// <param name="pos">Point to add</param>
/// <param name="stitch">Stitch?</param>
/// <param name="stitchline">Stitchline?</param>
/// <returns>Number of elements added, 1 if success</returns>
public static int AddPointToDrawnVertex(List<DrawnVertex> dvl, Vector2D pos, bool stitch, bool stitchline)
{
if (pos.x < General.Map.Config.LeftBoundary || pos.x > General.Map.Config.RightBoundary ||
pos.y > General.Map.Config.TopBoundary || pos.y < General.Map.Config.BottomBoundary)
return 0;
DrawnVertex newpoint = new DrawnVertex();
newpoint.pos = pos;
newpoint.stitch = stitch;
newpoint.stitchline = stitchline;
dvl.Add(newpoint);
return 1;
}
#endregion
#region ==== Private methods ====
private bool InsideCheckFlip(List<Vector2D> track)
{
if (track.Count < 2) return false;
// Calculate median point
double x = 0, y = 0;
foreach (Vector2D v in track)
{
x += v.x;
y += v.y;
}
x /= track.Count;
y /= track.Count;
Vector2D median = new Vector2D((float)x, (float)y);
// See which side is the first track line
Line2D line = new Line2D(track[0], track[1]);
return line.GetSideOfLine(median) >= 0;
}
/// <summary>
/// Get selected linedefs from a vertex
/// </summary>
/// <param name="lines">Collection of lines</param>
/// <param name="v">Vertex to get linedefs from</param>
/// <returns>List of all selected linedefs</returns>
private List<Linedef> GetSelectedLinedefFromVertex(ICollection<Linedef> lines, Vertex v)
{
List<Linedef> list = new List<Linedef>();
foreach (Linedef ld in v.Linedefs)
{
if (lines.Contains(ld)) list.Add(ld);
}
return list;
}
/// <summary>
/// Create line on the center vertex that is perpendicular to left and right vertices
/// </summary>
/// <param name="left">Left vertex</param>
/// <param name="center">Center vertex</param>
/// <param name="right">Right vertex</param>
/// <param name="scale">Scale of the perpendicular line</param>
/// <param name="backwards">Should perpendicular go backwards?</param>
/// <returns>Position of the perpendicular</returns>
private static Vector2D GetPerpendicular3(Vector2D left, Vector2D center, Vector2D right, float scale, bool backwards)
{
Vector2D deltapos = (right - center).GetNormal() - (left - center).GetNormal();
if (backwards) deltapos = -deltapos;
Vector2D normalunit = deltapos.GetPerpendicular().GetNormal();
return center + normalunit * scale;
}
#endregion
}
}

View file

@ -341,6 +341,26 @@ namespace CodeImp.DoomBuilder.Geometry
return new Vector2D(rx, ry);
}
//JBR Linear interpolate into...
public Vector2D LinearInto(Vector2D dest, float delta)
{
float px = x + (dest.x - x) * delta;
float py = y + (dest.y - y) * delta;
return new Vector2D(px, py);
}
//JBR Check if close to another vector (square collision)
public bool CloseTo(Vector2D dest, float epsilon)
{
return Math.Abs(dest.x - x) <= epsilon && Math.Abs(dest.y - y) <= epsilon;
}
//JBR Round coordinates
public Vector2D GetRounded()
{
return new Vector2D((float)Math.Round(x), (float)Math.Round(y));
}
// Checks if the Vector has valid values for x and y
public bool IsFinite()
{

File diff suppressed because it is too large Load diff

View file

@ -264,7 +264,7 @@
</data>
<data name="ScriptConstant" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ScriptConstant.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</data>
<data name="FolderExplore" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\FolderExplore.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -574,4 +574,7 @@
<data name="ScriptProperty" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ScriptProperty.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Snap1mp" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Snap1mp.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View file

@ -142,6 +142,17 @@ snapvertstogrid
allowscroll = false;
}
//JBR
snapvertsto1mp
{
title = "Force Snap Selected Elements to 1mp";
category = "edit";
description = "Force snap selected map elements to 1mp.";
allowkeys = true;
allowmouse = false;
allowscroll = false;
}
configuration
{
title = "Game Configurations";

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 B

File diff suppressed because it is too large Load diff

View file

@ -117,65 +117,63 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="label5.GenerateMember" type="System.Boolean, mscorlib">
<metadata name="label5.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="label5.Locked" type="System.Boolean, mscorlib">
</metadata>
<metadata name="label5.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="label6.GenerateMember" type="System.Boolean, mscorlib">
</metadata>
<metadata name="label6.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="label6.Locked" type="System.Boolean, mscorlib">
</metadata>
<metadata name="label6.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="label3.GenerateMember" type="System.Boolean, mscorlib">
</metadata>
<metadata name="label3.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="label3.Locked" type="System.Boolean, mscorlib">
</metadata>
<metadata name="label3.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
</metadata>
<data name="label3.Text" xml:space="preserve">
<value>The nodebuilder is a compiler which builds geometry structures for your map. You need these structures to be able to play the map in the game. For each purpose you can choose the desired nodebuilder configuration here.</value>
</data>
<data name="label2.GenerateMember" type="System.Boolean, mscorlib">
<metadata name="label2.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="label2.Locked" type="System.Boolean, mscorlib">
</metadata>
<metadata name="label2.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="label7.GenerateMember" type="System.Boolean, mscorlib">
</metadata>
<metadata name="label7.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="label7.Locked" type="System.Boolean, mscorlib">
</metadata>
<metadata name="label7.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="label9.GenerateMember" type="System.Boolean, mscorlib">
</metadata>
<metadata name="label9.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="label1.GenerateMember" type="System.Boolean, mscorlib">
</metadata>
<metadata name="label1.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="label4.GenerateMember" type="System.Boolean, mscorlib">
</metadata>
<metadata name="label4.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="label4.Locked" type="System.Boolean, mscorlib">
</metadata>
<metadata name="label4.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="label10.GenerateMember" type="System.Boolean, mscorlib">
</metadata>
<metadata name="label10.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="label10.Locked" type="System.Boolean, mscorlib">
</metadata>
<metadata name="label10.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
</metadata>
<data name="label10.Text" xml:space="preserve">
<value>Here you can select the editing modes that you wish to use in this configuration. This is useful in case there are plugins with additional editing modes that can be used as a replacement for the original editing modes.</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing">
<metadata name="tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>416, 17</value>
</data>
</metadata>
<data name="labelparameters.ToolTip" xml:space="preserve">
<value>%F - WAD file with the map that is to be tested. NOTE: this is a temporary file and not the file you opened or saved.
%WP - IWAD resource file with full path included. This is the first (highest) IWAD file that is found in the resources list.
@ -187,45 +185,69 @@
%S - Skill number at which to test.
%NM - Either -nomonsters when testing without monsters, or nothing at all.</value>
</data>
<data name="tabresources.Locked" type="System.Boolean, mscorlib">
<metadata name="tabresources.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="tabnodebuilder.Locked" type="System.Boolean, mscorlib">
</metadata>
<metadata name="tabnodebuilder.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="nodebuildertest.Locked" type="System.Boolean, mscorlib">
</metadata>
<metadata name="nodebuildertest.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="nodebuildersave.Locked" type="System.Boolean, mscorlib">
</metadata>
<metadata name="nodebuildersave.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="tabtesting.Locked" type="System.Boolean, mscorlib">
</metadata>
<metadata name="tabtesting.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="label14.GenerateMember" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="label12.GenerateMember" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="label8.GenerateMember" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="tabtextures.Locked" type="System.Boolean, mscorlib">
</metadata>
<metadata name="tabtextures.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="listtextures.Locked" type="System.Boolean, mscorlib">
</metadata>
<metadata name="listtextures.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="smallimages.TrayLocation" type="System.Drawing.Point, System.Drawing">
</metadata>
<metadata name="restoretexturesets.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="edittextureset.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="pastetexturesets.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="copytexturesets.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="removetextureset.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="addtextureset.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="tabmodes.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="listmodes.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="nodebuildertest.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="nodebuildersave.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="listtextures.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="smallimages.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>159, 17</value>
</data>
</metadata>
<data name="smallimages.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAA4
CAAAAk1TRnQBSQFMAwEBAAHwAQEB9AEBARMBAAEQAQAE/wEJARAI/wFCAU0BNgEEBgABNgEEAgABKAMA
CAAAAk1TRnQBSQFMAwEBAAEEAQIBBAECARMBAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA
AUwDAAEQAwABAQEAAQgFAAHAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
@ -260,37 +282,37 @@
AfQBbEAAAQcK/wFsQAACBwS1AfcBtQLtApHSAAFCAU0BPgcAAT4DAAEoAwABTAMAARADAAEBAQABAQUA
AcAXAAP/AQAC/wHgCQAC/wHgCQABwAEDAeAJAAHAAQMB4AkAAcABAAHgCQABwAEAAeAJAAHAAQABIAkA
AcABAAEgCQABwAEAASAJAAHAAQABIAkAAfABAAEgCQAB8AEAASAJAAH8AQABIAkAAfwBAAEgCQAC/wHg
CQAC/wHgHwAL
CQAC/wHgCQAL
</value>
</data>
<data name="restoretexturesets.Locked" type="System.Boolean, mscorlib">
<metadata name="restoretexturesets.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="edittextureset.Locked" type="System.Boolean, mscorlib">
</metadata>
<metadata name="edittextureset.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="pastetexturesets.Locked" type="System.Boolean, mscorlib">
</metadata>
<metadata name="pastetexturesets.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="copytexturesets.Locked" type="System.Boolean, mscorlib">
</metadata>
<metadata name="copytexturesets.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="removetextureset.Locked" type="System.Boolean, mscorlib">
</metadata>
<metadata name="removetextureset.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="addtextureset.Locked" type="System.Boolean, mscorlib">
</metadata>
<metadata name="addtextureset.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="tabmodes.Locked" type="System.Boolean, mscorlib">
</metadata>
<metadata name="listmodes.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="listmodes.Locked" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="copypastemenu.TrayLocation" type="System.Drawing.Point, System.Drawing">
</metadata>
<metadata name="copypastemenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>278, 17</value>
</data>
<data name="testprogramdialog.TrayLocation" type="System.Drawing.Point, System.Drawing">
</metadata>
<metadata name="testprogramdialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</data>
</metadata>
<metadata name="tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>416, 17</value>
</metadata>
</root>

View file

@ -73,12 +73,14 @@ namespace CodeImp.DoomBuilder.Windows
this.itempaste = new System.Windows.Forms.ToolStripMenuItem();
this.itempastespecial = new System.Windows.Forms.ToolStripMenuItem();
this.itemsnaptogrid = new System.Windows.Forms.ToolStripMenuItem();
this.itemdynamicgridsize = new System.Windows.Forms.ToolStripMenuItem();
this.itemautomerge = new System.Windows.Forms.ToolStripMenuItem();
this.itemautoclearsidetextures = new System.Windows.Forms.ToolStripMenuItem();
this.seperatoreditgeometry = new System.Windows.Forms.ToolStripSeparator();
this.itemgridinc = new System.Windows.Forms.ToolStripMenuItem();
this.itemgriddec = new System.Windows.Forms.ToolStripMenuItem();
this.itemdosnaptogrid = new System.Windows.Forms.ToolStripMenuItem();
this.itemdosnapto1mp = new System.Windows.Forms.ToolStripMenuItem();
this.itemgridsetup = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
this.addToGroup = new System.Windows.Forms.ToolStripMenuItem();
@ -98,6 +100,8 @@ namespace CodeImp.DoomBuilder.Windows
this.seperatorviewviews = new System.Windows.Forms.ToolStripSeparator();
this.itemfullbrightness = new System.Windows.Forms.ToolStripMenuItem();
this.itemtogglegrid = new System.Windows.Forms.ToolStripMenuItem();
this.itemrendernightspath = new System.Windows.Forms.ToolStripMenuItem();
this.itemtogglecomments = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
this.menuzoom = new System.Windows.Forms.ToolStripMenuItem();
this.item2zoom800 = new System.Windows.Forms.ToolStripMenuItem();
@ -173,18 +177,18 @@ namespace CodeImp.DoomBuilder.Windows
this.separatorfilters = new System.Windows.Forms.ToolStripSeparator();
this.buttonfullbrightness = new System.Windows.Forms.ToolStripButton();
this.buttontogglegrid = new System.Windows.Forms.ToolStripButton();
this.buttontoggledynamicgrid = new System.Windows.Forms.ToolStripButton();
this.buttontogglenightspath = new System.Windows.Forms.ToolStripButton();
this.separatorfullbrightness = new System.Windows.Forms.ToolStripSeparator();
this.buttontogglecomments = new System.Windows.Forms.ToolStripButton();
this.separatorfullbrightness = new System.Windows.Forms.ToolStripSeparator();
this.buttonviewnormal = new System.Windows.Forms.ToolStripButton();
this.buttonviewbrightness = new System.Windows.Forms.ToolStripButton();
this.buttonviewfloors = new System.Windows.Forms.ToolStripButton();
this.buttonviewceilings = new System.Windows.Forms.ToolStripButton();
this.seperatorviews = new System.Windows.Forms.ToolStripSeparator();
this.buttontogglecomments = new System.Windows.Forms.ToolStripButton();
this.buttonsnaptogrid = new System.Windows.Forms.ToolStripButton();
this.buttontoggledynamicgrid = new System.Windows.Forms.ToolStripButton();
this.buttonautomerge = new System.Windows.Forms.ToolStripButton();
this.buttonautoclearsidetextures = new System.Windows.Forms.ToolStripButton();
this.buttontogglenightspath = new System.Windows.Forms.ToolStripButton();
this.seperatorgeometry = new System.Windows.Forms.ToolStripSeparator();
this.buttontogglefx = new System.Windows.Forms.ToolStripButton();
this.dynamiclightmode = new System.Windows.Forms.ToolStripSplitButton();
@ -197,8 +201,8 @@ namespace CodeImp.DoomBuilder.Windows
this.modelsshowfiltered = new System.Windows.Forms.ToolStripMenuItem();
this.modelsshowall = new System.Windows.Forms.ToolStripMenuItem();
this.buttontogglefog = new System.Windows.Forms.ToolStripButton();
this.buttontogglesky = new System.Windows.Forms.ToolStripButton();
this.buttontoggleeventlines = new System.Windows.Forms.ToolStripButton();
this.buttontogglesky = new System.Windows.Forms.ToolStripButton();
this.buttontoggleeventlines = new System.Windows.Forms.ToolStripButton();
this.buttontogglevisualvertices = new System.Windows.Forms.ToolStripButton();
this.separatorgzmodes = new System.Windows.Forms.ToolStripSeparator();
this.buttontest = new System.Windows.Forms.ToolStripSplitButton();
@ -245,7 +249,7 @@ namespace CodeImp.DoomBuilder.Windows
this.thinginfo = new CodeImp.DoomBuilder.Controls.ThingInfoPanel();
this.sectorinfo = new CodeImp.DoomBuilder.Controls.SectorInfoPanel();
this.redrawtimer = new System.Windows.Forms.Timer(this.components);
this.display = new RenderTargetControl();
this.display = new CodeImp.DoomBuilder.Controls.RenderTargetControl();
this.processor = new System.Windows.Forms.Timer(this.components);
this.statusflasher = new System.Windows.Forms.Timer(this.components);
this.statusresetter = new System.Windows.Forms.Timer(this.components);
@ -255,10 +259,7 @@ namespace CodeImp.DoomBuilder.Windows
this.dockerscollapser = new System.Windows.Forms.Timer(this.components);
this.flowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
this.modecontrolsloolbar = new System.Windows.Forms.ToolStrip();
this.itemtogglecomments = new System.Windows.Forms.ToolStripMenuItem();
this.itemdynamicgridsize = new System.Windows.Forms.ToolStripMenuItem();
this.itemrendernightspath = new System.Windows.Forms.ToolStripMenuItem();
toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator();
toolStripMenuItem4 = new System.Windows.Forms.ToolStripSeparator();
@ -322,13 +323,13 @@ namespace CodeImp.DoomBuilder.Windows
//
this.seperatoreditgrid.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.seperatoreditgrid.Name = "seperatoreditgrid";
this.seperatoreditgrid.Size = new System.Drawing.Size(216, 6);
this.seperatoreditgrid.Size = new System.Drawing.Size(221, 6);
//
// seperatoreditcopypaste
//
this.seperatoreditcopypaste.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.seperatoreditcopypaste.Name = "seperatoreditcopypaste";
this.seperatoreditcopypaste.Size = new System.Drawing.Size(216, 6);
this.seperatoreditcopypaste.Size = new System.Drawing.Size(221, 6);
//
// seperatorfile
//
@ -382,8 +383,7 @@ namespace CodeImp.DoomBuilder.Windows
this.menuhelp});
this.menumain.Location = new System.Drawing.Point(0, 0);
this.menumain.Name = "menumain";
this.menumain.Size = new System.Drawing.Size(328, 24);
this.menumain.ImageScalingSize = MainForm.ScaledIconSize;
this.menumain.Size = new System.Drawing.Size(420, 24);
this.menumain.TabIndex = 0;
//
// menufile
@ -524,6 +524,7 @@ namespace CodeImp.DoomBuilder.Windows
this.itemgridinc,
this.itemgriddec,
this.itemdosnaptogrid,
this.itemdosnapto1mp,
this.itemgridsetup,
this.toolStripSeparator5,
this.addToGroup,
@ -542,7 +543,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itemundo.Image = global::CodeImp.DoomBuilder.Properties.Resources.Undo;
this.itemundo.Name = "itemundo";
this.itemundo.Size = new System.Drawing.Size(219, 22);
this.itemundo.Size = new System.Drawing.Size(224, 22);
this.itemundo.Tag = "builder_undo";
this.itemundo.Text = "&Undo";
this.itemundo.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -551,7 +552,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itemredo.Image = global::CodeImp.DoomBuilder.Properties.Resources.Redo;
this.itemredo.Name = "itemredo";
this.itemredo.Size = new System.Drawing.Size(219, 22);
this.itemredo.Size = new System.Drawing.Size(224, 22);
this.itemredo.Tag = "builder_redo";
this.itemredo.Text = "&Redo";
this.itemredo.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -560,13 +561,13 @@ namespace CodeImp.DoomBuilder.Windows
//
this.seperatoreditundo.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.seperatoreditundo.Name = "seperatoreditundo";
this.seperatoreditundo.Size = new System.Drawing.Size(216, 6);
this.seperatoreditundo.Size = new System.Drawing.Size(221, 6);
//
// itemcut
//
this.itemcut.Image = global::CodeImp.DoomBuilder.Properties.Resources.Cut;
this.itemcut.Name = "itemcut";
this.itemcut.Size = new System.Drawing.Size(219, 22);
this.itemcut.Size = new System.Drawing.Size(224, 22);
this.itemcut.Tag = "builder_cutselection";
this.itemcut.Text = "Cu&t";
this.itemcut.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -575,7 +576,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itemcopy.Image = global::CodeImp.DoomBuilder.Properties.Resources.Copy;
this.itemcopy.Name = "itemcopy";
this.itemcopy.Size = new System.Drawing.Size(219, 22);
this.itemcopy.Size = new System.Drawing.Size(224, 22);
this.itemcopy.Tag = "builder_copyselection";
this.itemcopy.Text = "&Copy";
this.itemcopy.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -584,7 +585,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itempaste.Image = global::CodeImp.DoomBuilder.Properties.Resources.Paste;
this.itempaste.Name = "itempaste";
this.itempaste.Size = new System.Drawing.Size(219, 22);
this.itempaste.Size = new System.Drawing.Size(224, 22);
this.itempaste.Tag = "builder_pasteselection";
this.itempaste.Text = "&Paste";
this.itempaste.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -593,7 +594,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itempastespecial.Image = global::CodeImp.DoomBuilder.Properties.Resources.PasteSpecial;
this.itempastespecial.Name = "itempastespecial";
this.itempastespecial.Size = new System.Drawing.Size(219, 22);
this.itempastespecial.Size = new System.Drawing.Size(224, 22);
this.itempastespecial.Tag = "builder_pasteselectionspecial";
this.itempastespecial.Text = "Paste Special...";
this.itempastespecial.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -604,18 +605,30 @@ namespace CodeImp.DoomBuilder.Windows
this.itemsnaptogrid.CheckState = System.Windows.Forms.CheckState.Checked;
this.itemsnaptogrid.Image = global::CodeImp.DoomBuilder.Properties.Resources.Grid4;
this.itemsnaptogrid.Name = "itemsnaptogrid";
this.itemsnaptogrid.Size = new System.Drawing.Size(219, 22);
this.itemsnaptogrid.Size = new System.Drawing.Size(224, 22);
this.itemsnaptogrid.Tag = "builder_togglesnap";
this.itemsnaptogrid.Text = "&Snap to Grid";
this.itemsnaptogrid.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// itemdynamicgridsize
//
this.itemdynamicgridsize.Checked = true;
this.itemdynamicgridsize.CheckOnClick = true;
this.itemdynamicgridsize.CheckState = System.Windows.Forms.CheckState.Checked;
this.itemdynamicgridsize.Image = global::CodeImp.DoomBuilder.Properties.Resources.GridDynamic;
this.itemdynamicgridsize.Name = "itemdynamicgridsize";
this.itemdynamicgridsize.Size = new System.Drawing.Size(224, 22);
this.itemdynamicgridsize.Tag = "builder_toggledynamicgrid";
this.itemdynamicgridsize.Text = "Dynamic Grid Size";
this.itemdynamicgridsize.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// itemautomerge
//
this.itemautomerge.Checked = true;
this.itemautomerge.CheckState = System.Windows.Forms.CheckState.Checked;
this.itemautomerge.Image = global::CodeImp.DoomBuilder.Properties.Resources.mergegeometry2;
this.itemautomerge.Name = "itemautomerge";
this.itemautomerge.Size = new System.Drawing.Size(219, 22);
this.itemautomerge.Size = new System.Drawing.Size(224, 22);
this.itemautomerge.Tag = "builder_toggleautomerge";
this.itemautomerge.Text = "&Merge Geometry";
this.itemautomerge.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -626,7 +639,7 @@ namespace CodeImp.DoomBuilder.Windows
this.itemautoclearsidetextures.CheckState = System.Windows.Forms.CheckState.Checked;
this.itemautoclearsidetextures.Image = global::CodeImp.DoomBuilder.Properties.Resources.ClearTextures;
this.itemautoclearsidetextures.Name = "itemautoclearsidetextures";
this.itemautoclearsidetextures.Size = new System.Drawing.Size(219, 22);
this.itemautoclearsidetextures.Size = new System.Drawing.Size(224, 22);
this.itemautoclearsidetextures.Tag = "builder_toggleautoclearsidetextures";
this.itemautoclearsidetextures.Text = "&Auto Clear Sidedef Textures";
this.itemautoclearsidetextures.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -635,13 +648,13 @@ namespace CodeImp.DoomBuilder.Windows
//
this.seperatoreditgeometry.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.seperatoreditgeometry.Name = "seperatoreditgeometry";
this.seperatoreditgeometry.Size = new System.Drawing.Size(216, 6);
this.seperatoreditgeometry.Size = new System.Drawing.Size(221, 6);
//
// itemgridinc
//
this.itemgridinc.Image = global::CodeImp.DoomBuilder.Properties.Resources.GridIncrease;
this.itemgridinc.Name = "itemgridinc";
this.itemgridinc.Size = new System.Drawing.Size(219, 22);
this.itemgridinc.Size = new System.Drawing.Size(224, 22);
this.itemgridinc.Tag = "builder_griddec";
this.itemgridinc.Text = "&Increase Grid Size";
this.itemgridinc.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -650,7 +663,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itemgriddec.Image = global::CodeImp.DoomBuilder.Properties.Resources.GridDecrease;
this.itemgriddec.Name = "itemgriddec";
this.itemgriddec.Size = new System.Drawing.Size(219, 22);
this.itemgriddec.Size = new System.Drawing.Size(224, 22);
this.itemgriddec.Tag = "builder_gridinc";
this.itemgriddec.Text = "&Decrease Grid Size";
this.itemgriddec.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -659,16 +672,25 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itemdosnaptogrid.Image = global::CodeImp.DoomBuilder.Properties.Resources.SnapVerts;
this.itemdosnaptogrid.Name = "itemdosnaptogrid";
this.itemdosnaptogrid.Size = new System.Drawing.Size(219, 22);
this.itemdosnaptogrid.Size = new System.Drawing.Size(224, 22);
this.itemdosnaptogrid.Tag = "builder_snapvertstogrid";
this.itemdosnaptogrid.Text = "Snap Selection to Grid";
this.itemdosnaptogrid.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// itemdosnapto1mp
//
this.itemdosnapto1mp.Image = global::CodeImp.DoomBuilder.Properties.Resources.Snap1mp;
this.itemdosnapto1mp.Name = "itemdosnapto1mp";
this.itemdosnapto1mp.Size = new System.Drawing.Size(224, 22);
this.itemdosnapto1mp.Tag = "builder_snapvertsto1mp";
this.itemdosnapto1mp.Text = "Force Snap Selection to 1mp";
this.itemdosnapto1mp.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// itemgridsetup
//
this.itemgridsetup.Image = global::CodeImp.DoomBuilder.Properties.Resources.Grid2;
this.itemgridsetup.Name = "itemgridsetup";
this.itemgridsetup.Size = new System.Drawing.Size(219, 22);
this.itemgridsetup.Size = new System.Drawing.Size(224, 22);
this.itemgridsetup.Tag = "builder_gridsetup";
this.itemgridsetup.Text = "&Grid and Backdrop Setup...";
this.itemgridsetup.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -676,34 +698,34 @@ namespace CodeImp.DoomBuilder.Windows
// toolStripSeparator5
//
this.toolStripSeparator5.Name = "toolStripSeparator5";
this.toolStripSeparator5.Size = new System.Drawing.Size(216, 6);
this.toolStripSeparator5.Size = new System.Drawing.Size(221, 6);
//
// addToGroup
//
this.addToGroup.Image = global::CodeImp.DoomBuilder.Properties.Resources.GroupAdd;
this.addToGroup.Name = "addToGroup";
this.addToGroup.Size = new System.Drawing.Size(219, 22);
this.addToGroup.Size = new System.Drawing.Size(224, 22);
this.addToGroup.Text = "Add Selection to Group";
//
// selectGroup
//
this.selectGroup.Image = global::CodeImp.DoomBuilder.Properties.Resources.Group;
this.selectGroup.Name = "selectGroup";
this.selectGroup.Size = new System.Drawing.Size(219, 22);
this.selectGroup.Size = new System.Drawing.Size(224, 22);
this.selectGroup.Text = "Select Group";
//
// clearGroup
//
this.clearGroup.Image = global::CodeImp.DoomBuilder.Properties.Resources.GroupRemove;
this.clearGroup.Name = "clearGroup";
this.clearGroup.Size = new System.Drawing.Size(219, 22);
this.clearGroup.Size = new System.Drawing.Size(224, 22);
this.clearGroup.Text = "Clear Group";
//
// itemmapoptions
//
this.itemmapoptions.Image = global::CodeImp.DoomBuilder.Properties.Resources.Properties;
this.itemmapoptions.Name = "itemmapoptions";
this.itemmapoptions.Size = new System.Drawing.Size(219, 22);
this.itemmapoptions.Size = new System.Drawing.Size(224, 22);
this.itemmapoptions.Tag = "builder_mapoptions";
this.itemmapoptions.Text = "Map &Options...";
this.itemmapoptions.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -712,7 +734,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itemviewusedtags.Image = global::CodeImp.DoomBuilder.Properties.Resources.TagStatistics;
this.itemviewusedtags.Name = "itemviewusedtags";
this.itemviewusedtags.Size = new System.Drawing.Size(219, 22);
this.itemviewusedtags.Size = new System.Drawing.Size(224, 22);
this.itemviewusedtags.Tag = "builder_viewusedtags";
this.itemviewusedtags.Text = "View Used Tags...";
this.itemviewusedtags.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -721,7 +743,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itemviewthingtypes.Image = global::CodeImp.DoomBuilder.Properties.Resources.ThingStatistics;
this.itemviewthingtypes.Name = "itemviewthingtypes";
this.itemviewthingtypes.Size = new System.Drawing.Size(219, 22);
this.itemviewthingtypes.Size = new System.Drawing.Size(224, 22);
this.itemviewthingtypes.Tag = "builder_viewthingtypes";
this.itemviewthingtypes.Text = "View Thing Types...";
this.itemviewthingtypes.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -841,6 +863,30 @@ namespace CodeImp.DoomBuilder.Windows
this.itemtogglegrid.Text = "&Render Grid";
this.itemtogglegrid.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// itemrendernightspath
//
this.itemrendernightspath.Checked = true;
this.itemrendernightspath.CheckOnClick = true;
this.itemrendernightspath.CheckState = System.Windows.Forms.CheckState.Checked;
this.itemrendernightspath.Image = global::CodeImp.DoomBuilder.Properties.Resources.axis1;
this.itemrendernightspath.Name = "itemrendernightspath";
this.itemrendernightspath.Size = new System.Drawing.Size(215, 22);
this.itemrendernightspath.Tag = "builder_togglenightspath";
this.itemrendernightspath.Text = "&Show NiGHTS Path";
this.itemrendernightspath.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// itemtogglecomments
//
this.itemtogglecomments.Checked = true;
this.itemtogglecomments.CheckOnClick = true;
this.itemtogglecomments.CheckState = System.Windows.Forms.CheckState.Checked;
this.itemtogglecomments.Image = global::CodeImp.DoomBuilder.Properties.Resources.Comment;
this.itemtogglecomments.Name = "itemtogglecomments";
this.itemtogglecomments.Size = new System.Drawing.Size(215, 22);
this.itemtogglecomments.Tag = "builder_togglecomments";
this.itemtogglecomments.Text = "Show Comments";
this.itemtogglecomments.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// toolStripSeparator4
//
this.toolStripSeparator4.Name = "toolStripSeparator4";
@ -1149,7 +1195,7 @@ namespace CodeImp.DoomBuilder.Windows
this.menuhelp.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.itemhelprefmanual,
this.itemShortcutReference,
this.itemopenconfigfolder,
this.itemopenconfigfolder,
this.itemhelpeditmode,
this.itemhelpcheckupdates,
this.seperatorhelpmanual,
@ -1162,7 +1208,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itemhelprefmanual.Image = global::CodeImp.DoomBuilder.Properties.Resources.Help;
this.itemhelprefmanual.Name = "itemhelprefmanual";
this.itemhelprefmanual.Size = new System.Drawing.Size(232, 22);
this.itemhelprefmanual.Size = new System.Drawing.Size(233, 22);
this.itemhelprefmanual.Text = "Reference &Manual";
this.itemhelprefmanual.Click += new System.EventHandler(this.itemhelprefmanual_Click);
//
@ -1170,16 +1216,16 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itemShortcutReference.Image = global::CodeImp.DoomBuilder.Properties.Resources.Keyboard;
this.itemShortcutReference.Name = "itemShortcutReference";
this.itemShortcutReference.Size = new System.Drawing.Size(232, 22);
this.itemShortcutReference.Size = new System.Drawing.Size(233, 22);
this.itemShortcutReference.Tag = "";
this.itemShortcutReference.Text = "Keyboard Shortcuts Reference";
this.itemShortcutReference.Click += new System.EventHandler(this.itemShortcutReference_Click);
//
// itemopenconfigfolder
//
//
this.itemopenconfigfolder.Image = global::CodeImp.DoomBuilder.Properties.Resources.FolderExplore;
this.itemopenconfigfolder.Name = "itemopenconfigfolder";
this.itemopenconfigfolder.Size = new System.Drawing.Size(232, 22);
this.itemopenconfigfolder.Size = new System.Drawing.Size(233, 22);
this.itemopenconfigfolder.Tag = "";
this.itemopenconfigfolder.Text = "Program Configuration Folder";
this.itemopenconfigfolder.Click += new System.EventHandler(this.itemopenconfigfolder_Click);
@ -1188,7 +1234,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itemhelpeditmode.Image = global::CodeImp.DoomBuilder.Properties.Resources.Question;
this.itemhelpeditmode.Name = "itemhelpeditmode";
this.itemhelpeditmode.Size = new System.Drawing.Size(232, 22);
this.itemhelpeditmode.Size = new System.Drawing.Size(233, 22);
this.itemhelpeditmode.Text = "About this &Editing Mode";
this.itemhelpeditmode.Click += new System.EventHandler(this.itemhelpeditmode_Click);
//
@ -1196,29 +1242,28 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itemhelpcheckupdates.Image = global::CodeImp.DoomBuilder.Properties.Resources.Update;
this.itemhelpcheckupdates.Name = "itemhelpcheckupdates";
this.itemhelpcheckupdates.Size = new System.Drawing.Size(232, 22);
this.itemhelpcheckupdates.Size = new System.Drawing.Size(233, 22);
this.itemhelpcheckupdates.Text = "&Check for updates...";
this.itemhelpcheckupdates.Visible = false;
this.itemhelpcheckupdates.Click += new System.EventHandler(this.itemhelpcheckupdates_Click);
this.itemhelpcheckupdates.Visible = false;
//
// seperatorhelpmanual
//
this.seperatorhelpmanual.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.seperatorhelpmanual.Name = "seperatorhelpmanual";
this.seperatorhelpmanual.Size = new System.Drawing.Size(229, 6);
this.seperatorhelpmanual.Size = new System.Drawing.Size(230, 6);
//
// itemhelpabout
//
this.itemhelpabout.Image = global::CodeImp.DoomBuilder.Properties.Resources.ZB16;
this.itemhelpabout.Name = "itemhelpabout";
this.itemhelpabout.Size = new System.Drawing.Size(232, 22);
this.itemhelpabout.Size = new System.Drawing.Size(233, 22);
this.itemhelpabout.Text = "&About Zone Builder...";
this.itemhelpabout.Click += new System.EventHandler(this.itemhelpabout_Click);
//
// toolbar
//
this.toolbar.AutoSize = false;
this.toolbar.ImageScalingSize = MainForm.ScaledIconSize;
this.toolbar.ContextMenuStrip = this.toolbarContextMenu;
this.toolbar.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
this.toolbar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -1289,9 +1334,8 @@ namespace CodeImp.DoomBuilder.Windows
this.toggleRendering});
this.toolbarContextMenu.Name = "toolbarContextMenu";
this.toolbarContextMenu.Size = new System.Drawing.Size(227, 224);
this.toolbarContextMenu.ImageScalingSize = MainForm.ScaledIconSize;
this.toolbarContextMenu.Opening += new System.ComponentModel.CancelEventHandler(this.toolbarContextMenu_Opening);
this.toolbarContextMenu.Closing += new System.Windows.Forms.ToolStripDropDownClosingEventHandler(this.toolbarContextMenu_Closing);
this.toolbarContextMenu.Opening += new System.ComponentModel.CancelEventHandler(this.toolbarContextMenu_Opening);
//
// toggleFile
//
@ -1505,7 +1549,7 @@ namespace CodeImp.DoomBuilder.Windows
this.thingfilters.ImageTransparentColor = System.Drawing.Color.Magenta;
this.thingfilters.Margin = new System.Windows.Forms.Padding(1, 1, 0, 2);
this.thingfilters.Name = "thingfilters";
this.thingfilters.Size = new System.Drawing.Size((int)(120 * MainForm.DPIScaler.Width), (int)(22 * MainForm.DPIScaler.Height));
this.thingfilters.Size = new System.Drawing.Size(120, 23);
this.thingfilters.Text = "(show all)";
this.thingfilters.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.thingfilters.DropDownClosed += new System.EventHandler(this.LoseFocus);
@ -1535,11 +1579,11 @@ namespace CodeImp.DoomBuilder.Windows
this.linedefcolorpresets.ImageTransparentColor = System.Drawing.Color.Magenta;
this.linedefcolorpresets.Margin = new System.Windows.Forms.Padding(1, 1, 0, 2);
this.linedefcolorpresets.Name = "linedefcolorpresets";
this.linedefcolorpresets.Size = new System.Drawing.Size((int)(120 * MainForm.DPIScaler.Width), (int)(22 * MainForm.DPIScaler.Height));
this.linedefcolorpresets.Size = new System.Drawing.Size(120, 23);
this.linedefcolorpresets.Text = "No presets";
this.linedefcolorpresets.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.linedefcolorpresets.DropDownItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.linedefcolorpresets_DropDownItemClicked);
this.linedefcolorpresets.DropDownClosed += new System.EventHandler(this.LoseFocus);
this.linedefcolorpresets.DropDownItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.linedefcolorpresets_DropDownItemClicked);
this.linedefcolorpresets.Click += new System.EventHandler(this.linedefcolorpresets_MouseLeave);
//
// separatorfilters
@ -1576,37 +1620,22 @@ namespace CodeImp.DoomBuilder.Windows
this.buttontogglegrid.Text = "Render Grid";
this.buttontogglegrid.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// buttontoggledynamicgrid
// buttontogglecomments
//
this.buttontoggledynamicgrid.Checked = true;
this.buttontoggledynamicgrid.CheckOnClick = true;
this.buttontoggledynamicgrid.CheckState = System.Windows.Forms.CheckState.Checked;
this.buttontoggledynamicgrid.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.buttontoggledynamicgrid.Image = global::CodeImp.DoomBuilder.Properties.Resources.GridDynamic;
this.buttontoggledynamicgrid.ImageTransparentColor = System.Drawing.Color.Magenta;
this.buttontoggledynamicgrid.Name = "buttontoggledynamicgrid";
this.buttontoggledynamicgrid.Size = new System.Drawing.Size(23, 22);
this.buttontoggledynamicgrid.Tag = "builder_toggledynamicgrid";
this.buttontoggledynamicgrid.Text = "Dynamic Grid Size";
this.buttontoggledynamicgrid.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// buttontogglenightspath
//
this.buttontogglenightspath.Checked = true;
this.buttontogglenightspath.CheckOnClick = true;
this.buttontogglenightspath.CheckState = System.Windows.Forms.CheckState.Checked;
this.buttontogglenightspath.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.buttontogglenightspath.Image = global::CodeImp.DoomBuilder.Properties.Resources.axis1;
this.buttontogglenightspath.ImageTransparentColor = System.Drawing.Color.Magenta;
this.buttontogglenightspath.Name = "buttontogglenightspath";
this.buttontogglenightspath.Size = new System.Drawing.Size(23, 22);
this.buttontogglenightspath.Tag = "builder_togglenightspath";
this.buttontogglenightspath.Text = "Show Waypoint and NiGHTS Paths";
this.buttontogglenightspath.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// separatorfullbrightness
//
this.separatorfullbrightness.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.buttontogglecomments.Checked = true;
this.buttontogglecomments.CheckState = System.Windows.Forms.CheckState.Checked;
this.buttontogglecomments.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.buttontogglecomments.Image = global::CodeImp.DoomBuilder.Properties.Resources.Comment;
this.buttontogglecomments.ImageTransparentColor = System.Drawing.Color.Magenta;
this.buttontogglecomments.Name = "buttontogglecomments";
this.buttontogglecomments.Size = new System.Drawing.Size(23, 22);
this.buttontogglecomments.Tag = "builder_togglecomments";
this.buttontogglecomments.Text = "Show Comments";
this.buttontogglecomments.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// separatorfullbrightness
//
this.separatorfullbrightness.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.separatorfullbrightness.Name = "separatorfullbrightness";
this.separatorfullbrightness.Size = new System.Drawing.Size(6, 25);
//
@ -1664,19 +1693,6 @@ namespace CodeImp.DoomBuilder.Windows
this.seperatorviews.Name = "seperatorviews";
this.seperatorviews.Size = new System.Drawing.Size(6, 25);
//
// buttontogglecomments
//
this.buttontogglecomments.Checked = true;
this.buttontogglecomments.CheckState = System.Windows.Forms.CheckState.Checked;
this.buttontogglecomments.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.buttontogglecomments.Image = global::CodeImp.DoomBuilder.Properties.Resources.Comment;
this.buttontogglecomments.ImageTransparentColor = System.Drawing.Color.Magenta;
this.buttontogglecomments.Name = "buttontogglecomments";
this.buttontogglecomments.Size = new System.Drawing.Size(23, 22);
this.buttontogglecomments.Tag = "builder_togglecomments";
this.buttontogglecomments.Text = "Show Comments";
this.buttontogglecomments.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// buttonsnaptogrid
//
this.buttonsnaptogrid.Checked = true;
@ -1690,6 +1706,20 @@ namespace CodeImp.DoomBuilder.Windows
this.buttonsnaptogrid.Text = "Snap to Grid";
this.buttonsnaptogrid.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// buttontoggledynamicgrid
//
this.buttontoggledynamicgrid.Checked = true;
this.buttontoggledynamicgrid.CheckOnClick = true;
this.buttontoggledynamicgrid.CheckState = System.Windows.Forms.CheckState.Checked;
this.buttontoggledynamicgrid.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.buttontoggledynamicgrid.Image = global::CodeImp.DoomBuilder.Properties.Resources.GridDynamic;
this.buttontoggledynamicgrid.ImageTransparentColor = System.Drawing.Color.Magenta;
this.buttontoggledynamicgrid.Name = "buttontoggledynamicgrid";
this.buttontoggledynamicgrid.Size = new System.Drawing.Size(23, 22);
this.buttontoggledynamicgrid.Tag = "builder_toggledynamicgrid";
this.buttontoggledynamicgrid.Text = "Dynamic Grid Size";
this.buttontoggledynamicgrid.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// buttonautomerge
//
this.buttonautomerge.Checked = true;
@ -1716,6 +1746,20 @@ namespace CodeImp.DoomBuilder.Windows
this.buttonautoclearsidetextures.Text = "Auto Clear Sidedef Textures";
this.buttonautoclearsidetextures.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// buttontogglenightspath
//
this.buttontogglenightspath.Checked = true;
this.buttontogglenightspath.CheckOnClick = true;
this.buttontogglenightspath.CheckState = System.Windows.Forms.CheckState.Checked;
this.buttontogglenightspath.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.buttontogglenightspath.Image = global::CodeImp.DoomBuilder.Properties.Resources.axis1;
this.buttontogglenightspath.ImageTransparentColor = System.Drawing.Color.Magenta;
this.buttontogglenightspath.Name = "buttontogglenightspath";
this.buttontogglenightspath.Size = new System.Drawing.Size(23, 22);
this.buttontogglenightspath.Tag = "builder_togglenightspath";
this.buttontogglenightspath.Text = "Show NiGHTS Path";
this.buttontogglenightspath.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// seperatorgeometry
//
this.seperatorgeometry.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
@ -1728,7 +1772,7 @@ namespace CodeImp.DoomBuilder.Windows
this.buttontogglefx.Image = global::CodeImp.DoomBuilder.Properties.Resources.fx;
this.buttontogglefx.ImageTransparentColor = System.Drawing.Color.Magenta;
this.buttontogglefx.Name = "buttontogglefx";
this.buttontogglefx.Size = new System.Drawing.Size(23, 22);
this.buttontogglefx.Size = new System.Drawing.Size(23, 20);
this.buttontogglefx.Tag = "builder_gztogglefx";
this.buttontogglefx.Text = "Toggle GZDoom Effects";
this.buttontogglefx.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -1845,22 +1889,22 @@ namespace CodeImp.DoomBuilder.Windows
this.buttontogglefog.Tag = "builder_gztogglefog";
this.buttontogglefog.Text = "Toggle Fog Rendering";
this.buttontogglefog.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// buttontogglesky
//
this.buttontogglesky.CheckOnClick = true;
this.buttontogglesky.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.buttontogglesky.Image = global::CodeImp.DoomBuilder.Properties.Resources.Sky;
this.buttontogglesky.ImageTransparentColor = System.Drawing.Color.Magenta;
this.buttontogglesky.Name = "buttontogglesky";
this.buttontogglesky.Size = new System.Drawing.Size(23, 20);
this.buttontogglesky.Tag = "builder_gztogglesky";
this.buttontogglesky.Text = "Toggle Sky Rendering";
this.buttontogglesky.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// buttontoggleeventlines
//
this.buttontoggleeventlines.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
//
// buttontogglesky
//
this.buttontogglesky.CheckOnClick = true;
this.buttontogglesky.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.buttontogglesky.Image = global::CodeImp.DoomBuilder.Properties.Resources.Sky;
this.buttontogglesky.ImageTransparentColor = System.Drawing.Color.Magenta;
this.buttontogglesky.Name = "buttontogglesky";
this.buttontogglesky.Size = new System.Drawing.Size(23, 20);
this.buttontogglesky.Tag = "builder_gztogglesky";
this.buttontogglesky.Text = "Toggle Sky Rendering";
this.buttontogglesky.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// buttontoggleeventlines
//
this.buttontoggleeventlines.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.buttontoggleeventlines.Image = global::CodeImp.DoomBuilder.Properties.Resources.InfoLine;
this.buttontoggleeventlines.ImageTransparentColor = System.Drawing.Color.Magenta;
this.buttontoggleeventlines.Name = "buttontoggleeventlines";
@ -1925,7 +1969,6 @@ namespace CodeImp.DoomBuilder.Windows
this.statusbar.Name = "statusbar";
this.statusbar.ShowItemToolTips = true;
this.statusbar.Size = new System.Drawing.Size(1012, 23);
this.statusbar.ImageScalingSize = MainForm.ScaledIconSize;
this.statusbar.TabIndex = 2;
//
// statuslabel
@ -1934,7 +1977,7 @@ namespace CodeImp.DoomBuilder.Windows
this.statuslabel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.statuslabel.Margin = new System.Windows.Forms.Padding(2, 3, 0, 2);
this.statuslabel.Name = "statuslabel";
this.statuslabel.Size = new System.Drawing.Size(340, 18);
this.statuslabel.Size = new System.Drawing.Size(338, 18);
this.statuslabel.Spring = true;
this.statuslabel.Text = "Initializing user interface...";
this.statuslabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@ -1944,7 +1987,7 @@ namespace CodeImp.DoomBuilder.Windows
this.configlabel.AutoSize = false;
this.configlabel.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.configlabel.Name = "configlabel";
this.configlabel.Size = new System.Drawing.Size((int)(280 * MainForm.DPIScaler.Width), (int)(18 * MainForm.DPIScaler.Height));
this.configlabel.Size = new System.Drawing.Size(280, 18);
this.configlabel.Text = "ZDoom (Doom in Hexen Format)";
this.configlabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.configlabel.ToolTipText = "Current Game Configuration";
@ -2292,9 +2335,9 @@ namespace CodeImp.DoomBuilder.Windows
//
// console
//
this.console.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.console.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.console.Location = new System.Drawing.Point(3, 3);
this.console.Name = "console";
this.console.Size = new System.Drawing.Size(851, 98);
@ -2355,16 +2398,16 @@ namespace CodeImp.DoomBuilder.Windows
this.display.Name = "display";
this.display.Size = new System.Drawing.Size(542, 307);
this.display.TabIndex = 5;
this.display.MouseUp += new System.Windows.Forms.MouseEventHandler(this.display_MouseUp);
this.display.MouseLeave += new System.EventHandler(this.display_MouseLeave);
this.display.Paint += new System.Windows.Forms.PaintEventHandler(this.display_Paint);
this.display.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.display_PreviewKeyDown);
this.display.MouseMove += new System.Windows.Forms.MouseEventHandler(this.display_MouseMove);
this.display.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.display_MouseDoubleClick);
this.display.MouseClick += new System.Windows.Forms.MouseEventHandler(this.display_MouseClick);
this.display.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.display_MouseDoubleClick);
this.display.MouseDown += new System.Windows.Forms.MouseEventHandler(this.display_MouseDown);
this.display.Resize += new System.EventHandler(this.display_Resize);
this.display.MouseEnter += new System.EventHandler(this.display_MouseEnter);
this.display.MouseLeave += new System.EventHandler(this.display_MouseLeave);
this.display.MouseMove += new System.Windows.Forms.MouseEventHandler(this.display_MouseMove);
this.display.MouseUp += new System.Windows.Forms.MouseEventHandler(this.display_MouseUp);
this.display.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.display_PreviewKeyDown);
this.display.Resize += new System.EventHandler(this.display_Resize);
//
// processor
//
@ -2382,7 +2425,7 @@ namespace CodeImp.DoomBuilder.Windows
// dockersspace
//
this.dockersspace.Dock = System.Windows.Forms.DockStyle.Left;
this.dockersspace.Location = new System.Drawing.Point(0, 49);
this.dockersspace.Location = new System.Drawing.Point(30, 49);
this.dockersspace.Name = "dockersspace";
this.dockersspace.Size = new System.Drawing.Size(26, 515);
this.dockersspace.TabIndex = 6;
@ -2390,7 +2433,6 @@ namespace CodeImp.DoomBuilder.Windows
// modestoolbar
//
this.modestoolbar.AutoSize = false;
this.modestoolbar.ImageScalingSize = MainForm.ScaledIconSize;
this.modestoolbar.Dock = System.Windows.Forms.DockStyle.Left;
this.modestoolbar.Location = new System.Drawing.Point(0, 49);
this.modestoolbar.Name = "modestoolbar";
@ -2406,9 +2448,9 @@ namespace CodeImp.DoomBuilder.Windows
this.dockerspanel.Size = new System.Drawing.Size(236, 467);
this.dockerspanel.TabIndex = 7;
this.dockerspanel.TabStop = false;
this.dockerspanel.UserResize += new System.EventHandler(this.dockerspanel_UserResize);
this.dockerspanel.Collapsed += new System.EventHandler(this.LoseFocus);
this.dockerspanel.MouseContainerEnter += new System.EventHandler(this.dockerspanel_MouseContainerEnter);
this.dockerspanel.Collapsed += new System.EventHandler(this.LoseFocus);
this.dockerspanel.UserResize += new System.EventHandler(this.dockerspanel_UserResize);
//
// dockerscollapser
//
@ -2431,50 +2473,13 @@ namespace CodeImp.DoomBuilder.Windows
this.modecontrolsloolbar.Location = new System.Drawing.Point(328, 0);
this.modecontrolsloolbar.Name = "modecontrolsloolbar";
this.modecontrolsloolbar.Size = new System.Drawing.Size(43, 24);
this.modecontrolsloolbar.ImageScalingSize = MainForm.ScaledIconSize;
this.modecontrolsloolbar.TabIndex = 1;
this.modecontrolsloolbar.Text = "toolStrip1";
this.modecontrolsloolbar.Visible = false;
//
// itemtogglecomments
// MainForm
//
this.itemtogglecomments.Checked = true;
this.itemtogglecomments.CheckOnClick = true;
this.itemtogglecomments.CheckState = System.Windows.Forms.CheckState.Checked;
this.itemtogglecomments.Image = global::CodeImp.DoomBuilder.Properties.Resources.Comment;
this.itemtogglecomments.Name = "itemtogglecomments";
this.itemtogglecomments.Size = new System.Drawing.Size(215, 22);
this.itemtogglecomments.Tag = "builder_togglecomments";
this.itemtogglecomments.Text = "Show Comments";
this.itemtogglecomments.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// itemdynamicgridsize
//
this.itemdynamicgridsize.Checked = true;
this.itemdynamicgridsize.CheckOnClick = true;
this.itemdynamicgridsize.CheckState = System.Windows.Forms.CheckState.Checked;
this.itemdynamicgridsize.Image = global::CodeImp.DoomBuilder.Properties.Resources.GridDynamic;
this.itemdynamicgridsize.Name = "itemdynamicgridsize";
this.itemdynamicgridsize.Size = new System.Drawing.Size(219, 22);
this.itemdynamicgridsize.Tag = "builder_toggledynamicgrid";
this.itemdynamicgridsize.Text = "Dynamic Grid Size";
this.itemdynamicgridsize.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// itemrendernightspath
//
this.itemrendernightspath.Checked = true;
this.itemrendernightspath.CheckOnClick = true;
this.itemrendernightspath.CheckState = System.Windows.Forms.CheckState.Checked;
this.itemrendernightspath.Image = global::CodeImp.DoomBuilder.Properties.Resources.axis1;
this.itemrendernightspath.Name = "itemrendernightspath";
this.itemrendernightspath.Size = new System.Drawing.Size(215, 22);
this.itemrendernightspath.Tag = "builder_togglenightspath";
this.itemrendernightspath.Text = "Show Waypoint and NiGHTS Paths";
this.itemrendernightspath.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.ClientSize = new System.Drawing.Size(1012, 693);
this.Controls.Add(this.dockerspanel);
@ -2488,18 +2493,18 @@ namespace CodeImp.DoomBuilder.Windows
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menumain;
this.Name = "MainForm";
this.Opacity = 1;
this.Opacity = 1D;
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "Zone Builder";
this.Activated += new System.EventHandler(this.MainForm_Activated);
this.Deactivate += new System.EventHandler(this.MainForm_Deactivate);
this.Load += new System.EventHandler(this.MainForm_Load);
this.Shown += new System.EventHandler(this.MainForm_Shown);
this.Activated += new System.EventHandler(this.MainForm_Activated);
this.ResizeEnd += new System.EventHandler(this.MainForm_ResizeEnd);
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.MainForm_KeyDown);
this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.MainForm_KeyUp);
this.Move += new System.EventHandler(this.MainForm_Move);
this.Resize += new System.EventHandler(this.MainForm_Resize);
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.MainForm_KeyDown);
this.ResizeEnd += new System.EventHandler(this.MainForm_ResizeEnd);
this.menumain.ResumeLayout(false);
this.menumain.PerformLayout();
this.toolbar.ResumeLayout(false);
@ -2737,5 +2742,6 @@ namespace CodeImp.DoomBuilder.Windows
private ToolStripMenuItem itemdynamicgridsize;
private ToolStripMenuItem itemrendernightspath;
private ToolStripMenuItem itemtogglecomments;
private ToolStripMenuItem itemdosnapto1mp;
}
}

View file

@ -0,0 +1,362 @@
#region ================== Copyright (c) 2007 Pascal vd Heiden
/*
* Copyright (c) 2007 Pascal vd Heiden, www.codeimp.com
* This program is released under GNU General Public License
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#endregion
#region ================== Namespaces
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Config;
using CodeImp.DoomBuilder.Geometry;
using CodeImp.DoomBuilder.Map;
using CodeImp.DoomBuilder.Types;
#endregion
//JBR A little more advanced version of ThingBrowserForm
namespace CodeImp.DoomBuilder.Windows
{
/// <summary>
/// Dialog window that allows setting up Thing properties.
/// </summary>
public partial class ThingBrowser2Form : DelayedForm
{
#region ================== Properties
public int SelectedType { get { return s_thingType; } }
public int SelectedParameter { get { return s_parameter; } }
public Dictionary<string, bool> SelectedFlags { get { return s_flags; } } // oh no... not read-only at all but atleast it's fast.
public float SelectedAngleDoom { get { return s_angleDoom; } }
public float SelectedPosZ { get { return s_posZ; } }
#endregion
#region ================== Variables
private bool m_ok;
private static int s_thingType = 1;
private static int s_parameter = 0;
private static Dictionary<string, bool> s_flags = new Dictionary<string, bool>();
private static int s_angleDoom = 0;
private static float s_posZ = 0f;
private ThingTypeInfo thinginfo;
private bool preventchanges;
private bool flagsvalue_ignore = false;
private bool flags_ignore = false;
//JBR Hold result
public struct Result
{
public readonly bool OK;
public readonly int Type;
public readonly int Parameter;
public readonly Dictionary<string, bool> Flags;
public readonly int AngleDoom;
public readonly float Z;
public Result(bool ok, int type, int parameter, Dictionary<string, bool> flags, int angledoom, float z)
{
this.OK = ok;
this.Type = type;
this.Parameter = parameter;
this.Flags = flags;
this.AngleDoom = angledoom;
this.Z = z;
}
public void Apply(Thing t)
{
t.SRB2Type = this.Type;
t.Parameter = this.Parameter;
foreach (KeyValuePair<string, bool> flag in this.Flags)
{
t.SetFlag(flag.Key, flag.Value);
}
t.Move(t.Position.x, t.Position.y, this.Z);
t.Rotate(this.AngleDoom);
}
}
#endregion
#region ================== Constructor
// Constructor
public ThingBrowser2Form()
{
// Initialize
InitializeComponent();
m_ok = false;
preventchanges = true;
// Fill flags list
foreach(KeyValuePair<string, string> tf in General.Map.Config.ThingFlags)
flags.Add(tf.Value, tf.Key);
// Thing height?
posZ.Visible = General.Map.FormatInterface.HasThingHeight;
zlabel.Visible = General.Map.FormatInterface.HasThingHeight;
//mxd. Decimals allowed?
if(General.Map.FormatInterface.VertexDecimals > 0)
{
posZ.AllowDecimal = true;
}
// Setup types list
thingslist.Setup();
// Set type
thingslist.SelectType(s_thingType, s_parameter);
// Flags
ThingTypeInfo ti = General.Map.Data.GetThingInfoEx(s_thingType);
IDictionary<string, string> newFlags = (ti == null || ti.Flags.Count == 0) ? General.Map.Config.ThingFlags : ti.Flags;
flags.UpdateCheckboxes(newFlags);
anglelabel.Text = (ti == null) ? "Angle:" : ti.AngleText + ":";
flagsvallabel.Text = (ti == null) ? "Flags value:" : ti.FlagsValueText + ":";
foreach (CheckBox c in flags.Checkboxes)
if (s_flags.ContainsKey(c.Tag.ToString())) c.Checked = s_flags[c.Tag.ToString()];
// Coordination
angle.Text = s_angleDoom.ToString();
// Z Position
posZ.Text = s_posZ.ToString();
posZ.AllowNegative = General.Map.FormatInterface.MinThingHeight < 0;
// Update...
flags.UpdateCheckboxes(newFlags);
if (ti != null)
{
flagsvallabel.Text = ti.FlagsValueText + ":";
}
preventchanges = false;
angle_WhenTextChanged(angle, EventArgs.Empty);
flags_OnValueChanged(flags, EventArgs.Empty);
flagsvalue.Text = evaluateFlagsValue();
}
#endregion
#region ================== Methods
private string evaluateFlagsValue()
{
int i = 1;
int value = 0;
foreach (CheckBox box in flags.Checkboxes)
{
if (box.CheckState == CheckState.Indeterminate) return "";
if (box.CheckState == CheckState.Checked) value += i;
i *= 2;
}
if (General.Map.SRB2)
{
float z = posZ.GetResultFloat(s_posZ);
return (value + ((int)z << 4)).ToString();
}
else return value.ToString();
}
public Result GetThingResult()
{
return new Result(m_ok, s_thingType, s_parameter, s_flags, s_angleDoom, s_posZ);
}
// This browses for a thing type
// Returns the new thing type or the same thing type when cancelled
public static Result BrowseThing(IWin32Window owner)
{
ThingBrowser2Form f = new ThingBrowser2Form();
DialogResult result = f.ShowDialog(owner);
Result tr = f.GetThingResult();
f.Dispose();
return tr;
}
#endregion
#region ================== Events
//mxd
private void thingtype_OnTypeDoubleClicked()
{
apply_Click(this, EventArgs.Empty);
}
// Angle text changes
private void angle_WhenTextChanged(object sender, EventArgs e)
{
if(preventchanges) return;
preventchanges = true;
anglecontrol.Angle = angle.GetResult(GZBuilder.Controls.AngleControl.NO_ANGLE);
preventchanges = false;
}
//mxd. Angle control clicked
private void anglecontrol_AngleChanged(object sender, EventArgs e)
{
if(preventchanges) return;
angle.Text = anglecontrol.Angle.ToString();
}
// Apply clicked
private void apply_Click(object sender, EventArgs e)
{
List<string> defaultflags = new List<string>();
// Verify the type
if(((thingslist.GetFullType(0) < General.Map.FormatInterface.MinThingType) || (thingslist.GetFullType(0) > General.Map.FormatInterface.MaxThingType)))
{
General.ShowWarningMessage("Thing type must be between " + General.Map.FormatInterface.MinThingType + " and " + General.Map.FormatInterface.MaxThingType + ".", MessageBoxButtons.OK);
return;
}
// Apply all flags
s_thingType = thingslist.GetResult(s_thingType);
s_parameter = thingslist.GetFullType(s_thingType) / 4096;
s_angleDoom = angle.GetResult(s_angleDoom);
s_posZ = posZ.GetResultFloat(s_posZ);
s_flags = new Dictionary<string, bool>();
foreach (CheckBox c in flags.Checkboxes)
{
s_flags.Add(c.Tag.ToString(), c.Checked);
}
m_ok = true;
// Done
this.DialogResult = DialogResult.OK;
this.Close();
}
// Cancel clicked
private void cancel_Click(object sender, EventArgs e)
{
// Be gone
this.DialogResult = DialogResult.Cancel;
this.Close();
}
//mxd
private void ThingBrowserAdvForm_Shown(object sender, EventArgs e)
{
thingslist.FocusTextbox();
}
// Help
private void ThingBrowserAdvForm_HelpRequested(object sender, HelpEventArgs hlpevent)
{
General.ShowHelp("w_thingedit.html");
hlpevent.Handled = true;
}
private void posZ_WhenTextChanged(object sender, EventArgs e)
{
if (preventchanges) return;
if (!flagsvalue_ignore)
{
flagsvalue_ignore = true;
flagsvalue.Text = evaluateFlagsValue();
flagsvalue_ignore = false;
}
}
private void flagsvalue_TextChanged(object sender, EventArgs e)
{
if (!flagsvalue_ignore && !string.IsNullOrEmpty(flagsvalue.Text))
{
flagsvalue_ignore = true;
int value = General.Clamp(flagsvalue.GetResult(0), 0, 0xFFFF);
int i = 1;
flags_ignore = true;
foreach (CheckBox box in flags.Checkboxes)
{
box.Checked = ((value & i) == i);
i *= 2;
}
flags_ignore = false;
flags_OnValueChanged(this, null);
if (General.Map.SRB2)
{
int z = value >> 4;
posZ.Text = z.ToString();
}
flagsvalue_ignore = false;
}
}
// Selected type changes
private void thingtype_OnTypeChanged(ThingTypeInfo value)
{
thinginfo = value;
//mxd. Update things
if(preventchanges) return;
if(((thingslist.GetResult(0) < General.Map.FormatInterface.MinThingType) || (thingslist.GetResult(0) > General.Map.FormatInterface.MaxThingType)))
return;
IDictionary<string, string> newFlags = (thinginfo == null || thinginfo.Flags.Count == 0) ? General.Map.Config.ThingFlags : thinginfo.Flags;
flags.UpdateCheckboxes(newFlags);
anglelabel.Text = (thinginfo == null) ? "Angle:" : thinginfo.AngleText + ":";
flagsvallabel.Text = (thinginfo == null) ? "Flags value:" : thinginfo.FlagsValueText + ":";
}
//mxd
private void flags_OnValueChanged(object sender, EventArgs e)
{
if(flags_ignore || preventchanges) return;
// Gather enabled flags
HashSet<string> activeflags = new HashSet<string>();
foreach(CheckBox cb in flags.Checkboxes)
{
if(cb.CheckState != CheckState.Unchecked) activeflags.Add(cb.Tag.ToString());
}
// Check em
List<string> warnings = ThingFlagsCompare.CheckFlags(activeflags);
if(warnings.Count > 0)
{
//got missing flags
tooltip.SetToolTip(missingflags, string.Join(Environment.NewLine, warnings.ToArray()));
missingflags.Visible = true;
settingsgroup.ForeColor = Color.DarkRed;
return;
}
//everything is OK
missingflags.Visible = false;
settingsgroup.ForeColor = SystemColors.ControlText;
if (!flagsvalue_ignore)
{
flagsvalue_ignore = true;
flagsvalue.Text = evaluateFlagsValue();
flagsvalue_ignore = false;
}
}
#endregion
}
}

View file

@ -0,0 +1,313 @@
namespace CodeImp.DoomBuilder.Windows
{
partial class ThingBrowser2Form
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.GroupBox groupBox2;
this.anglecontrol = new CodeImp.DoomBuilder.GZBuilder.Controls.AngleControl();
this.anglelabel = new System.Windows.Forms.Label();
this.posZ = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.angle = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.zlabel = new System.Windows.Forms.Label();
this.tooltip = new System.Windows.Forms.ToolTip(this.components);
this.apply = new System.Windows.Forms.Button();
this.cancel = new System.Windows.Forms.Button();
this.applypanel = new System.Windows.Forms.Panel();
this.panel = new System.Windows.Forms.Panel();
this.typegroup = new System.Windows.Forms.GroupBox();
this.thingslist = new CodeImp.DoomBuilder.Controls.ThingBrowserControl();
this.settingsgroup = new System.Windows.Forms.GroupBox();
this.flagsvallabel = new System.Windows.Forms.Label();
this.flagsvalue = new CodeImp.DoomBuilder.Controls.NumericTextbox();
this.missingflags = new System.Windows.Forms.PictureBox();
this.flags = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl();
groupBox2 = new System.Windows.Forms.GroupBox();
groupBox2.SuspendLayout();
this.applypanel.SuspendLayout();
this.panel.SuspendLayout();
this.typegroup.SuspendLayout();
this.settingsgroup.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.missingflags)).BeginInit();
this.SuspendLayout();
//
// groupBox2
//
groupBox2.Controls.Add(this.anglecontrol);
groupBox2.Controls.Add(this.anglelabel);
groupBox2.Controls.Add(this.posZ);
groupBox2.Controls.Add(this.angle);
groupBox2.Controls.Add(this.zlabel);
groupBox2.Location = new System.Drawing.Point(279, 242);
groupBox2.Name = "groupBox2";
groupBox2.Size = new System.Drawing.Size(271, 134);
groupBox2.TabIndex = 2;
groupBox2.TabStop = false;
//
// anglecontrol
//
this.anglecontrol.Angle = 0;
this.anglecontrol.AngleOffset = 0;
this.anglecontrol.Location = new System.Drawing.Point(149, 12);
this.anglecontrol.Name = "anglecontrol";
this.anglecontrol.Size = new System.Drawing.Size(116, 116);
this.anglecontrol.TabIndex = 2;
this.anglecontrol.AngleChanged += new System.EventHandler(this.anglecontrol_AngleChanged);
//
// anglelabel
//
this.anglelabel.Location = new System.Drawing.Point(9, 23);
this.anglelabel.Name = "anglelabel";
this.anglelabel.Size = new System.Drawing.Size(50, 14);
this.anglelabel.TabIndex = 0;
this.anglelabel.Text = "Angle:";
this.anglelabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// posZ
//
this.posZ.AllowDecimal = false;
this.posZ.AllowNegative = true;
this.posZ.AllowRelative = true;
this.posZ.ButtonStep = 8;
this.posZ.ButtonStepBig = 16F;
this.posZ.ButtonStepFloat = 1F;
this.posZ.ButtonStepSmall = 1F;
this.posZ.ButtonStepsUseModifierKeys = true;
this.posZ.ButtonStepsWrapAround = false;
this.posZ.Location = new System.Drawing.Point(61, 104);
this.posZ.Name = "posZ";
this.posZ.Size = new System.Drawing.Size(82, 24);
this.posZ.StepValues = null;
this.posZ.TabIndex = 4;
this.posZ.WhenTextChanged += new System.EventHandler(this.posZ_WhenTextChanged);
//
// angle
//
this.angle.AllowDecimal = false;
this.angle.AllowNegative = true;
this.angle.AllowRelative = true;
this.angle.ButtonStep = 5;
this.angle.ButtonStepBig = 15F;
this.angle.ButtonStepFloat = 1F;
this.angle.ButtonStepSmall = 1F;
this.angle.ButtonStepsUseModifierKeys = true;
this.angle.ButtonStepsWrapAround = false;
this.angle.Location = new System.Drawing.Point(61, 19);
this.angle.Name = "angle";
this.angle.Size = new System.Drawing.Size(82, 24);
this.angle.StepValues = null;
this.angle.TabIndex = 1;
this.angle.WhenTextChanged += new System.EventHandler(this.angle_WhenTextChanged);
//
// zlabel
//
this.zlabel.Location = new System.Drawing.Point(5, 109);
this.zlabel.Name = "zlabel";
this.zlabel.Size = new System.Drawing.Size(50, 14);
this.zlabel.TabIndex = 3;
this.zlabel.Text = "Height:";
this.zlabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// apply
//
this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.apply.Location = new System.Drawing.Point(320, 4);
this.apply.Name = "apply";
this.apply.Size = new System.Drawing.Size(112, 25);
this.apply.TabIndex = 0;
this.apply.Text = "OK";
this.apply.UseVisualStyleBackColor = true;
this.apply.Click += new System.EventHandler(this.apply_Click);
//
// cancel
//
this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancel.Location = new System.Drawing.Point(438, 4);
this.cancel.Name = "cancel";
this.cancel.Size = new System.Drawing.Size(112, 25);
this.cancel.TabIndex = 1;
this.cancel.Text = "Cancel";
this.cancel.UseVisualStyleBackColor = true;
this.cancel.Click += new System.EventHandler(this.cancel_Click);
//
// applypanel
//
this.applypanel.Controls.Add(this.cancel);
this.applypanel.Controls.Add(this.apply);
this.applypanel.Location = new System.Drawing.Point(12, 401);
this.applypanel.Name = "applypanel";
this.applypanel.Size = new System.Drawing.Size(553, 32);
this.applypanel.TabIndex = 1;
//
// panel
//
this.panel.BackColor = System.Drawing.SystemColors.Window;
this.panel.Controls.Add(this.typegroup);
this.panel.Controls.Add(groupBox2);
this.panel.Controls.Add(this.settingsgroup);
this.panel.Location = new System.Drawing.Point(12, 12);
this.panel.Name = "panel";
this.panel.Size = new System.Drawing.Size(553, 378);
this.panel.TabIndex = 0;
//
// typegroup
//
this.typegroup.Controls.Add(this.thingslist);
this.typegroup.Location = new System.Drawing.Point(4, 3);
this.typegroup.Name = "typegroup";
this.typegroup.Size = new System.Drawing.Size(269, 373);
this.typegroup.TabIndex = 0;
this.typegroup.TabStop = false;
this.typegroup.Text = " Thing ";
//
// thingslist
//
this.thingslist.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.thingslist.Location = new System.Drawing.Point(9, 13);
this.thingslist.Margin = new System.Windows.Forms.Padding(6);
this.thingslist.Name = "thingslist";
this.thingslist.Size = new System.Drawing.Size(251, 357);
this.thingslist.TabIndex = 0;
this.thingslist.UseMultiSelection = false;
this.thingslist.OnTypeChanged += new CodeImp.DoomBuilder.Controls.ThingBrowserControl.TypeChangedDeletegate(this.thingtype_OnTypeChanged);
this.thingslist.OnTypeDoubleClicked += new CodeImp.DoomBuilder.Controls.ThingBrowserControl.TypeDoubleClickDeletegate(this.thingtype_OnTypeDoubleClicked);
//
// settingsgroup
//
this.settingsgroup.Controls.Add(this.flagsvallabel);
this.settingsgroup.Controls.Add(this.flagsvalue);
this.settingsgroup.Controls.Add(this.missingflags);
this.settingsgroup.Controls.Add(this.flags);
this.settingsgroup.Location = new System.Drawing.Point(279, 3);
this.settingsgroup.Name = "settingsgroup";
this.settingsgroup.Size = new System.Drawing.Size(271, 233);
this.settingsgroup.TabIndex = 1;
this.settingsgroup.TabStop = false;
this.settingsgroup.Text = " Settings ";
//
// flagsvallabel
//
this.flagsvallabel.Location = new System.Drawing.Point(86, 198);
this.flagsvallabel.Name = "flagsvallabel";
this.flagsvallabel.Size = new System.Drawing.Size(75, 14);
this.flagsvallabel.TabIndex = 1;
this.flagsvallabel.Text = "Flags value:";
this.flagsvallabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// flagsvalue
//
this.flagsvalue.AllowDecimal = false;
this.flagsvalue.AllowNegative = false;
this.flagsvalue.AllowRelative = false;
this.flagsvalue.ForeColor = System.Drawing.SystemColors.HotTrack;
this.flagsvalue.ImeMode = System.Windows.Forms.ImeMode.Off;
this.flagsvalue.Location = new System.Drawing.Point(177, 196);
this.flagsvalue.Name = "flagsvalue";
this.flagsvalue.Size = new System.Drawing.Size(72, 20);
this.flagsvalue.TabIndex = 2;
this.flagsvalue.TextChanged += new System.EventHandler(this.flagsvalue_TextChanged);
//
// missingflags
//
this.missingflags.BackColor = System.Drawing.SystemColors.Window;
this.missingflags.Image = global::CodeImp.DoomBuilder.Properties.Resources.Warning;
this.missingflags.Location = new System.Drawing.Point(55, -2);
this.missingflags.Name = "missingflags";
this.missingflags.Size = new System.Drawing.Size(16, 16);
this.missingflags.TabIndex = 5;
this.missingflags.TabStop = false;
this.missingflags.Visible = false;
//
// flags
//
this.flags.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.flags.AutoScroll = true;
this.flags.Columns = 2;
this.flags.Location = new System.Drawing.Point(14, 19);
this.flags.Name = "flags";
this.flags.Size = new System.Drawing.Size(251, 211);
this.flags.TabIndex = 0;
this.flags.VerticalSpacing = 1;
this.flags.OnValueChanged += new System.EventHandler(this.flags_OnValueChanged);
//
// ThingBrowser2Form
//
this.AcceptButton = this.apply;
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.CancelButton = this.cancel;
this.ClientSize = new System.Drawing.Size(577, 447);
this.Controls.Add(this.applypanel);
this.Controls.Add(this.panel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ThingBrowser2Form";
this.Opacity = 1D;
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Choose Thing Type";
this.Shown += new System.EventHandler(this.ThingBrowserAdvForm_Shown);
this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.ThingBrowserAdvForm_HelpRequested);
groupBox2.ResumeLayout(false);
this.applypanel.ResumeLayout(false);
this.panel.ResumeLayout(false);
this.typegroup.ResumeLayout(false);
this.settingsgroup.ResumeLayout(false);
this.settingsgroup.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.missingflags)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button cancel;
private System.Windows.Forms.Button apply;
private System.Windows.Forms.GroupBox settingsgroup;
private CodeImp.DoomBuilder.Controls.CheckboxArrayControl flags;
private System.Windows.Forms.Label zlabel;
private CodeImp.DoomBuilder.Controls.ThingBrowserControl thingslist;
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox angle;
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox posZ;
private System.Windows.Forms.PictureBox missingflags;
private System.Windows.Forms.ToolTip tooltip;
private System.Windows.Forms.Panel panel;
private System.Windows.Forms.GroupBox typegroup;
private System.Windows.Forms.Panel applypanel;
private System.Windows.Forms.Label flagsvallabel;
private Controls.NumericTextbox flagsvalue;
private GZBuilder.Controls.AngleControl anglecontrol;
private System.Windows.Forms.Label anglelabel;
}
}

View file

@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="groupBox2.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

File diff suppressed because it is too large Load diff

View file

@ -165,7 +165,7 @@ namespace CodeImp.DoomBuilder.BuilderEffects
if(formLocation.X == 0 && formLocation.Y == 0)
{
Size displaySize = General.Interface.Display.Size;
Point displayLocation = General.Interface.Display.LocationAbs;
Point displayLocation = General.Interface.Display.GetLocationAbs();
formLocation = new Point(displayLocation.X + displaySize.Width - form.Width - 16, displayLocation.Y + 16);
}

View file

@ -81,6 +81,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="ClassicModes\BaseClassicMode.cs" />
<Compile Include="ClassicModes\DrawShapeMode.cs" />
<Compile Include="ClassicModes\InsertThingsRadiallyMode.cs" />
<Compile Include="ClassicModes\ErrorCheckMode.cs" />
<Compile Include="ClassicModes\EditSelectionMode.cs" />
@ -91,6 +92,11 @@
<Compile Include="ClassicModes\DrawGeometryMode.cs" />
<Compile Include="ClassicModes\FindReplaceMode.cs" />
<Compile Include="ClassicModes\MakeSectorMode.cs" />
<Compile Include="ClassicModes\ParallelLinedefMode.cs" />
<Compile Include="ClassicModes\PerpendicularLinedefMode.cs" />
<Compile Include="ClassicModes\PerpendicularVertexMode.cs" />
<Compile Include="ClassicModes\VertexIntoShapeMode.cs" />
<Compile Include="ClassicModes\VertexSlopeAssistMode.cs" />
<Compile Include="ErrorChecks\CheckClosedSectors.cs" />
<Compile Include="ErrorChecks\CheckStuckThings.cs" />
<Compile Include="ErrorChecks\CheckLineReferences.cs" />
@ -120,6 +126,12 @@
<Compile Include="Interface\CurveLinedefsForm.Designer.cs">
<DependentUpon>CurveLinedefsForm.cs</DependentUpon>
</Compile>
<Compile Include="Interface\DrawShapeOptionsPanel.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Interface\DrawShapeOptionsPanel.Designer.cs">
<DependentUpon>DrawShapeOptionsPanel.cs</DependentUpon>
</Compile>
<Compile Include="Interface\InsertThingsRadiallyOptionsPanel.cs">
<SubType>UserControl</SubType>
</Compile>
@ -150,12 +162,48 @@
<Compile Include="Interface\MenusForm.Designer.cs">
<DependentUpon>MenusForm.cs</DependentUpon>
</Compile>
<Compile Include="Interface\ParallelLinedefForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Interface\ParallelLinedefForm.designer.cs">
<DependentUpon>ParallelLinedefForm.cs</DependentUpon>
</Compile>
<Compile Include="Interface\PerpendicularLinedefForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Interface\PerpendicularLinedefForm.designer.cs">
<DependentUpon>PerpendicularLinedefForm.cs</DependentUpon>
</Compile>
<Compile Include="Interface\PerpendicularVertexForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Interface\PerpendicularVertexForm.designer.cs">
<DependentUpon>PerpendicularVertexForm.cs</DependentUpon>
</Compile>
<Compile Include="Interface\PreferencesForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Interface\PreferencesForm.Designer.cs">
<DependentUpon>PreferencesForm.cs</DependentUpon>
</Compile>
<Compile Include="Interface\VertexIntoShapeForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Interface\VertexIntoShapeForm.designer.cs">
<DependentUpon>VertexIntoShapeForm.cs</DependentUpon>
</Compile>
<Compile Include="Interface\VertexSlopeAssistForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Interface\VertexSlopeAssistForm.designer.cs">
<DependentUpon>VertexSlopeAssistForm.cs</DependentUpon>
</Compile>
<Compile Include="Interface\VertexSlopeAssistTagForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Interface\VertexSlopeAssistTagForm.designer.cs">
<DependentUpon>VertexSlopeAssistTagForm.cs</DependentUpon>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
@ -171,10 +219,31 @@
<Compile Include="ClassicModes\VerticesMode.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Interface\DrawShapeOptionsPanel.resx">
<DependentUpon>DrawShapeOptionsPanel.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Interface\InsertThingsRadiallyOptionsPanel.resx">
<DependentUpon>InsertThingsRadiallyOptionsPanel.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Interface\ParallelLinedefForm.resx">
<DependentUpon>ParallelLinedefForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Interface\PerpendicularLinedefForm.resx">
<DependentUpon>PerpendicularLinedefForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Interface\PerpendicularVertexForm.resx">
<DependentUpon>PerpendicularVertexForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Interface\VertexIntoShapeForm.resx">
<DependentUpon>VertexIntoShapeForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Interface\VertexSlopeAssistForm.resx">
<DependentUpon>VertexSlopeAssistForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Interface\VertexSlopeAssistTagForm.resx">
<DependentUpon>VertexSlopeAssistTagForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Resources\Actions.cfg" />
</ItemGroup>
<ItemGroup>
@ -633,6 +702,60 @@
<ItemGroup>
<EmbeddedResource Include="Resources\InsertThingsRadiallyMode.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\AddTriangle.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\AddVertex.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\Close.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\DrawShape3Sides.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\DrawShape8Sides.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\DrawShape24Sides.png" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\DrawShapeMode.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\DrawShapeSpike0.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\DrawShapeSpike50.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\DrawTaggedTriangle.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\DrawTriangle.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\ParallelLinedef.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\PerpendicularLinedef.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\PerpendicularVertex.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\Search.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\SingleVertex.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\VertexIntoShape.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\VertexSlope.png" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

View file

@ -0,0 +1,763 @@
#region ================== Namespaces
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Actions;
using CodeImp.DoomBuilder.Controls;
using CodeImp.DoomBuilder.Editing;
using CodeImp.DoomBuilder.Geometry;
using CodeImp.DoomBuilder.Map;
using CodeImp.DoomBuilder.Rendering;
using CodeImp.DoomBuilder.Windows;
#endregion
//JBR Draw Shape Mode
namespace CodeImp.DoomBuilder.BuilderModes
{
[EditMode(DisplayName = "Draw Shape Mode",
SwitchAction = "drawshapemode",
ButtonImage = "DrawShapeMode.png",
ButtonOrder = int.MinValue + 6,
ButtonGroup = "000_drawing",
AllowCopyPaste = false,
Volatile = true,
Optional = false)]
public class DrawShapeMode : DrawGeometryMode
{
#region ================== Variables
public const int CLOSESHAPE_ORIGIN = 0;
public const int CLOSESHAPE_VERTICES = 1;
public const int SHAPE = 2;
public const int LINEDEFS = 3;
public const int VERTICES = 4;
public const int THINGS = 5;
protected static int thingtype = 1; // Changed when adding things
protected static bool previewreference = true;
protected static bool ellipse = true;
protected static int firstpointtype = 0;
protected static int sides = 8;
protected static int spikiness = 0;
protected static int spikingmode = 0;
protected static int createas = 0;
protected static bool frontoutside = false;
protected static float startangle = 0f;
protected static float sweepangle = Angle2D.PI2;
protected static bool limitonquad = true;
protected static int transformonquad = 0; // Leave as always 0 for now
protected Vector2D start;
protected Vector2D end;
protected Vector2D origin;
//interface
private DrawShapeOptionsPanel panel;
private Docker docker;
#endregion
#region ================== Constructor
public DrawShapeMode()
{
}
#endregion
#region ================== Methods
// This generates the shape from a vertex
protected static List<Vector2D> GenerateShape(Vector2D origin, int sides, int spikiness, int spikingmode, float radiusX, float radiusY, float start, float end)
{
if (sides <= 0) return new List<Vector2D>();
float spikeX = (float)spikiness / 100f * radiusX;
float spikeY = (float)spikiness / 100f * radiusY;
float spikeDef = (float)spikiness;
// Make list
List<Vector2D> points = new List<Vector2D>();
// Spiking fun!
int spiketype = spikingmode >> 2;
int spikematch = spikingmode & 1;
if ((spikingmode & 2) == 2)
{
spikeX = -spikeX;
spikeY = -spikeY;
}
// FEATURE: In some spikingmodes, if spikiness is over 100% the spikes can cross between center for interesting results!
// Plot each side
for (int i = 0; i < sides + 1; i++)
{
float offX = 0f;
float offY = 0f;
if (spiketype == 0)
{
// Spike outside and inside
if ((i & 1) == spikematch)
{
offX = spikeX;
offY = spikeY;
}
}
else if (spiketype == 1)
{
// Spike zig-zag and gear
offX = spikeX;
offY = spikeY;
if ((spikematch == 0) || (i & 1) == spikematch)
{
spikeX = -spikeX;
spikeY = -spikeY;
}
}
else if (spiketype == 2)
{
// Simulate the DrawEllipse spikiness
if ((i & 1) == spikematch)
{
offX = spikeDef;
offY = spikeDef;
}
}
float delta = (float)i / sides;
float angle = start + (end - start) * delta;
float x = (float)Math.Cos(angle) * (radiusX + offX);
float y = (float)Math.Sin(angle) * (radiusY + offY);
Vector2D vertex = new Vector2D(x, y);
points.Add(origin + vertex);
}
// Done
return points;
}
// Calculate origin and radius from 2 vectors
protected static void CalculateOrigin(int firstpointtype, bool ellipse, Vector2D start, Vector2D end, out Vector2D origin, out Vector2D endpoint, out float radiusX, out float radiusY)
{
origin = start;
endpoint = end;
if (firstpointtype == 1)
{
// 1st point in corner like DrawEllipse
origin = (start + end) / 2f;
float centerX = (end.x - start.x) / 2f;
float centerY = (end.y - start.y) / 2f;
radiusX = Math.Abs(centerX);
radiusY = Math.Abs(centerY);
if (!ellipse)
{
if (radiusX > radiusY)
{
radiusY = radiusX;
centerY = (centerY >= 0f) ? Math.Abs(centerX) : -Math.Abs(centerX);
}
else
{
radiusX = radiusY;
centerX = (centerX >= 0f) ? Math.Abs(centerY) : -Math.Abs(centerY);
}
origin.x = start.x + centerX;
origin.y = start.y + centerY;
}
}
else if (firstpointtype == 2)
{
// 1st point in side/corner towards origin
radiusX = Math.Abs(end.x - start.x);
radiusY = Math.Abs(end.y - start.y);
origin = end;
endpoint = start;
if (!ellipse)
{
if (radiusX > radiusY)
radiusY = radiusX;
else
radiusX = radiusY;
}
}
else
{
// 1st point in center towards radius
if (ellipse)
{
radiusX = Math.Abs(end.x - start.x);
radiusY = Math.Abs(end.y - start.y);
}
else
{
float radius = (end - start).GetLength();
radiusX = radius;
radiusY = radius;
}
}
}
// Recalculate angle from quadrant
protected static float ReCalculateAngleFromQuadrant(int transformonquad, float angle, bool inverse, Vector2D start, Vector2D end)
{
Vector2D delta = end - start;
if (transformonquad == 0) // top-right quadrant (1)
{
if (delta.x < 0)
{
if (delta.y < 0) // quadrant 3
angle += inverse ? -Angle2D.PI : Angle2D.PI;
else // quadrant 2
angle += inverse ? -Angle2D.PIHALF : Angle2D.PIHALF;
}
else
{
if (delta.y < 0) // quadrant 4
angle += inverse ? -Angle2D.PIANDHALF : Angle2D.PIANDHALF;
else // quadrant 1
angle += inverse ? -0 : 0;
}
}
else if (transformonquad == 1) // top-left quadrant (2)
{
if (delta.x < 0)
{
if (delta.y < 0) // quadrant 3
angle += inverse ? -Angle2D.PIHALF : Angle2D.PIHALF;
else // quadrant 2
angle += inverse ? -0 : 0;
}
else
{
if (delta.y < 0) // quadrant 4
angle += inverse ? -Angle2D.PI : Angle2D.PI;
else // quadrant 1
angle += inverse ? Angle2D.PIHALF : -Angle2D.PIHALF;
}
}
else if (transformonquad == 2) // bottom-left quadrant (3)
{
if (delta.x < 0)
{
if (delta.y < 0) // quadrant 3
angle += inverse ? -0 : 0;
else // quadrant 2
angle += inverse ? Angle2D.PIHALF : -Angle2D.PIHALF;
}
else
{
if (delta.y < 0) // quadrant 4
angle += inverse ? -Angle2D.PIHALF : Angle2D.PIHALF;
else // quadrant 1
angle += inverse ? Angle2D.PI : -Angle2D.PI;
}
}
else if (transformonquad == 3) // bottom-right quadrant (4)
{
if (delta.x < 0)
{
if (delta.y < 0) // quadrant 3
angle += inverse ? Angle2D.PIHALF : -Angle2D.PIHALF;
else // quadrant 2
angle += inverse ? Angle2D.PI : -Angle2D.PI;
}
else
{
if (delta.y < 0) // quadrant 4
angle += inverse ? -0 : 0;
else // quadrant 1
angle += inverse ? Angle2D.PIANDHALF : -Angle2D.PIANDHALF;
}
}
else if (transformonquad == 4) // Flip around (disabled!)
{
if (delta.x < 0)
{
// Flip horizontally
if (angle < Angle2D.PI)
angle = Angle2D.PI - angle;
else
angle = Angle2D.PI2 + Angle2D.PI - angle;
}
if (delta.y < 0)
{
// Flip vertically
angle = Angle2D.PI2 - angle;
}
}
if (angle < 0f) angle += Angle2D.PI2;
if (angle >= Angle2D.PI2) angle -= Angle2D.PI2;
return angle;
}
// Allow user to modify angles by using the mouse
protected void EndpointDrawShapeAngle(bool doSweepAngle)
{
Vector2D delta = end - start;
float angle = -(float)Math.Atan2(-delta.y, delta.x);
if (angle < 0f) angle = Angle2D.PI2 + angle;
if (doSweepAngle)
{
float restartang = startangle;
if (limitonquad) restartang = ReCalculateAngleFromQuadrant(transformonquad, restartang, false, start, end);
sweepangle = angle - restartang;
if (sweepangle < 0f) sweepangle += Angle2D.PI2;
if (sweepangle == 0f || sweepangle > Angle2D.PI2) sweepangle = Angle2D.PI2;
panel.SweepAngle = Angle2D.RadToDeg(sweepangle);
}
else
{
startangle = angle;
if (limitonquad) startangle = ReCalculateAngleFromQuadrant(transformonquad, startangle, true, start, end);
panel.StartAngle = Angle2D.RadToDeg(startangle);
}
}
// This draws a point at a specific location
protected virtual bool AddPointAt(List<DrawnVertex> shapepts, Vector2D pos, bool stitch, bool stitchline)
{
if (pos.x < General.Map.Config.LeftBoundary || pos.x > General.Map.Config.RightBoundary ||
pos.y > General.Map.Config.TopBoundary || pos.y < General.Map.Config.BottomBoundary)
return false;
DrawnVertex newpoint = new DrawnVertex();
newpoint.pos = pos;
newpoint.stitch = stitch;
newpoint.stitchline = stitchline;
shapepts.Add(newpoint);
return true;
}
override protected void Update()
{
PixelColor stitchcolor = General.Colors.Highlight;
PixelColor losecolor = General.Colors.Selection;
snaptocardinaldirection = General.Interface.ShiftState && General.Interface.AltState; //mxd
snaptogrid = (snaptocardinaldirection || General.Interface.ShiftState ^ General.Interface.SnapToGrid);
snaptonearest = General.Interface.CtrlState ^ General.Interface.AutoMerge;
DrawnVertex curp = GetCurrentPosition();
float vsize = (renderer.VertexSize + 1.0f) / renderer.Scale;
// Render drawing lines
if (renderer.StartOverlay(true))
{
PixelColor color = snaptonearest ? stitchcolor : losecolor;
if (points.Count == 1)
{
// Update ending point
if (curp.pos.IsFinite()) end = curp.pos;
// Generate shape
Vector2D endpoint;
float radiusX, radiusY;
CalculateOrigin(firstpointtype, ellipse, start, end, out origin, out endpoint, out radiusX, out radiusY);
float angle = startangle;
if (limitonquad) angle = ReCalculateAngleFromQuadrant(transformonquad, startangle, false, start, end);
List<Vector2D> shapevecs = GenerateShape(origin, sides, spikiness, spikingmode, radiusX, radiusY, angle, angle + sweepangle);
// Check if the shape is closed
bool isShapeClosed = shapevecs[0].CloseTo(shapevecs[shapevecs.Count - 1], 0.1f);
// render reference
if (previewreference)
{
List<Vector2D> refcircle = GenerateShape(origin, 32, 0, 0, radiusX, radiusY, angle, angle + sweepangle);
for (int i = 1; i < refcircle.Count; i++)
renderer.RenderLine(refcircle[i - 1], refcircle[i], LINE_THICKNESS, General.Colors.Grid, true);
renderer.RenderLine(origin, shapevecs[0], LINE_THICKNESS, General.Colors.Grid, true);
renderer.RenderLine(origin, shapevecs[shapevecs.Count - 1], LINE_THICKNESS, General.Colors.Grid, true);
}
renderer.RenderRectangleFilled(new RectangleF(start.x - vsize, start.y - vsize, vsize * 2.0f, vsize * 2.0f), General.Colors.InfoLine, true);
renderer.RenderRectangleFilled(new RectangleF(endpoint.x - vsize, endpoint.y - vsize, vsize * 2.0f, vsize * 2.0f), General.Colors.InfoLine, true);
// render labels
Vector2D[] labelCoords = new[] {
new Vector2D(origin.x - radiusX, origin.y - radiusY),
new Vector2D(origin.x + radiusX, origin.y - radiusY),
new Vector2D(origin.x + radiusX, origin.y + radiusY),
new Vector2D(origin.x - radiusX, origin.y + radiusY),
new Vector2D(origin.x - radiusX, origin.y - radiusY)
};
for (int i = 1; i < 5; i++)
{
labels[i - 1].Move(labelCoords[i], labelCoords[i - 1]);
renderer.RenderText(labels[i - 1].TextLabel);
}
labels[4].Move(origin, shapevecs[0]);
renderer.RenderText(labels[4].TextLabel);
labels[5].Move(shapevecs[0], shapevecs[1]);
renderer.RenderText(labels[5].TextLabel);
if (sweepangle < Angle2D.PI2)
{
labels[5].Move(origin, shapevecs[shapevecs.Count - 1]);
renderer.RenderText(labels[5].TextLabel);
}
// render shape
if (createas <= LINEDEFS)
{
for (int i = 1; i < shapevecs.Count; i++)
renderer.RenderLine(shapevecs[i - 1], shapevecs[i], LINE_THICKNESS, color, true);
if (!isShapeClosed && createas == CLOSESHAPE_ORIGIN)
{
renderer.RenderLine(shapevecs[shapevecs.Count - 1], origin, LINE_THICKNESS, color, true);
renderer.RenderLine(origin, shapevecs[0], LINE_THICKNESS, color, true);
}
if (!isShapeClosed && createas == CLOSESHAPE_VERTICES)
{
renderer.RenderLine(shapevecs[shapevecs.Count - 1], shapevecs[0], LINE_THICKNESS, color, true);
}
}
// render vertices
for (int i = 0; i < shapevecs.Count; i++)
renderer.RenderRectangleFilled(new RectangleF(shapevecs[i].x - vsize, shapevecs[i].y - vsize, vsize * 2.0f, vsize * 2.0f), color, true);
}
else
{
// Render vertex at cursor
renderer.RenderRectangleFilled(new RectangleF(curp.pos.x - vsize, curp.pos.y - vsize, vsize * 2.0f, vsize * 2.0f), color, true);
}
// Done
renderer.Finish();
}
// Done
renderer.Present();
}
// This draws a point at a specific location
override public bool DrawPointAt(Vector2D pos, bool stitch, bool stitchline)
{
if (pos.x < General.Map.Config.LeftBoundary || pos.x > General.Map.Config.RightBoundary ||
pos.y > General.Map.Config.TopBoundary || pos.y < General.Map.Config.BottomBoundary)
return false;
DrawnVertex newpoint = new DrawnVertex();
newpoint.pos = pos;
newpoint.stitch = true; //stitch
newpoint.stitchline = stitchline;
points.Add(newpoint);
if (points.Count == 1) //add point and labels
{
start = newpoint.pos;
labels.AddRange(new[] {
new LineLengthLabel(false, true),
new LineLengthLabel(false, true),
new LineLengthLabel(false, true),
new LineLengthLabel(false, true),
new LineLengthLabel(true, true),
new LineLengthLabel(true, true)
});
Update();
}
else if (points[0].pos == points[1].pos) //nothing is drawn
{
points = new List<DrawnVertex>();
FinishDraw();
}
else
{
end = newpoint.pos;
FinishDraw();
}
return true;
}
override public void RemovePoint()
{
if (points.Count > 0) points.RemoveAt(points.Count - 1);
if (labels.Count > 0) labels = new List<LineLengthLabel>();
Update();
}
#endregion
#region ================== Events
public override void OnEngage()
{
base.OnEngage();
// Create and setup settings panel
panel = new DrawShapeOptionsPanel();
panel.PreviewReference = previewreference;
panel.Ellipse = ellipse;
panel.FirstPointType = firstpointtype;
panel.CreateAs = createas;
panel.FrontOutside = frontoutside;
panel.Sides = sides;
panel.Spikiness = spikiness;
panel.SpikingMode = spikingmode;
panel.StartAngle = Angle2D.RadToDeg(startangle);
panel.SweepAngle = Angle2D.RadToDeg(sweepangle);
panel.LimitAngleQuad = limitonquad;
panel.OnValueChanged += OptionsPanelOnValueChanged;
// Add docker
docker = new Docker("drawshape", "Draw Shape", panel);
General.Interface.AddDocker(docker);
General.Interface.SelectDocker(docker);
}
public override void OnDisengage()
{
base.OnDisengage();
// Remove docker
General.Interface.RemoveDocker(docker);
panel.Dispose();
panel = null;
}
override public void OnAccept()
{
Cursor.Current = Cursors.AppStarting;
General.Settings.FindDefaultDrawSettings();
if (points.Count == 2)
{
// Make undo for the draw
General.Map.UndoRedo.CreateUndo(String.Format("{0} sides shape draw", sides));
// Generate shape
Vector2D endpoint;
float radiusX, radiusY;
CalculateOrigin(firstpointtype, ellipse, start, end, out origin, out endpoint, out radiusX, out radiusY);
float angle = startangle;
if (limitonquad) angle = ReCalculateAngleFromQuadrant(transformonquad, startangle, false, start, end);
List<Vector2D> shapevecs = GenerateShape(origin, sides, spikiness, spikingmode, radiusX, radiusY, angle, angle + sweepangle);
if (points.Count > 0)
{
// Delete last vertex if match with first
bool wasClosedShape = shapevecs[0].CloseTo(shapevecs[shapevecs.Count - 1], 0.001f);
if (wasClosedShape)
{
shapevecs.RemoveAt(shapevecs.Count - 1);
}
// Flip normals by reversing the list
if (!frontoutside) shapevecs.Reverse();
// Make the drawing
if (createas < LINEDEFS)
{
List<DrawnVertex> shapepts = new List<DrawnVertex>();
foreach (Vector2D t in shapevecs) AddPointAt(shapepts, t, true, true);
if (!wasClosedShape && createas == CLOSESHAPE_ORIGIN)
{
AddPointAt(shapepts, origin, true, true); // Go toward origin before closing
}
if (wasClosedShape || createas <= CLOSESHAPE_VERTICES)
{
AddPointAt(shapepts, shapevecs[0], true, true); // Close the shape
}
if (!Tools.DrawLines(shapepts, true, BuilderPlug.Me.AutoAlignTextureOffsetsOnCreate))
{
// Drawing failed
// NOTE: I have to call this twice, because the first time only cancels this volatile mode
General.Map.UndoRedo.WithdrawUndo();
General.Map.UndoRedo.WithdrawUndo();
return;
}
}
else
{
List<Vertex> vertices = new List<Vertex>();
// Create each point
if (createas != THINGS)
{
for (int i = 0; i < shapevecs.Count; i++)
{
Vertex vp = General.Map.Map.CreateVertex(shapevecs[i]);
if (vp == null)
{
General.Map.UndoRedo.WithdrawUndo();
return;
}
vertices.Add(vp);
}
}
// of for things create things....
if (createas == THINGS)
{
// Pick the thing to add...
ThingBrowserForm f = new ThingBrowserForm(thingtype);
if (f.ShowDialog(BuilderPlug.Me.MenusForm) != DialogResult.OK)
{
f.Dispose();
General.Map.UndoRedo.WithdrawUndo();
return;
}
thingtype = f.SelectedType;
f.Dispose();
// ... and place them
for (int i = 0; i < shapevecs.Count; i++)
{
Thing tp = General.Map.Map.CreateThing();
if (tp == null)
{
General.Map.UndoRedo.WithdrawUndo();
return;
}
General.Settings.ApplyDefaultThingSettings(tp);
tp.SRB2Type = thingtype;
tp.Parameter = 0;
tp.Move(shapevecs[i]);
tp.UpdateConfiguration();
}
//Update Things filter
General.Map.ThingsFilter.Update();
}
// Create linedefs
if (createas == LINEDEFS && shapevecs.Count > 1)
{
for (int i = 1; i < shapevecs.Count; i++)
{
// Join points together
General.Map.Map.CreateLinedef(vertices[i - 1], vertices[i]);
}
if (wasClosedShape)
{
// Join first with last vertex for closed shape
General.Map.Map.CreateLinedef(vertices[shapevecs.Count - 1], vertices[0]);
}
}
}
}
// Snap to map format accuracy
General.Map.Map.SnapAllToAccuracy();
// Clear selection
General.Map.Map.ClearAllSelected();
// Update cached values
General.Map.Map.Update();
// Edit new sectors?
List<Sector> newsectors = General.Map.Map.GetMarkedSectors(true);
if (BuilderPlug.Me.EditNewSector && (newsectors.Count > 0))
General.Interface.ShowEditSectors(newsectors);
// Update the used textures
General.Map.Data.UpdateUsedTextures();
//mxd
General.Map.Renderer2D.UpdateExtraFloorFlag();
// Map is changed
General.Map.IsChanged = true;
// Show info
General.Interface.DisplayStatus(StatusType.Action, String.Format("Created {0} sides shape.", sides));
}
// Done
Cursor.Current = Cursors.Default;
// Return to original mode
General.Editing.ChangeMode(General.Editing.PreviousStableMode.Name);
}
private void OptionsPanelOnValueChanged(object sender, EventArgs eventArgs)
{
previewreference = panel.PreviewReference;
ellipse = panel.Ellipse;
firstpointtype = panel.FirstPointType;
createas = panel.CreateAs;
frontoutside = panel.FrontOutside;
sides = panel.Sides;
spikiness = panel.Spikiness;
spikingmode = panel.SpikingMode;
startangle = Angle2D.DegToRad(panel.StartAngle);
sweepangle = Angle2D.DegToRad(panel.SweepAngle);
limitonquad = panel.LimitAngleQuad;
Update();
}
// Mouse moves
public override void OnMouseMove(MouseEventArgs e)
{
base.OnMouseMove(e);
if (e.Button == MouseButtons.Middle)
{
EndpointDrawShapeAngle(General.Interface.CtrlState);
}
}
public override void OnHelp()
{
General.ShowHelp("mode_drawshape.html");
}
#endregion
#region ================== Actions
[BeginAction("increasebevel")]
protected void IncreaseBevel()
{
if (spikiness < 4096)
{
spikiness++;
panel.Spikiness = spikiness;
Update();
}
}
[BeginAction("decreasebevel")]
protected void DecreaseBevel()
{
if (spikiness > 0)
{
spikiness--;
panel.Spikiness = spikiness;
Update();
}
}
[BeginAction("increasesubdivlevel")]
protected void IncreaseSubdivLevel()
{
if (sides < 1024)
{
sides++;
panel.Sides = sides;
Update();
}
}
[BeginAction("decreasesubdivlevel")]
protected void DecreaseSubdivLevel()
{
if (sides > 2)
{
sides--;
panel.Sides = sides;
Update();
}
}
#endregion
}
}

View file

@ -34,7 +34,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
[EditMode(DisplayName = "Insert Things Radially Mode",
SwitchAction = "insertthingsradiallymode",
ButtonImage = "InsertThingsRadiallyMode.png",
ButtonOrder = int.MinValue + 6,
ButtonOrder = int.MinValue + 7,
ButtonGroup = "000_drawing",
AllowCopyPaste = false,
Volatile = true,

View file

@ -405,7 +405,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
General.Interface.AddButton(BuilderPlug.Me.MenusForm.MarqueSelectTouching); //mxd
General.Interface.AddButton(BuilderPlug.Me.MenusForm.SyncronizeThingEditButton); //mxd
if(General.Map.UDMF) General.Interface.AddButton(BuilderPlug.Me.MenusForm.TextureOffsetLock, ToolbarSection.Geometry); //mxd
General.Interface.AddButton(BuilderPlug.Me.MenusForm.PlaceThings); //JBR
General.Interface.AddButton(BuilderPlug.Me.MenusForm.PerpendicularVertex); //JBR
General.Interface.AddButton(BuilderPlug.Me.MenusForm.PerpendicularLinedef); //JBR
General.Interface.AddButton(BuilderPlug.Me.MenusForm.ParallelLinedef); //JBR
//mxd. Update the tooltip
BuilderPlug.Me.MenusForm.SyncronizeThingEditButton.ToolTipText = "Synchronized Things Editing" + Environment.NewLine + BuilderPlug.Me.MenusForm.SyncronizeThingEditLinedefsItem.ToolTipText;
@ -434,8 +439,13 @@ namespace CodeImp.DoomBuilder.BuilderModes
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.SyncronizeThingEditButton); //mxd
if(General.Map.UDMF) General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.TextureOffsetLock); //mxd
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PlaceThings); //JBR
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PerpendicularVertex); //JBR
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PerpendicularLinedef); //JBR
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.ParallelLinedef); //JBR
// Going to EditSelectionMode?
if(General.Editing.NewMode is EditSelectionMode)
if (General.Editing.NewMode is EditSelectionMode)
{
// Not pasting anything?
EditSelectionMode editmode = (General.Editing.NewMode as EditSelectionMode);
@ -1847,6 +1857,81 @@ namespace CodeImp.DoomBuilder.BuilderModes
General.Interface.DisplayStatus(StatusType.Action, "Added 'lightfog' flag to " + addedcout + " sidedefs, removed it from " + removedcount + " sidedefs.");
}
//JBR Perpendicular Vertex
[BeginAction("perpendicularvertex")]
public void PerpendicularVertex()
{
ICollection<Linedef> selected = General.Map.Map.GetSelectedLinedefs(true);
// Nothing selected?
if (selected.Count == 0)
{
// Anything highlighted?
if (highlighted != null)
{
// Select the highlighted item
highlighted.Selected = true;
selected.Add(highlighted);
}
}
// Anything selected?
if (selected.Count > 0)
General.Editing.ChangeMode(new PerpendicularVertexMode(new LinedefsMode()));
else
General.Interface.DisplayStatus(StatusType.Warning, "This action requires a selection!");
}
//JBR Perpendicular Linedef
[BeginAction("perpendicularlinedef")]
public void PerpendicularLinedef()
{
ICollection<Linedef> selected = General.Map.Map.GetSelectedLinedefs(true);
// Nothing selected?
if (selected.Count == 0)
{
// Anything highlighted?
if (highlighted != null)
{
// Select the highlighted item
highlighted.Selected = true;
selected.Add(highlighted);
}
}
// Anything selected?
if (selected.Count > 0)
General.Editing.ChangeMode(new PerpendicularLinedefMode(new LinedefsMode()));
else
General.Interface.DisplayStatus(StatusType.Warning, "This action requires a selection!");
}
//JBR Parallel Linedef
[BeginAction("parallellinedef")]
public void ParallelLinedef()
{
ICollection<Linedef> selected = General.Map.Map.GetSelectedLinedefs(true);
// Nothing selected?
if (selected.Count == 0)
{
// Anything highlighted?
if (highlighted != null)
{
// Select the highlighted item
highlighted.Selected = true;
selected.Add(highlighted);
}
}
// Anything selected?
if (selected.Count > 0)
General.Editing.ChangeMode(new ParallelLinedefMode(new LinedefsMode()));
else
General.Interface.DisplayStatus(StatusType.Warning, "This action requires a selection!");
}
#endregion
}
}

View file

@ -361,7 +361,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Select pressed in this mode
selectpressed = true;
editside = nearestside;
base.OnEditBegin();
base.OnSelectBegin(); //JBR Was base.OnEditBegin();, maybe a mistake?
}
// Done selecting

View file

@ -0,0 +1,449 @@
#region ================== Namespaces
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Map;
using CodeImp.DoomBuilder.Rendering;
using CodeImp.DoomBuilder.Geometry;
using CodeImp.DoomBuilder.Editing;
using CodeImp.DoomBuilder.Windows;
using System.Drawing;
#endregion
//JBR Parallel Linedef mode
namespace CodeImp.DoomBuilder.BuilderModes
{
[EditMode(DisplayName = "Parallel Linedef",
AllowCopyPaste = false,
Volatile = true)]
public sealed class ParallelLinedefMode : BaseClassicMode
{
#region ================== Constants
private const float LINE_THICKNESS = 0.6f;
private const int LINKED_LINEDEFS = 0;
private const int UNLINKED_LINEDEFS = 1;
private const int LINEDEFS = 1;
private const int VERTICES = 2;
private const int THINGS = 3;
#endregion
#region ================== Variables
private EditMode basemode;
private ICollection<Linedef> selected;
private TracksTracer trackstracer;
private bool clearlinedefs;
#endregion
#region ================== Properties
// Just keep the base mode button checked
public override string EditModeButtonName { get { return General.Editing.PreviousStableMode.Name; } }
#endregion
#region ================== Constructor / Disposer
// Constructor
public ParallelLinedefMode(EditMode basemode)
{
this.basemode = basemode;
}
// Disposer
public override void Dispose()
{
// Not already disposed?
if (!isdisposed)
{
// Clean up
// Done
base.Dispose();
}
}
#endregion
#region ================== Methods
public List<Linedef> GetSelectedLinedefFromVertex(Vertex v)
{
List<Linedef> list = new List<Linedef>();
foreach (Linedef ld in v.Linedefs)
{
if (ld.Selected) list.Add(ld);
}
return list;
}
#endregion
#region ================== Events
public override void OnHelp()
{
General.ShowHelp("e_parallellinedef.html");
}
// Cancelled
public override void OnCancel()
{
// Cancel base class
base.OnCancel();
// Clear selection that is not the current mode
if (clearlinedefs) General.Map.Map.ClearSelectedLinedefs();
// Return to base mode
General.Editing.ChangeMode(General.Editing.PreviousStableMode.Name);
}
// Mode engages
public override void OnEngage()
{
base.OnEngage();
renderer.SetPresentation(Presentation.Standard);
// Make collections by selection
if (basemode is VerticesMode)
{
selected = new List<Linedef>();
ICollection<Vertex> selectedvertices = General.Map.Map.GetSelectedVertices(true);
foreach (Vertex v in selectedvertices)
{
foreach (Linedef ld in v.Linedefs)
{
if (ld.Start.Selected && ld.End.Selected)
{
ld.Selected = true;
if (!selected.Contains(ld)) selected.Add(ld);
}
}
}
clearlinedefs = true;
}
if (basemode is LinedefsMode)
{
selected = General.Map.Map.GetSelectedLinedefs(true);
}
if (basemode is SectorsMode)
{
selected = new List<Linedef>();
ICollection<Sector> selectedsectors = General.Map.Map.GetSelectedSectors(true);
foreach (Sector sc in selectedsectors)
{
foreach (Sidedef sd in sc.Sidedefs)
{
sd.Line.Selected = true;
if (!selected.Contains(sd.Line)) selected.Add(sd.Line);
}
}
clearlinedefs = true;
}
// Create the tracks tracer
trackstracer = new TracksTracer(selected);
// Check if tracing was valid
if (!trackstracer.IsValid)
{
DialogResult dr = MessageBox.Show("Detected intersections while tracing!\nMake sure you're selecting vertices with maximum of 2 linedefs connected to them.\nResults may not be desirable, continue anyway?", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
if (dr != DialogResult.Yes)
{
OnCancel();
return;
}
}
BuilderPlug.Me.ParallelLinedefForm.SetNumOpenPaths(trackstracer.OpenPaths.Count);
BuilderPlug.Me.ParallelLinedefForm.SetNumClosePaths(trackstracer.ClosePaths.Count);
// Show toolbox window
BuilderPlug.Me.ParallelLinedefForm.Show((Form)General.Interface);
}
// Disenagaging
public override void OnDisengage()
{
base.OnDisengage();
// Hide toolbox window
BuilderPlug.Me.ParallelLinedefForm.Hide();
}
// This applies the curves and returns to the base mode
public override void OnAccept()
{
// Create undo
General.Map.UndoRedo.CreateUndo("Parallel (Linedef)");
int createas = BuilderPlug.Me.ParallelLinedefForm.CreateAs;
float distance = BuilderPlug.Me.ParallelLinedefForm.Distance;
bool closeopenpath = BuilderPlug.Me.ParallelLinedefForm.CloseOpenPath;
bool backwards = BuilderPlug.Me.ParallelLinedefForm.Backwards;
ThingBrowser2Form.Result thingresult = new ThingBrowser2Form.Result();
// Ask for thing type...
if (createas == THINGS)
{
BuilderPlug.Me.ParallelLinedefForm.Hide();
// Pick the thing to add...
thingresult = ThingBrowser2Form.BrowseThing(BuilderPlug.Me.ParallelLinedefForm);
if (!thingresult.OK)
{
General.Map.UndoRedo.WithdrawUndo();
General.Map.UndoRedo.WithdrawUndo();
General.Interface.DisplayStatus(StatusType.Warning, "Operation aborted.");
return;
}
BuilderPlug.Me.ParallelLinedefForm.Show();
BuilderPlug.Me.ParallelLinedefForm.Activate();
}
// Go for all selected lines
foreach (List<Vector2D> path in trackstracer.OpenPaths)
{
List<Vector2D> parallelpath = TracksTracer.ParallelizeOpenPath(path, distance, backwards);
if (createas == LINKED_LINEDEFS)
{
List<DrawnVertex> dvl = new List<DrawnVertex>();
if (closeopenpath) TracksTracer.AddPointToDrawnVertex(dvl, path[0], true, true);
TracksTracer.AddPathToDrawnVertex(dvl, parallelpath, true, true);
if (closeopenpath) TracksTracer.AddPointToDrawnVertex(dvl, path[path.Count - 1], true, true);
if (!Tools.DrawLines(dvl, true, BuilderPlug.Me.AutoAlignTextureOffsetsOnCreate))
{
// Drawing failed
// NOTE: I have to call this twice, because the first time only cancels this volatile mode
General.Map.UndoRedo.WithdrawUndo();
General.Map.UndoRedo.WithdrawUndo();
return;
}
}
else if (createas == UNLINKED_LINEDEFS)
{
// Unlinked linedef
Vertex oldv = General.Map.Map.CreateVertex(parallelpath[0]);
for (int i = 1; i < parallelpath.Count; i++)
{
Vertex newv = General.Map.Map.CreateVertex(parallelpath[i]);
General.Map.Map.CreateLinedef(oldv, newv);
oldv = newv;
}
if (closeopenpath)
{
Vertex vtf = General.Map.Map.CreateVertex(path[0]);
Vertex vtl = General.Map.Map.CreateVertex(path[path.Count - 1]);
Vertex vpf = General.Map.Map.CreateVertex(parallelpath[0]);
Vertex vpl = General.Map.Map.CreateVertex(parallelpath[parallelpath.Count - 1]);
General.Map.Map.CreateLinedef(vtf, vpf);
General.Map.Map.CreateLinedef(vpl, vtl);
}
}
else if (createas == VERTICES)
{
// Vertex
foreach (Vector2D pos in parallelpath)
{
General.Map.Map.CreateVertex(pos);
}
}
else if (createas == THINGS)
{
foreach (Vector2D pos in parallelpath)
{
Thing tp = General.Map.Map.CreateThing();
if (tp != null)
{
General.Settings.ApplyDefaultThingSettings(tp);
thingresult.Apply(tp);
tp.Move(pos);
tp.UpdateConfiguration();
}
}
}
}
foreach (List<Vector2D> path in trackstracer.ClosePaths)
{
List<Vector2D> parallelpath = TracksTracer.ParallelizeClosePath(path, distance, backwards);
if (createas == LINKED_LINEDEFS)
{
List<DrawnVertex> dvl = new List<DrawnVertex>();
TracksTracer.AddPathToDrawnVertex(dvl, parallelpath, true, true);
if (!Tools.DrawLines(dvl, true, BuilderPlug.Me.AutoAlignTextureOffsetsOnCreate))
{
// Drawing failed
// NOTE: I have to call this twice, because the first time only cancels this volatile mode
General.Map.UndoRedo.WithdrawUndo();
General.Map.UndoRedo.WithdrawUndo();
return;
}
}
else if (createas == UNLINKED_LINEDEFS)
{
// Unlinked linedef
Vertex oldv = General.Map.Map.CreateVertex(parallelpath[0]);
for (int i = 1; i < parallelpath.Count; i++)
{
Vertex newv = General.Map.Map.CreateVertex(parallelpath[i]);
General.Map.Map.CreateLinedef(oldv, newv);
oldv = newv;
}
}
else if (createas == VERTICES)
{
// Vertex
for (int i = 0; i < parallelpath.Count - 1; i++)
{
General.Map.Map.CreateVertex(parallelpath[i]);
}
}
else if (createas == THINGS)
{
// Thing
for (int i = 0; i < parallelpath.Count - 1; i++)
{
Thing tp = General.Map.Map.CreateThing();
if (tp != null)
{
General.Settings.ApplyDefaultThingSettings(tp);
thingresult.Apply(tp);
tp.Move(parallelpath[i]);
tp.UpdateConfiguration();
}
}
}
}
// Announce how many we created
int num = trackstracer.OpenPaths.Count + trackstracer.ClosePaths.Count;
if (num == 0)
{
General.Interface.DisplayStatus(StatusType.Warning, "No parallel tracks created.");
General.Map.UndoRedo.WithdrawUndo();
General.Map.UndoRedo.WithdrawUndo();
return;
}
if (num > 1)
General.Interface.DisplayStatus(StatusType.Action, "Created " + num.ToString() + " parallel tracks.");
else
General.Interface.DisplayStatus(StatusType.Action, "Created a parallel track.");
if (createas == THINGS)
{
//Update Things filter
General.Map.ThingsFilter.Update();
}
// Snap to map format accuracy
General.Map.Map.SnapAllToAccuracy();
// Clear selection
General.Map.Map.ClearAllSelected();
// Update cached values
General.Map.Map.Update();
// Edit new sectors?
List<Sector> newsectors = General.Map.Map.GetMarkedSectors(true);
if (BuilderPlug.Me.EditNewSector && (newsectors.Count > 0))
General.Interface.ShowEditSectors(newsectors);
// Update the used textures
General.Map.Data.UpdateUsedTextures();
//mxd
General.Map.Renderer2D.UpdateExtraFloorFlag();
// Map is changed
General.Map.IsChanged = true;
// Return to base mode
General.Editing.ChangeMode(General.Editing.PreviousStableMode.Name);
}
// Redrawing display
public override void OnRedrawDisplay()
{
renderer.RedrawSurface();
float vsize = (renderer.VertexSize + 1.0f) / renderer.Scale;
// Render lines
if (renderer.StartPlotter(true))
{
renderer.PlotLinedefSet(General.Map.Map.Linedefs);
renderer.PlotVerticesSet(General.Map.Map.Vertices);
renderer.Finish();
}
// Render things
if (renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA);
renderer.RenderNiGHTSPath();
renderer.Finish();
}
int createas = BuilderPlug.Me.ParallelLinedefForm.CreateAs;
float distance = BuilderPlug.Me.ParallelLinedefForm.Distance;
bool closeopenpath = BuilderPlug.Me.ParallelLinedefForm.CloseOpenPath;
bool backwards = BuilderPlug.Me.ParallelLinedefForm.Backwards;
// Render overlay
bool renderlines = (createas <= LINEDEFS);
if (renderer.StartOverlay(true))
{
foreach (List<Vector2D> path in trackstracer.OpenPaths)
{
// Selected path in info color
for (int i = 1; i < path.Count; i++)
renderer.RenderLine(path[i - 1], path[i], LINE_THICKNESS, General.Colors.InfoLine, true);
renderer.RenderRectangleFilled(new RectangleF(path[0].x - vsize, path[0].y - vsize, vsize * 2.0f, vsize * 2.0f), General.Colors.InfoLine, true);
renderer.RenderRectangleFilled(new RectangleF(path[path.Count - 1].x - vsize, path[path.Count - 1].y - vsize, vsize * 2.0f, vsize * 2.0f), General.Colors.InfoLine, true);
// Parallel path
List<Vector2D> parallelpath = TracksTracer.ParallelizeOpenPath(path, distance, backwards);
renderer.RenderRectangleFilled(new RectangleF(parallelpath[0].x - vsize, parallelpath[0].y - vsize, vsize * 2.0f, vsize * 2.0f), General.Colors.Highlight, true);
for (int i = 1; i < parallelpath.Count; i++)
{
if (renderlines) renderer.RenderLine(parallelpath[i - 1], parallelpath[i], LINE_THICKNESS, General.Colors.Highlight, true);
renderer.RenderRectangleFilled(new RectangleF(parallelpath[i].x - vsize, parallelpath[i].y - vsize, vsize * 2.0f, vsize * 2.0f), General.Colors.Highlight, true);
}
if (closeopenpath && renderlines)
{
renderer.RenderLine(path[0], parallelpath[0], LINE_THICKNESS, General.Colors.Highlight, true);
renderer.RenderLine(path[path.Count - 1], parallelpath[parallelpath.Count - 1], LINE_THICKNESS, General.Colors.Highlight, true);
}
}
foreach (List<Vector2D> path in trackstracer.ClosePaths)
{
// Selected path in info color
for (int i = 1; i < path.Count; i++)
renderer.RenderLine(path[i - 1], path[i], LINE_THICKNESS, General.Colors.InfoLine, true);
renderer.RenderRectangleFilled(new RectangleF(path[0].x - vsize, path[0].y - vsize, vsize * 2.0f, vsize * 2.0f), General.Colors.InfoLine, true);
renderer.RenderRectangleFilled(new RectangleF(path[path.Count - 1].x - vsize, path[path.Count - 1].y - vsize, vsize * 2.0f, vsize * 2.0f), General.Colors.InfoLine, true);
// Parallel path
List<Vector2D> parallelpath = TracksTracer.ParallelizeClosePath(path, distance, backwards);
renderer.RenderRectangleFilled(new RectangleF(parallelpath[0].x - vsize, parallelpath[0].y - vsize, vsize * 2.0f, vsize * 2.0f), General.Colors.Highlight, true);
for (int i = 1; i < parallelpath.Count; i++)
{
if (renderlines) renderer.RenderLine(parallelpath[i - 1], parallelpath[i], LINE_THICKNESS, General.Colors.Highlight, true);
renderer.RenderRectangleFilled(new RectangleF(parallelpath[i].x - vsize, parallelpath[i].y - vsize, vsize * 2.0f, vsize * 2.0f), General.Colors.Highlight, true);
}
}
renderer.Finish();
}
renderer.Present();
}
#endregion
}
}

View file

@ -0,0 +1,402 @@
#region ================== Namespaces
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Map;
using CodeImp.DoomBuilder.Rendering;
using CodeImp.DoomBuilder.Geometry;
using CodeImp.DoomBuilder.Editing;
using System.Drawing;
using CodeImp.DoomBuilder.Windows;
#endregion
//JBR Perpendicular Linedef mode
namespace CodeImp.DoomBuilder.BuilderModes
{
[EditMode(DisplayName = "Perpendicular Linedef",
AllowCopyPaste = false,
Volatile = true)]
public sealed class PerpendicularLinedefMode : BaseClassicMode
{
#region ================== Constants
private const float LINE_THICKNESS = 0.6f;
private const int LINKED_LINEDEFS = 0;
private const int UNLINKED_LINEDEFS = 1;
private const int LINEDEFS = 1;
private const int VERTICES_PERPENDICULAR = 2;
private const int VERTICES_BOTH = 3;
private const int THINGS = 4;
#endregion
#region ================== Variables
private EditMode basemode;
private ICollection<Linedef> selected;
private bool clearlinedefs;
#endregion
#region ================== Properties
// Just keep the base mode button checked
public override string EditModeButtonName { get { return General.Editing.PreviousStableMode.Name; } }
#endregion
#region ================== Constructor / Disposer
// Constructor
public PerpendicularLinedefMode(EditMode basemode)
{
this.basemode = basemode;
}
// Disposer
public override void Dispose()
{
// Not already disposed?
if (!isdisposed)
{
// Clean up
// Done
base.Dispose();
}
}
#endregion
#region ================== Methods
/// Join into a near vertex on map
private Vector2D JoinIntoNearMapVertex(Vector2D pos, float epsilon)
{
foreach (Vertex va in General.Map.Map.Vertices)
{
if (va.IsDisposed) continue;
if (pos.CloseTo(va.Position, epsilon))
{
return va.Position;
}
}
return pos;
}
// Join into a near vertex on map
private bool JoinIntoNearMapVertex(Vertex v, float epsilon)
{
foreach (Vertex va in General.Map.Map.Vertices)
{
if (va == v || va.IsDisposed) continue;
if (v.Position.CloseTo(va.Position, epsilon))
{
v.Join(va);
return true;
}
}
return false;
}
#endregion
#region ================== Events
public override void OnHelp()
{
General.ShowHelp("e_perpendicularlinedef.html");
}
// Cancelled
public override void OnCancel()
{
// Cancel base class
base.OnCancel();
// Clear selection that is not the current mode
if (clearlinedefs) General.Map.Map.ClearSelectedLinedefs();
// Return to base mode
General.Editing.ChangeMode(General.Editing.PreviousStableMode.Name);
}
// Mode engages
public override void OnEngage()
{
base.OnEngage();
renderer.SetPresentation(Presentation.Standard);
// Make collections by selection
if (basemode is VerticesMode)
{
selected = new List<Linedef>();
ICollection<Vertex> selectedvertices = General.Map.Map.GetSelectedVertices(true);
foreach (Vertex v in selectedvertices)
{
foreach (Linedef ld in v.Linedefs)
{
if (ld.Start.Selected && ld.End.Selected)
{
ld.Selected = true;
if (!selected.Contains(ld)) selected.Add(ld);
}
}
}
clearlinedefs = true;
}
if (basemode is LinedefsMode)
{
selected = General.Map.Map.GetSelectedLinedefs(true);
}
if (basemode is SectorsMode)
{
selected = new List<Linedef>();
ICollection<Sector> selectedsectors = General.Map.Map.GetSelectedSectors(true);
foreach (Sector sc in selectedsectors)
{
foreach (Sidedef sd in sc.Sidedefs)
{
sd.Line.Selected = true;
if (!selected.Contains(sd.Line)) selected.Add(sd.Line);
}
}
clearlinedefs = true;
}
// Show toolbox window
BuilderPlug.Me.PerpendicularLinedefForm.Show((Form)General.Interface);
}
// Disenagaging
public override void OnDisengage()
{
base.OnDisengage();
// Hide toolbox window
BuilderPlug.Me.PerpendicularLinedefForm.Hide();
}
// This applies the curves and returns to the base mode
public override void OnAccept()
{
// Create undo
General.Map.UndoRedo.CreateUndo("Perpendicular (Linedef)");
int createas = BuilderPlug.Me.PerpendicularLinedefForm.CreateAs;
float distance = BuilderPlug.Me.PerpendicularLinedefForm.Distance;
float offset = BuilderPlug.Me.PerpendicularLinedefForm.OffsetPerc / 100.0f;
bool backwards = BuilderPlug.Me.PerpendicularLinedefForm.Backwards;
ThingBrowser2Form.Result thingresult = new ThingBrowser2Form.Result();
float snapmp = BuilderPlug.Me.PerpendicularVertexForm.SnapMP;
// Ask for thing type...
if (createas == THINGS)
{
BuilderPlug.Me.PerpendicularLinedefForm.Hide();
// Pick the thing to add...
thingresult = ThingBrowser2Form.BrowseThing(BuilderPlug.Me.PerpendicularVertexForm);
if (!thingresult.OK)
{
General.Map.UndoRedo.WithdrawUndo();
General.Map.UndoRedo.WithdrawUndo();
General.Interface.DisplayStatus(StatusType.Warning, "Operation aborted.");
return;
}
BuilderPlug.Me.PerpendicularLinedefForm.Show();
BuilderPlug.Me.PerpendicularLinedefForm.Activate();
}
// Go for all selected lines
int numcreated = 0;
foreach (Linedef ld in selected)
{
Vector2D centerpos = ld.Start.Position.LinearInto(ld.End.Position, offset);
Vector2D deltapos = ld.Start.Position - ld.End.Position;
if (backwards) deltapos = -deltapos;
Vector2D normalunit = deltapos.GetPerpendicular().GetNormal();
Vector2D perppos = centerpos + normalunit * distance;
// Check if is near some other vertex on map
//perppos = JoinIntoNearVertex(perppos, 0.1f);
numcreated++;
if (createas == LINKED_LINEDEFS)
{
// Linked linedef between 2 vertices
List<DrawnVertex> dvl = new List<DrawnVertex>();
DrawnVertex dv = new DrawnVertex(); // struct
dv.pos = centerpos;
dv.stitch = true;
dv.stitchline = true;
dvl.Add(dv);
dv.pos = perppos;
dvl.Add(dv);
if (!Tools.DrawLines(dvl, true, BuilderPlug.Me.AutoAlignTextureOffsetsOnCreate))
{
// Drawing failed
// NOTE: I have to call this twice, because the first time only cancels this volatile mode
General.Map.UndoRedo.WithdrawUndo();
General.Map.UndoRedo.WithdrawUndo();
return;
}
if (snapmp > 0f)
{
// Manually join with vertices already on map since DrawLines fail to do so...
List<Vertex> marked = General.Map.Map.GetMarkedVertices(true);
foreach (Vertex vm in marked)
JoinIntoNearMapVertex(vm, snapmp);
}
}
else if (createas == UNLINKED_LINEDEFS)
{
// Unlinked linedef
Vertex perpv = General.Map.Map.CreateVertex(perppos);
Vertex centerv = General.Map.Map.CreateVertex(centerpos);
General.Map.Map.CreateLinedef(centerv, perpv);
}
else if (createas == VERTICES_PERPENDICULAR)
{
// Vertex
Vertex perpv = General.Map.Map.CreateVertex(perppos);
if (snapmp > 0f)
JoinIntoNearMapVertex(perpv, snapmp);
}
else if (createas == VERTICES_BOTH)
{
Vertex perpv = General.Map.Map.CreateVertex(perppos);
if (snapmp > 0f)
JoinIntoNearMapVertex(perpv, snapmp);
if (offset > 0f && offset < 1f)
{
// Split linedef
Vertex centerv = General.Map.Map.CreateVertex(centerpos);
ld.Split(centerv);
}
}
else if (createas == THINGS)
{
Thing tp = General.Map.Map.CreateThing();
if (tp != null)
{
// Check if is near some other vertex on map
if (snapmp > 0f)
perppos = JoinIntoNearMapVertex(perppos, snapmp);
General.Settings.ApplyDefaultThingSettings(tp);
thingresult.Apply(tp);
tp.Move(perppos);
tp.UpdateConfiguration();
}
}
}
if (numcreated == 0)
{
// If nothing created then abort
General.Map.UndoRedo.WithdrawUndo();
General.Map.UndoRedo.WithdrawUndo();
General.Interface.DisplayStatus(StatusType.Warning, "No perpendiculars created.");
return;
}
// Announce how many we created
General.Interface.DisplayStatus(StatusType.Action, "Created " + numcreated.ToString() + " perpendicular(s).");
if (createas == THINGS)
{
//Update Things filter
General.Map.ThingsFilter.Update();
}
// Snap to map format accuracy
General.Map.Map.SnapAllToAccuracy();
// Clear selection
General.Map.Map.ClearAllSelected();
// Update cached values
General.Map.Map.Update();
// Edit new sectors?
List<Sector> newsectors = General.Map.Map.GetMarkedSectors(true);
if (BuilderPlug.Me.EditNewSector && (newsectors.Count > 0))
General.Interface.ShowEditSectors(newsectors);
// Update the used textures
General.Map.Data.UpdateUsedTextures();
//mxd
General.Map.Renderer2D.UpdateExtraFloorFlag();
// Map is changed
General.Map.IsChanged = true;
// Return to base mode
General.Editing.ChangeMode(General.Editing.PreviousStableMode.Name);
}
// Redrawing display
public override void OnRedrawDisplay()
{
renderer.RedrawSurface();
float vsize = (renderer.VertexSize + 1.0f) / renderer.Scale;
// Render lines
if (renderer.StartPlotter(true))
{
renderer.PlotLinedefSet(General.Map.Map.Linedefs);
renderer.PlotVerticesSet(General.Map.Map.Vertices);
renderer.Finish();
}
// Render things
if (renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA);
renderer.RenderNiGHTSPath();
renderer.Finish();
}
int createas = BuilderPlug.Me.PerpendicularLinedefForm.CreateAs;
float distance = BuilderPlug.Me.PerpendicularLinedefForm.Distance;
float offset = BuilderPlug.Me.PerpendicularLinedefForm.OffsetPerc / 100.0f;
bool backwards = BuilderPlug.Me.PerpendicularLinedefForm.Backwards;
// Render overlay
if (renderer.StartOverlay(true))
{
// Go for all selected lines
foreach (Linedef ld in selected)
{
Vector2D centerpos = ld.Start.Position.LinearInto(ld.End.Position, offset);
Vector2D deltapos = ld.Start.Position - ld.End.Position;
if (backwards) deltapos = -deltapos;
Vector2D normalunit = deltapos.GetPerpendicular().GetNormal();
Vector2D perppos = centerpos + normalunit * distance;
if (createas <= LINEDEFS)
{
renderer.RenderLine(centerpos, perppos, LINE_THICKNESS, General.Colors.Highlight, true);
}
else
{
renderer.RenderRectangleFilled(new RectangleF(perppos.x - vsize, perppos.y - vsize, vsize * 2.0f, vsize * 2.0f), General.Colors.Highlight, true);
}
if (createas == LINKED_LINEDEFS || createas == VERTICES_BOTH)
{
renderer.RenderRectangleFilled(new RectangleF(centerpos.x - vsize, centerpos.y - vsize, vsize * 2.0f, vsize * 2.0f), General.Colors.Highlight, true);
}
}
renderer.Finish();
}
renderer.Present();
}
#endregion
}
}

View file

@ -0,0 +1,503 @@
#region ================== Namespaces
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Map;
using CodeImp.DoomBuilder.Rendering;
using CodeImp.DoomBuilder.Geometry;
using CodeImp.DoomBuilder.Editing;
using CodeImp.DoomBuilder.Windows;
using System.Drawing;
#endregion
//JBR Perpendicular Vertex mode
namespace CodeImp.DoomBuilder.BuilderModes
{
[EditMode(DisplayName = "Perpendicular Vertex",
AllowCopyPaste = false,
Volatile = true)]
public sealed class PerpendicularVertexMode : BaseClassicMode
{
#region ================== Constants
private const float LINE_THICKNESS = 0.6f;
private const int LINKED_LINEDEFS = 0;
private const int UNLINKED_LINEDEFS = 1;
private const int LINEDEFS = 1;
private const int VERTICES = 2;
private const int THINGS = 3;
#endregion
#region ================== Variables
private EditMode basemode;
private bool clearvertices;
private bool clearlinedefs;
// Collections
private ICollection<Vertex> selected;
#endregion
#region ================== Properties
// Just keep the base mode button checked
public override string EditModeButtonName { get { return General.Editing.PreviousStableMode.Name; } }
#endregion
#region ================== Constructor / Disposer
// Constructor
public PerpendicularVertexMode(EditMode basemode)
{
this.basemode = basemode;
}
// Disposer
public override void Dispose()
{
// Not already disposed?
if (!isdisposed)
{
// Clean up
// Done
base.Dispose();
}
}
#endregion
#region ================== Methods
/// Join into a near vertex on map
private Vector2D JoinIntoNearMapVertex(Vector2D pos, float epsilon)
{
foreach (Vertex va in General.Map.Map.Vertices)
{
if (va.IsDisposed) continue;
if (pos.CloseTo(va.Position, epsilon))
{
return va.Position;
}
}
return pos;
}
// Join into a near vertex on map
private bool JoinIntoNearMapVertex(Vertex v, float epsilon)
{
foreach (Vertex va in General.Map.Map.Vertices)
{
if (va == v || va.IsDisposed) continue;
if (v.Position.CloseTo(va.Position, epsilon))
{
v.Join(va);
return true;
}
}
return false;
}
#endregion
#region ================== Events
public override void OnHelp()
{
General.ShowHelp("e_perpendicularvertex.html");
}
// Cancelled
public override void OnCancel()
{
// Cancel base class
base.OnCancel();
// Clear selection that is not the current mode
if (clearlinedefs) General.Map.Map.ClearSelectedLinedefs();
if (clearvertices) General.Map.Map.ClearSelectedVertices();
// Return to base mode
General.Editing.ChangeMode(General.Editing.PreviousStableMode.Name);
}
// Mode engages
public override void OnEngage()
{
base.OnEngage();
renderer.SetPresentation(Presentation.Standard);
// Make collections by selection
if (basemode is VerticesMode)
{
selected = General.Map.Map.GetSelectedVertices(true);
foreach (Vertex v in selected)
{
foreach (Linedef ld in v.Linedefs)
{
if (ld.Start.Selected && ld.End.Selected) ld.Selected = true;
}
}
clearvertices = false;
clearlinedefs = true;
}
if (basemode is LinedefsMode)
{
selected = new List<Vertex>();
ICollection<Linedef> selectedlines = General.Map.Map.GetSelectedLinedefs(true);
foreach (Linedef ld in selectedlines)
{
ld.Start.Selected = true;
ld.End.Selected = true;
if (!selected.Contains(ld.Start)) selected.Add(ld.Start);
if (!selected.Contains(ld.End)) selected.Add(ld.End);
}
clearvertices = true;
clearlinedefs = false;
}
if (basemode is SectorsMode)
{
selected = new List<Vertex>();
ICollection<Sector> selectedsectors = General.Map.Map.GetSelectedSectors(true);
foreach (Sector sc in selectedsectors)
{
foreach (Sidedef sd in sc.Sidedefs)
{
sd.Line.Start.Selected = true;
sd.Line.End.Selected = true;
if (!selected.Contains(sd.Line.Start)) selected.Add(sd.Line.Start);
if (!selected.Contains(sd.Line.End)) selected.Add(sd.Line.End);
sd.Line.Selected = true;
}
}
clearvertices = true;
clearlinedefs = true;
}
// Show toolbox window
BuilderPlug.Me.PerpendicularVertexForm.Show((Form)General.Interface);
}
// Disenagaging
public override void OnDisengage()
{
base.OnDisengage();
// Hide toolbox window
BuilderPlug.Me.PerpendicularVertexForm.Hide();
}
// This applies the curves and returns to the base mode
public override void OnAccept()
{
// Create undo
General.Map.UndoRedo.CreateUndo("Perpendicular (Vertex)");
int createas = BuilderPlug.Me.PerpendicularVertexForm.CreateAs;
float distance = BuilderPlug.Me.PerpendicularVertexForm.Distance;
bool processtips = BuilderPlug.Me.PerpendicularVertexForm.ProcessTips;
bool backwards = BuilderPlug.Me.PerpendicularVertexForm.Backwards;
ThingBrowser2Form.Result thingresult = new ThingBrowser2Form.Result();
float snapmp = BuilderPlug.Me.PerpendicularVertexForm.SnapMP;
// Ask for thing type...
if (createas == THINGS)
{
BuilderPlug.Me.PerpendicularVertexForm.Hide();
// Pick the thing to add...
thingresult = ThingBrowser2Form.BrowseThing(BuilderPlug.Me.PerpendicularVertexForm);
if (!thingresult.OK)
{
General.Map.UndoRedo.WithdrawUndo();
General.Map.UndoRedo.WithdrawUndo();
General.Interface.DisplayStatus(StatusType.Warning, "Operation aborted.");
return;
}
/*
ThingBrowserForm f = new ThingBrowserForm(thingtype);
if (f.ShowDialog(BuilderPlug.Me.PerpendicularVertexForm) != DialogResult.OK)
{
f.Dispose();
General.Map.UndoRedo.WithdrawUndo();
General.Map.UndoRedo.WithdrawUndo();
General.Interface.DisplayStatus(StatusType.Warning, "Operation aborted.");
return;
}
thingtype = f.SelectedType;
f.Dispose();
*/
BuilderPlug.Me.PerpendicularVertexForm.Show();
BuilderPlug.Me.PerpendicularVertexForm.Activate();
}
// Go for all selected lines
int numcreated = 0;
foreach (Vertex v in selected)
{
Vector2D centerpos = v.Position;
Vector2D deltapos;
// List selected linedefs that belong to the vertex
List<Linedef> linedefs = new List<Linedef>();
foreach (Linedef ld in v.Linedefs)
{
if (ld.Selected && !linedefs.Contains(ld)) linedefs.Add(ld);
}
if (processtips && linedefs.Count == 1) // If the vertex only has 1 linedef attached, find the other end and create a perpendicular with it
{
Linedef ld1 = linedefs[0];
Vertex v1 = (ld1.Start == v) ? ld1.End : ld1.Start;
Vertex v2 = v;
if (ld1.Start == v)
{
// Flip vertex
Vertex tmp = v1;
v1 = v2;
v2 = tmp;
}
deltapos = (v1.Position - centerpos).GetNormal() - (v2.Position - centerpos).GetNormal();
}
else if (linedefs.Count == 2) // If the vertex only has 2 linedefs attached, find both opposite ends then create a perpendicular with them
{
Linedef ld1 = linedefs[0];
Linedef ld2 = linedefs[1];
Vertex v1 = (ld1.Start == v) ? ld1.End : ld1.Start;
Vertex v2 = (ld2.Start == v) ? ld2.End : ld2.Start;
if (ld1.Start == v && ld2.End == v)
{
// Flip vertex
Vertex tmp = v1;
v1 = v2;
v2 = tmp;
}
else if (!(ld2.Start == v && ld1.End == v))
{
// Linedefs are facing opposite directions
continue;
}
deltapos = (v1.Position - centerpos).GetNormal() - (v2.Position - centerpos).GetNormal();
}
else // If the vertex has more than 2 linedefs attached then is no good!
{
continue;
}
if (backwards) deltapos = -deltapos;
Vector2D normalunit = deltapos.GetPerpendicular().GetNormal();
Vector2D perppos = centerpos + normalunit * distance;
numcreated++;
if (createas == LINKED_LINEDEFS)
{
// Linked linedef between 2 vertices
List<DrawnVertex> dvl = new List<DrawnVertex>();
DrawnVertex dv = new DrawnVertex(); // struct
dv.pos = centerpos;
dv.stitch = true;
dv.stitchline = true;
dvl.Add(dv);
dv.pos = perppos;
dvl.Add(dv);
if (!Tools.DrawLines(dvl, true, BuilderPlug.Me.AutoAlignTextureOffsetsOnCreate))
{
// Drawing failed
// NOTE: I have to call this twice, because the first time only cancels this volatile mode
General.Map.UndoRedo.WithdrawUndo();
General.Map.UndoRedo.WithdrawUndo();
return;
}
if (snapmp > 0f)
{
// Manually join with vertices already on map since DrawLines fail to do so...
List<Vertex> marked = General.Map.Map.GetMarkedVertices(true);
foreach (Vertex vm in marked)
JoinIntoNearMapVertex(vm, snapmp);
}
}
else if (createas == UNLINKED_LINEDEFS)
{
// Unlinked linedef
Vertex centerv = General.Map.Map.CreateVertex(centerpos);
Vertex perpv = General.Map.Map.CreateVertex(perppos);
General.Map.Map.CreateLinedef(centerv, perpv);
}
else if (createas == VERTICES)
{
// Vertex
Vertex perpv = General.Map.Map.CreateVertex(perppos);
if (snapmp > 0f)
JoinIntoNearMapVertex(perpv, snapmp);
}
else if (createas == THINGS)
{
Thing tp = General.Map.Map.CreateThing();
if (tp != null)
{
// Check if is near some other vertex on map
if (snapmp > 0f)
perppos = JoinIntoNearMapVertex(perppos, snapmp);
General.Settings.ApplyDefaultThingSettings(tp);
//tp.SRB2Type = thingtype;
//tp.Parameter = 0;
thingresult.Apply(tp);
tp.Move(perppos);
tp.UpdateConfiguration();
}
}
}
if (numcreated == 0)
{
// If nothing created then abort
General.Map.UndoRedo.WithdrawUndo();
General.Map.UndoRedo.WithdrawUndo();
General.Interface.DisplayStatus(StatusType.Warning, "No perpendiculars created.");
return;
}
// Announce how many we created
General.Interface.DisplayStatus(StatusType.Action, "Created " + numcreated.ToString() + " perpendicular(s).");
if (createas == THINGS)
{
//Update Things filter
General.Map.ThingsFilter.Update();
}
// Snap to map format accuracy
General.Map.Map.SnapAllToAccuracy();
// Clear selection
General.Map.Map.ClearAllSelected();
// Update cached values
General.Map.Map.Update();
// Edit new sectors?
List<Sector> newsectors = General.Map.Map.GetMarkedSectors(true);
if (BuilderPlug.Me.EditNewSector && (newsectors.Count > 0))
General.Interface.ShowEditSectors(newsectors);
// Update the used textures
General.Map.Data.UpdateUsedTextures();
//mxd
General.Map.Renderer2D.UpdateExtraFloorFlag();
// Map is changed
General.Map.IsChanged = true;
// Return to base mode
General.Editing.ChangeMode(General.Editing.PreviousStableMode.Name);
}
// Redrawing display
public override void OnRedrawDisplay()
{
renderer.RedrawSurface();
float vsize = (renderer.VertexSize + 1.0f) / renderer.Scale;
// Render lines
if (renderer.StartPlotter(true))
{
renderer.PlotLinedefSet(General.Map.Map.Linedefs);
renderer.PlotVerticesSet(General.Map.Map.Vertices);
renderer.Finish();
}
// Render things
if (renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA);
renderer.RenderNiGHTSPath();
renderer.Finish();
}
int createas = BuilderPlug.Me.PerpendicularVertexForm.CreateAs;
float distance = BuilderPlug.Me.PerpendicularVertexForm.Distance;
bool processtips = BuilderPlug.Me.PerpendicularVertexForm.ProcessTips;
bool backwards = BuilderPlug.Me.PerpendicularVertexForm.Backwards;
// Render overlay
if (renderer.StartOverlay(true))
{
// Go for all selected lines
foreach (Vertex v in selected)
{
Vector2D centerpos = v.Position;
Vector2D deltapos;
// List selected linedefs that belong to the vertex
List<Linedef> linedefs = new List<Linedef>();
foreach (Linedef ld in v.Linedefs)
{
if (ld.Selected && !linedefs.Contains(ld)) linedefs.Add(ld);
}
if (processtips && linedefs.Count == 1) // If the vertex only has 1 linedef, find the other end and create a perpendicular with it
{
Linedef ld1 = linedefs[0];
Vertex v1 = (ld1.Start == v) ? ld1.End : ld1.Start;
Vertex v2 = v;
if (ld1.Start == v)
{
// Flip vertex
Vertex tmp = v1;
v1 = v2;
v2 = tmp;
}
deltapos = (v1.Position - centerpos).GetNormal() - (v2.Position - centerpos).GetNormal();
}
else if (linedefs.Count == 2) // If the vertex only has 2 linedefs, find both opposite ends then create a perpendicular with them
{
Linedef ld1 = linedefs[0]; // General.GetByIndex(v.Linedefs, 0);
Linedef ld2 = linedefs[1]; // General.GetByIndex(v.Linedefs, 1);
Vertex v1 = (ld1.Start == v) ? ld1.End : ld1.Start;
Vertex v2 = (ld2.Start == v) ? ld2.End : ld2.Start;
if (ld1.Start == v && ld2.End == v)
{
// Flip vertex
Vertex tmp = v1;
v1 = v2;
v2 = tmp;
}
else if (!(ld2.Start == v && ld1.End == v))
{
// Linedefs are facing opposite directions
continue;
}
deltapos = (v1.Position - centerpos).GetNormal() - (v2.Position - centerpos).GetNormal();
}
else // If the vertex has more than 2 linedefs then is no good!
{
continue;
}
if (backwards) deltapos = -deltapos;
Vector2D normalunit = deltapos.GetPerpendicular().GetNormal();
Vector2D perppos = centerpos + normalunit * distance;
if (createas <= LINEDEFS)
{
renderer.RenderLine(centerpos, perppos, LINE_THICKNESS, General.Colors.Highlight, true);
}
else
{
renderer.RenderRectangleFilled(new RectangleF(perppos.x - vsize, perppos.y - vsize, vsize * 2.0f, vsize * 2.0f), General.Colors.Highlight, true);
}
}
renderer.Finish();
}
renderer.Present();
}
#endregion
}
}

View file

@ -647,7 +647,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
General.Interface.AddButton(BuilderPlug.Me.MenusForm.MarqueSelectTouching); //mxd
General.Interface.AddButton(BuilderPlug.Me.MenusForm.SyncronizeThingEditButton); //mxd
if(General.Map.UDMF) General.Interface.AddButton(BuilderPlug.Me.MenusForm.TextureOffsetLock, ToolbarSection.Geometry); //mxd
General.Interface.AddButton(BuilderPlug.Me.MenusForm.PlaceThings); //JBR
General.Interface.AddButton(BuilderPlug.Me.MenusForm.PerpendicularVertex); //JBR
General.Interface.AddButton(BuilderPlug.Me.MenusForm.PerpendicularLinedef); //JBR
General.Interface.AddButton(BuilderPlug.Me.MenusForm.ParallelLinedef); //JBR
// Convert geometry selection to sectors only
General.Map.Map.ConvertSelection(SelectionType.Sectors);
@ -705,6 +710,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.SyncronizeThingEditButton); //mxd
if(General.Map.UDMF) General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.TextureOffsetLock); //mxd
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PlaceThings); //JBR
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PerpendicularVertex); //JBR
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PerpendicularLinedef); //JBR
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.ParallelLinedef); //JBR
// Keep only sectors selected
General.Map.Map.ClearSelectedLinedefs();
@ -1349,7 +1359,82 @@ namespace CodeImp.DoomBuilder.BuilderModes
PixelColor c = (s == highlighted ? General.Colors.Highlight : PixelColor.FromColor(Color.White));
renderer.RenderRectangleFilled(rect, c, true, General.Map.Data.CommentTextures[iconindex]);
}
//JBR Perpendicular Vertex
[BeginAction("perpendicularvertex")]
public void PerpendicularVertex()
{
ICollection<Sector> selected = General.Map.Map.GetSelectedSectors(true);
// Nothing selected?
if (selected.Count == 0)
{
// Anything highlighted?
if (highlighted != null)
{
// Select the highlighted item
highlighted.Selected = true;
selected.Add(highlighted);
}
}
// Anything selected?
if (selected.Count > 0)
General.Editing.ChangeMode(new PerpendicularVertexMode(new SectorsMode()));
else
General.Interface.DisplayStatus(StatusType.Warning, "This action requires a selection!");
}
//JBR Perpendicular Linedef
[BeginAction("perpendicularlinedef")]
public void PerpendicularLinedef()
{
ICollection<Sector> selected = General.Map.Map.GetSelectedSectors(true);
// Nothing selected?
if (selected.Count == 0)
{
// Anything highlighted?
if (highlighted != null)
{
// Select the highlighted item
highlighted.Selected = true;
selected.Add(highlighted);
}
}
// Anything selected?
if (selected.Count > 0)
General.Editing.ChangeMode(new PerpendicularLinedefMode(new SectorsMode()));
else
General.Interface.DisplayStatus(StatusType.Warning, "This action requires a selection!");
}
//JBR Parallel Linedef
[BeginAction("parallellinedef")]
public void ParallelLinedef()
{
ICollection<Sector> selected = General.Map.Map.GetSelectedSectors(true);
// Nothing selected?
if (selected.Count == 0)
{
// Anything highlighted?
if (highlighted != null)
{
// Select the highlighted item
highlighted.Selected = true;
selected.Add(highlighted);
}
}
// Anything selected?
if (selected.Count > 0)
General.Editing.ChangeMode(new ParallelLinedefMode(new SectorsMode()));
else
General.Interface.DisplayStatus(StatusType.Warning, "This action requires a selection!");
}
#endregion
#region ================== Actions

View file

@ -123,7 +123,18 @@ namespace CodeImp.DoomBuilder.BuilderModes
General.Interface.AddButton(BuilderPlug.Me.MenusForm.PastePropertiesOptions); //mxd
General.Interface.AddButton(BuilderPlug.Me.MenusForm.SeparatorCopyPaste); //mxd
General.Interface.AddButton(BuilderPlug.Me.MenusForm.AlignThingsToWall); //mxd
General.Interface.AddButton(BuilderPlug.Me.MenusForm.PointAtCursor); //JBR
//JBR Add exclusive tool for SRB2 only
if (General.Map.SRB2)
{
General.Interface.AddButton(BuilderPlug.Me.MenusForm.VertexSlopeAssist);
BuilderPlug.Me.MenusForm.VertexSlopeAssistMenu.Visible = true;
}
else
BuilderPlug.Me.MenusForm.VertexSlopeAssistMenu.Visible = false;
// Convert geometry selection to linedefs selection
General.Map.Map.ConvertSelection(SelectionType.Linedefs);
General.Map.Map.SelectionType = SelectionType.Things;
@ -142,9 +153,13 @@ namespace CodeImp.DoomBuilder.BuilderModes
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PastePropertiesOptions); //mxd
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.SeparatorCopyPaste); //mxd
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.AlignThingsToWall); //mxd
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PointAtCursor); //JBR
if (General.Map.SRB2)
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.VertexSlopeAssist); //JBR
//mxd. Do some highlight management...
if(highlighted != null) highlighted.Highlighted = false;
if (highlighted != null) highlighted.Highlighted = false;
// Going to EditSelectionMode?
if(General.Editing.NewMode is EditSelectionMode)
@ -1217,6 +1232,19 @@ namespace CodeImp.DoomBuilder.BuilderModes
General.Interface.RedrawDisplay();
}
//JBR Vertex slope assistant
[BeginAction("vertexslopeassist")]
public void VertexSlopeAssist()
{
if (General.Map.SRB2)
General.Editing.ChangeMode(new VertexSlopeAssistMode(new ThingsMode()));
else
General.Interface.DisplayStatus(StatusType.Warning, "This tool is only available to SRB2 maps!");
// Redraw screen
General.Interface.RedrawDisplay();
}
//mxd. rotate clockwise
[BeginAction("rotateclockwise")]
public void RotateCW()

View file

@ -0,0 +1,571 @@
#region ================== Namespaces
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Map;
using CodeImp.DoomBuilder.Rendering;
using CodeImp.DoomBuilder.Geometry;
using CodeImp.DoomBuilder.Editing;
using System.Drawing;
using CodeImp.DoomBuilder.Windows;
#endregion
//JBR Vertex into Shape mode
namespace CodeImp.DoomBuilder.BuilderModes
{
[EditMode(DisplayName = "Vertex into Shape",
AllowCopyPaste = false,
Volatile = true)]
public sealed class VertexIntoShapeMode : BaseClassicMode
{
#region ================== Constants
private const float LINE_THICKNESS = 0.6f;
private const int CLOSESHAPE_ORIGIN = 0;
private const int CLOSESHAPE_VERTICES = 1;
private const int SHAPE = 2;
private const int LINEDEFS = 3;
private const int VERTICES = 4;
private const int THINGS = 5;
#endregion
#region ================== Variables
// Collections
private ICollection<Vertex> selected;
#endregion
#region ================== Properties
// Just keep the base mode button checked
public override string EditModeButtonName { get { return General.Editing.PreviousStableMode.Name; } }
#endregion
#region ================== Constructor / Disposer
// Constructor
public VertexIntoShapeMode(EditMode basemode)
{
// Make collections by selection
selected = General.Map.Map.GetSelectedVertices(true);
}
// Disposer
public override void Dispose()
{
// Not already disposed?
if(!isdisposed)
{
// Clean up
// Done
base.Dispose();
}
}
#endregion
#region ================== Methods
// This generates the shape from a vertex
private static List<Vector2D> GenerateShape(Vector2D origin, int sides, int spikiness, int spikingmode, float radiusX, float radiusY, float start, float end)
{
if (sides <= 0) return new List<Vector2D>();
float spikeX = (float)spikiness / 100f * radiusX;
float spikeY = (float)spikiness / 100f * radiusY;
float spikeDef = (float)spikiness;
// Make list
List<Vector2D> points = new List<Vector2D>();
// Spiking fun!
int spiketype = spikingmode >> 2;
int spikematch = spikingmode & 1;
if ((spikingmode & 2) == 2)
{
spikeX = -spikeX;
spikeY = -spikeY;
}
// FEATURE: In some spikingmodes, if spikiness is over 100% the spikes can cross between center for interesting results!
// Plot each side
for (int i = 0; i < sides + 1; i++)
{
float offX = 0f;
float offY = 0f;
if (spiketype == 0)
{
// Spike outside and inside
if ((i & 1) == spikematch)
{
offX = spikeX;
offY = spikeY;
}
}
else if (spiketype == 1)
{
// Spike zig-zag and gear
offX = spikeX;
offY = spikeY;
if ((spikematch == 0) || (i & 1) == spikematch)
{
spikeX = -spikeX;
spikeY = -spikeY;
}
}
else if (spiketype == 2)
{
// Simulate the DrawEllipse spikiness
if ((i & 1) == spikematch)
{
offX = spikeDef;
offY = spikeDef;
}
}
float delta = (float)i / sides;
float angle = start + (end - start) * delta;
float x = (float)Math.Cos(angle) * (radiusX + offX);
float y = (float)Math.Sin(angle) * (radiusY + offY);
Vector2D vertex = new Vector2D(x, y);
points.Add(origin + vertex);
}
// Done
return points;
}
// Calculate origin and radius from 2 vectors
private static void CalculateOrigin(bool boxed, bool ellipse, Vector2D start, Vector2D end, out Vector2D origin, out Vector2D endpoint, out float radiusX, out float radiusY)
{
origin = start;
endpoint = end;
if (boxed)
{
origin = (start + end) / 2f;
float centerX = (end.x - start.x) / 2f;
float centerY = (end.y - start.y) / 2f;
radiusX = Math.Abs(centerX);
radiusY = Math.Abs(centerY);
if (!ellipse)
{
if (radiusX > radiusY)
{
radiusY = radiusX;
centerY = (centerY >= 0f) ? Math.Abs(centerX) : -Math.Abs(centerX);
}
else
{
radiusX = radiusY;
centerX = (centerX >= 0f) ? Math.Abs(centerY) : -Math.Abs(centerY);
}
origin.x = start.x + centerX;
origin.y = start.y + centerY;
}
}
else
{
if (ellipse)
{
radiusX = Math.Abs(end.x - start.x);
radiusY = Math.Abs(end.y - start.y);
}
else
{
float radius = (end - start).GetLength();
radiusX = radius;
radiusY = radius;
}
}
}
// This draws a point at a specific location
private static bool AddPointAt(List<DrawnVertex> shapepts, Vector2D pos, bool stitch, bool stitchline)
{
if (pos.x < General.Map.Config.LeftBoundary || pos.x > General.Map.Config.RightBoundary ||
pos.y > General.Map.Config.TopBoundary || pos.y < General.Map.Config.BottomBoundary)
return false;
DrawnVertex newpoint = new DrawnVertex();
newpoint.pos = pos;
newpoint.stitch = stitch;
newpoint.stitchline = stitchline;
shapepts.Add(newpoint);
return true;
}
#endregion
#region ================== Events
public override void OnHelp()
{
General.ShowHelp("e_vertexintoshape.html");
}
// Cancelled
public override void OnCancel()
{
// Cancel base class
base.OnCancel();
// Return to base mode
General.Editing.ChangeMode(General.Editing.PreviousStableMode.Name);
}
// Mode engages
public override void OnEngage()
{
base.OnEngage();
renderer.SetPresentation(Presentation.Standard);
// Show toolbox window
BuilderPlug.Me.VertexIntoShapeForm.Show((Form)General.Interface);
}
// Disenagaging
public override void OnDisengage()
{
base.OnDisengage();
// Hide toolbox window
BuilderPlug.Me.VertexIntoShapeForm.Hide();
}
// This applies the curves and returns to the base mode
public override void OnAccept()
{
BuilderPlug.Me.VertexIntoShapeForm.RestartSeed();
bool previewreference = BuilderPlug.Me.VertexIntoShapeForm.PreviewReference;
bool removevertices = BuilderPlug.Me.VertexIntoShapeForm.RemoveVertices;
bool ellipse = BuilderPlug.Me.VertexIntoShapeForm.Ellipse;
int createas = BuilderPlug.Me.VertexIntoShapeForm.CreateAs;
bool frontoutside = BuilderPlug.Me.VertexIntoShapeForm.FrontOutside;
int spikingmode = BuilderPlug.Me.VertexIntoShapeForm.SpikingMode;
ThingBrowser2Form.Result thingresult = new ThingBrowser2Form.Result();
// Ask for thing type...
if (createas == THINGS)
{
BuilderPlug.Me.VertexIntoShapeForm.Hide();
// Pick the thing to add...
thingresult = ThingBrowser2Form.BrowseThing(BuilderPlug.Me.PerpendicularVertexForm);
if (!thingresult.OK)
{
General.Map.UndoRedo.WithdrawUndo();
General.Map.UndoRedo.WithdrawUndo();
General.Interface.DisplayStatus(StatusType.Warning, "Operation aborted.");
return;
}
BuilderPlug.Me.VertexIntoShapeForm.Show();
BuilderPlug.Me.VertexIntoShapeForm.Activate();
}
// Create undo
if (selected.Count == 1)
{
General.Map.UndoRedo.CreateUndo(String.Format("Vertex into shape"));
}
else
{
General.Map.UndoRedo.CreateUndo(String.Format("{0} Vertices into shapes", selected.Count));
}
// Go for all selected lines
foreach (Vertex v in selected)
{
// This values can be random...
float radiusX = BuilderPlug.Me.VertexIntoShapeForm.RadiusX;
float radiusY = BuilderPlug.Me.VertexIntoShapeForm.RadiusY;
int sides = BuilderPlug.Me.VertexIntoShapeForm.Sides;
int spikiness = BuilderPlug.Me.VertexIntoShapeForm.Spikiness;
float startangle = Angle2D.DegToRad(BuilderPlug.Me.VertexIntoShapeForm.StartAngle);
float sweepangle = Angle2D.DegToRad(BuilderPlug.Me.VertexIntoShapeForm.SweepAngle);
BuilderPlug.Me.VertexIntoShapeForm.NextShape();
// Skip shapes that are smaller than 1 radius.
if (radiusX < 1f || radiusY < 1f) continue;
// Generate shape
Vector2D origin = v.Position;
List<Vector2D> shapevecs = GenerateShape(origin, sides, spikiness, spikingmode, radiusX, radiusY, startangle, startangle + sweepangle);
// Delete last vertex if match with first
bool wasClosedShape = shapevecs[0].CloseTo(shapevecs[shapevecs.Count - 1], 0.1f);
if (wasClosedShape)
{
shapevecs.RemoveAt(shapevecs.Count - 1);
}
// Flip normals by reversing the list
if (!frontoutside) shapevecs.Reverse();
// Make the drawing
if (createas < LINEDEFS)
{
List<DrawnVertex> shapepts = new List<DrawnVertex>();
foreach (Vector2D t in shapevecs) AddPointAt(shapepts, t, true, true);
if (!wasClosedShape && createas == CLOSESHAPE_ORIGIN)
{
AddPointAt(shapepts, origin, true, true); // Go toward origin before closing
}
if (wasClosedShape || createas <= CLOSESHAPE_VERTICES)
{
AddPointAt(shapepts, shapevecs[0], true, true); // Close the shape
}
if (!Tools.DrawLines(shapepts, true, BuilderPlug.Me.AutoAlignTextureOffsetsOnCreate))
{
// Drawing failed
General.Map.UndoRedo.WithdrawUndo();
return;
}
}
else
{
List<Vertex> vertices = new List<Vertex>();
// Create each point
if (createas != THINGS)
{
for (int i = 0; i < shapevecs.Count; i++)
{
Vertex vp = General.Map.Map.CreateVertex(shapevecs[i]);
if (vp == null)
{
General.Map.UndoRedo.WithdrawUndo();
return;
}
vertices.Add(vp);
}
}
// of for things create things....
if (createas == THINGS)
{
for (int i = 0; i < shapevecs.Count; i++)
{
Thing tp = General.Map.Map.CreateThing();
if (tp != null)
{
General.Settings.ApplyDefaultThingSettings(tp);
thingresult.Apply(tp);
tp.Move(shapevecs[i]);
tp.UpdateConfiguration();
}
}
}
// Create linedefs
if (createas == LINEDEFS && shapevecs.Count > 1)
{
for (int i = 1; i < shapevecs.Count; i++)
{
// Join points together
General.Map.Map.CreateLinedef(vertices[i - 1], vertices[i]);
}
if (wasClosedShape)
{
// Join first with last vertex for closed shape
General.Map.Map.CreateLinedef(vertices[shapevecs.Count - 1], vertices[0]);
}
}
}
if (createas == THINGS)
{
//Update Things filter
General.Map.ThingsFilter.Update();
}
// Snap to map format accuracy
General.Map.Map.SnapAllToAccuracy();
// Update cached values
General.Map.Map.Update();
// Edit new sectors?
List<Sector> newsectors = General.Map.Map.GetMarkedSectors(true);
if (BuilderPlug.Me.EditNewSector && (newsectors.Count > 0))
General.Interface.ShowEditSectors(newsectors);
// Update the used textures
General.Map.Data.UpdateUsedTextures();
//mxd
General.Map.Renderer2D.UpdateExtraFloorFlag();
// Map is changed
General.Map.IsChanged = true;
}
if (removevertices)
{
// Remove vertices and all attached linedefs
General.Map.Map.BeginAddRemove();
foreach (Vertex v in selected)
{
if (v.Linedefs.Count > 0)
{
List<Linedef> list = new List<Linedef>(v.Linedefs);
foreach (Linedef ld in list)
{
ld.Dispose();
}
}
else
{
v.Dispose();
}
}
General.Map.Map.EndAddRemove();
}
// Notify user
if (selected.Count == 1)
{
General.Interface.DisplayStatus(StatusType.Action, "Created a shape from vertex.");
}
else
{
General.Interface.DisplayStatus(StatusType.Action, "Created " + selected.Count + " shapes from vertices.");
}
// Return to base mode
General.Editing.ChangeMode(General.Editing.PreviousStableMode.Name);
}
// Redrawing display
public override void OnRedrawDisplay()
{
renderer.RedrawSurface();
// Render lines
if(renderer.StartPlotter(true))
{
renderer.PlotLinedefSet(General.Map.Map.Linedefs);
renderer.PlotVerticesSet(General.Map.Map.Vertices);
renderer.Finish();
}
// Render things
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA);
renderer.RenderNiGHTSPath();
renderer.Finish();
}
BuilderPlug.Me.VertexIntoShapeForm.RestartSeed();
bool previewreference = BuilderPlug.Me.VertexIntoShapeForm.PreviewReference;
bool removevertices = BuilderPlug.Me.VertexIntoShapeForm.RemoveVertices;
bool ellipse = BuilderPlug.Me.VertexIntoShapeForm.Ellipse;
int createas = BuilderPlug.Me.VertexIntoShapeForm.CreateAs;
bool frontoutside = BuilderPlug.Me.VertexIntoShapeForm.FrontOutside;
int spikingmode = BuilderPlug.Me.VertexIntoShapeForm.SpikingMode;
float vsize = (renderer.VertexSize + 1.0f) / renderer.Scale;
PixelColor color = General.Colors.Highlight;
// Render overlay
if(renderer.StartOverlay(true))
{
// Go for all selected vertices (reference lines)
if (previewreference)
{
foreach (Vertex v in selected)
{
// This values can be random...
float radiusX = BuilderPlug.Me.VertexIntoShapeForm.RadiusX;
float radiusY = BuilderPlug.Me.VertexIntoShapeForm.RadiusY;
int sides = BuilderPlug.Me.VertexIntoShapeForm.Sides;
int spikiness = BuilderPlug.Me.VertexIntoShapeForm.Spikiness;
float startangle = Angle2D.DegToRad(BuilderPlug.Me.VertexIntoShapeForm.StartAngle);
float sweepangle = Angle2D.DegToRad(BuilderPlug.Me.VertexIntoShapeForm.SweepAngle);
BuilderPlug.Me.VertexIntoShapeForm.NextShape();
// Skip shapes that are smaller than 1 radius.
if (radiusX < 1f || radiusY < 1f) continue;
// Generate shape
Vector2D origin = v.Position;
List<Vector2D> shapevecs = GenerateShape(origin, sides, spikiness, spikingmode, radiusX, radiusY, startangle, startangle + sweepangle);
// render reference
if (previewreference)
{
List<Vector2D> refcircle = GenerateShape(origin, 24, 0, 0, radiusX, radiusY, startangle, startangle + sweepangle);
for (int i = 1; i < refcircle.Count; i++)
renderer.RenderLine(refcircle[i - 1], refcircle[i], LINE_THICKNESS, General.Colors.Grid, true);
renderer.RenderLine(origin, shapevecs[0], LINE_THICKNESS, General.Colors.Grid, true);
renderer.RenderLine(origin, shapevecs[shapevecs.Count - 1], LINE_THICKNESS, General.Colors.Grid, true);
}
}
}
BuilderPlug.Me.VertexIntoShapeForm.RestartSeed();
// Go for all selected vertices (actual shape)
foreach (Vertex v in selected)
{
// This values can be random...
float radiusX = BuilderPlug.Me.VertexIntoShapeForm.RadiusX;
float radiusY = BuilderPlug.Me.VertexIntoShapeForm.RadiusY;
int sides = BuilderPlug.Me.VertexIntoShapeForm.Sides;
int spikiness = BuilderPlug.Me.VertexIntoShapeForm.Spikiness;
float startangle = Angle2D.DegToRad(BuilderPlug.Me.VertexIntoShapeForm.StartAngle);
float sweepangle = Angle2D.DegToRad(BuilderPlug.Me.VertexIntoShapeForm.SweepAngle);
BuilderPlug.Me.VertexIntoShapeForm.NextShape();
// Skip shapes that are smaller than 1 radius.
if (radiusX < 1f || radiusY < 1f) continue;
// Generate shape
Vector2D origin = v.Position;
List<Vector2D> shapevecs = GenerateShape(origin, sides, spikiness, spikingmode, radiusX, radiusY, startangle, startangle + sweepangle);
// Check if the shape is closed
bool isShapeClosed = shapevecs[0].CloseTo(shapevecs[shapevecs.Count - 1], 0.001f);
// render shape
if (createas <= LINEDEFS)
{
for (int i = 1; i < shapevecs.Count; i++)
renderer.RenderLine(shapevecs[i - 1], shapevecs[i], LINE_THICKNESS, color, true);
if (!isShapeClosed && createas == CLOSESHAPE_ORIGIN)
{
renderer.RenderLine(shapevecs[shapevecs.Count - 1], origin, LINE_THICKNESS, color, true);
renderer.RenderLine(origin, shapevecs[0], LINE_THICKNESS, color, true);
}
if (!isShapeClosed && createas == CLOSESHAPE_VERTICES)
{
renderer.RenderLine(shapevecs[shapevecs.Count - 1], shapevecs[0], LINE_THICKNESS, color, true);
}
}
// render vertices
for (int i = 0; i < shapevecs.Count; i++)
renderer.RenderRectangleFilled(new RectangleF(shapevecs[i].x - vsize, shapevecs[i].y - vsize, vsize * 2.0f, vsize * 2.0f), color, true);
// Gray out origin if is to remove vertex
if (removevertices)
renderer.RenderRectangleFilled(new RectangleF(origin.x - vsize, origin.y - vsize, vsize * 2.0f, vsize * 2.0f), General.Colors.Grid, true);
}
renderer.Finish();
}
renderer.Present();
}
#endregion
}
}

File diff suppressed because it is too large Load diff

View file

@ -98,6 +98,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
General.Interface.AddButton(BuilderPlug.Me.MenusForm.TextureOffsetLock, ToolbarSection.Geometry); //mxd
}
General.Interface.AddButton(BuilderPlug.Me.MenusForm.PlaceThings); //JBR
General.Interface.AddButton(BuilderPlug.Me.MenusForm.VertexIntoShape); //JBR
General.Interface.AddButton(BuilderPlug.Me.MenusForm.PerpendicularVertex); //JBR
General.Interface.AddButton(BuilderPlug.Me.MenusForm.PerpendicularLinedef); //JBR
General.Interface.AddButton(BuilderPlug.Me.MenusForm.ParallelLinedef); //JBR
// Convert geometry selection to vertices only
General.Map.Map.ConvertSelection(SelectionType.Vertices);
UpdateSelectionInfo(); //mxd
@ -117,8 +123,14 @@ namespace CodeImp.DoomBuilder.BuilderModes
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.TextureOffsetLock); //mxd
}
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PlaceThings); //JBR
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.VertexIntoShape); //JBR
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PerpendicularVertex); //JBR
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PerpendicularLinedef); //JBR
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.ParallelLinedef); //JBR
// Going to EditSelectionMode?
if(General.Editing.NewMode is EditSelectionMode)
if (General.Editing.NewMode is EditSelectionMode)
{
// Not pasting anything?
EditSelectionMode editmode = (General.Editing.NewMode as EditSelectionMode);
@ -1131,6 +1143,107 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(form.Setup(this)) form.ShowDialog();
}
//JBR Perpendicular Vertex
[BeginAction("perpendicularvertex")]
public void PerpendicularVertex()
{
ICollection<Vertex> selected = General.Map.Map.GetSelectedVertices(true);
// Nothing selected?
if (selected.Count == 0)
{
// Anything highlighted?
if (highlighted != null)
{
// Select the highlighted item
highlighted.Selected = true;
selected.Add(highlighted);
}
}
// Anything selected?
if (selected.Count > 0)
General.Editing.ChangeMode(new PerpendicularVertexMode(new VerticesMode()));
else
General.Interface.DisplayStatus(StatusType.Warning, "This action requires a selection!");
}
//JBR Perpendicular Linedef
[BeginAction("perpendicularlinedef")]
public void PerpendicularLinedef()
{
ICollection<Vertex> selected = General.Map.Map.GetSelectedVertices(true);
// Nothing selected?
if (selected.Count == 0)
{
// Anything highlighted?
if (highlighted != null)
{
// Select the highlighted item
highlighted.Selected = true;
selected.Add(highlighted);
}
}
// Anything selected?
if (selected.Count > 0)
General.Editing.ChangeMode(new PerpendicularLinedefMode(new VerticesMode()));
else
General.Interface.DisplayStatus(StatusType.Warning, "This action requires a selection!");
}
//JBR Parallel Linedef
[BeginAction("parallellinedef")]
public void ParallelLinedef()
{
ICollection<Vertex> selected = General.Map.Map.GetSelectedVertices(true);
// Nothing selected?
if (selected.Count == 0)
{
// Anything highlighted?
if (highlighted != null)
{
// Select the highlighted item
highlighted.Selected = true;
selected.Add(highlighted);
}
}
// Anything selected?
if (selected.Count > 0)
General.Editing.ChangeMode(new ParallelLinedefMode(new VerticesMode()));
else
General.Interface.DisplayStatus(StatusType.Warning, "This action requires a selection!");
}
//JBR Vertex into Shape
[BeginAction("vertexintoshape")]
public void VertexIntoShape()
{
ICollection<Vertex> selected = General.Map.Map.GetSelectedVertices(true);
// Nothing selected?
if (selected.Count == 0)
{
// Anything highlighted?
if (highlighted != null)
{
// Select the highlighted item
highlighted.Selected = true;
selected.Add(highlighted);
}
}
// Anything selected?
if (selected.Count > 0)
General.Editing.ChangeMode(new VertexIntoShapeMode(new VerticesMode()));
else
General.Interface.DisplayStatus(StatusType.Warning, "This action requires a selection!");
}
#endregion
#region ================== Action assist (mxd)
@ -1213,7 +1326,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
ld.Front.Sector.Join(ld.Back.Sector);
}
}
#endregion
}
}

View file

@ -90,7 +90,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
private FindReplaceForm findreplaceform;
private ErrorCheckForm errorcheckform;
private PreferencesForm preferencesform;
private PerpendicularLinedefForm perpendicularlinedefform; //JBR
private PerpendicularVertexForm perpendicularvertexform; //JBR
private ParallelLinedefForm parallellinedefform; //JBR
private VertexIntoShapeForm vertexintoshapeform; //JBR
private VertexSlopeAssistForm vertexslopeassistform; //JBR
// Dockers
private UndoRedoPanel undoredopanel;
private Docker undoredodocker;
@ -148,6 +153,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
public FindReplaceForm FindReplaceForm { get { return findreplaceform ?? (findreplaceform = new FindReplaceForm()); } }
public ErrorCheckForm ErrorCheckForm { get { return errorcheckform ?? (errorcheckform = new ErrorCheckForm()); } }
public PreferencesForm PreferencesForm { get { return preferencesform; } }
public PerpendicularLinedefForm PerpendicularLinedefForm { get { return perpendicularlinedefform ?? (perpendicularlinedefform = new PerpendicularLinedefForm()); } } //JBR
public PerpendicularVertexForm PerpendicularVertexForm { get { return perpendicularvertexform ?? (perpendicularvertexform = new PerpendicularVertexForm()); } } //JBR
public ParallelLinedefForm ParallelLinedefForm { get { return parallellinedefform ?? (parallellinedefform = new ParallelLinedefForm()); } } //JBR
public VertexIntoShapeForm VertexIntoShapeForm { get { return vertexintoshapeform ?? (vertexintoshapeform = new VertexIntoShapeForm()); } } //JBR
public VertexSlopeAssistForm VertexSlopeAssistForm { get { return vertexslopeassistform ?? (vertexslopeassistform = new VertexSlopeAssistForm()); } } //JBR
// Settings
public int ShowVisualThings { get { return showvisualthings; } set { showvisualthings = value; } }
@ -265,7 +275,33 @@ namespace CodeImp.DoomBuilder.BuilderModes
errorcheckform.Dispose();
errorcheckform = null;
}
if (perpendicularlinedefform != null) //JBR
{
perpendicularlinedefform.Dispose();
perpendicularlinedefform = null;
}
if (perpendicularvertexform != null) //JBR
{
perpendicularvertexform.Dispose();
perpendicularvertexform = null;
}
if (parallellinedefform != null) //JBR
{
parallellinedefform.Dispose();
parallellinedefform = null;
}
if (vertexintoshapeform != null) //JBR
{
vertexintoshapeform.Dispose();
vertexintoshapeform = null;
}
if (vertexslopeassistform != null) //JBR
{
vertexslopeassistform.Dispose();
vertexslopeassistform = null;
}
// Done
me = null;
base.Dispose();

View file

@ -0,0 +1,497 @@
namespace CodeImp.DoomBuilder.BuilderModes
{
partial class DrawShapeOptionsPanel
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if(disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.Label label5;
System.Windows.Forms.Label label6;
System.Windows.Forms.Label label2;
System.Windows.Forms.Label label1;
System.Windows.Forms.Label label4;
System.Windows.Forms.Label label3;
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.spikiness = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.sides = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.createas = new System.Windows.Forms.ComboBox();
this.spike50 = new System.Windows.Forms.Button();
this.sides24 = new System.Windows.Forms.Button();
this.sides8 = new System.Windows.Forms.Button();
this.sides3 = new System.Windows.Forms.Button();
this.spikingmode = new System.Windows.Forms.ComboBox();
this.frontoutside = new System.Windows.Forms.CheckBox();
this.spike0 = new System.Windows.Forms.Button();
this.ellipse = new System.Windows.Forms.CheckBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.sweepangle = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.startangle = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.limitanglequad = new System.Windows.Forms.CheckBox();
this.startanglewheel = new CodeImp.DoomBuilder.GZBuilder.Controls.AngleControlF();
this.sweepanglewheel = new CodeImp.DoomBuilder.GZBuilder.Controls.AngleControlF();
this.previewreference = new System.Windows.Forms.CheckBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.firstpointtype = new System.Windows.Forms.ComboBox();
this.tooltip = new System.Windows.Forms.ToolTip(this.components);
label5 = new System.Windows.Forms.Label();
label6 = new System.Windows.Forms.Label();
label2 = new System.Windows.Forms.Label();
label1 = new System.Windows.Forms.Label();
label4 = new System.Windows.Forms.Label();
label3 = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
this.SuspendLayout();
//
// label5
//
label5.AutoSize = true;
label5.Location = new System.Drawing.Point(17, 39);
label5.Name = "label5";
label5.Size = new System.Drawing.Size(65, 13);
label5.TabIndex = 1;
label5.Text = "1st Point as:";
this.tooltip.SetToolTip(label5, "Select how the shape will be placed in the map:\r\n* Starting from origin\r\n* Replic" +
"ate Draw Ellipse Mode behaviour\r\n* Side/corner into origin.");
//
// label6
//
label6.AutoSize = true;
label6.Location = new System.Drawing.Point(20, 20);
label6.Name = "label6";
label6.Size = new System.Drawing.Size(93, 13);
label6.TabIndex = 0;
label6.Text = "Create shape as...";
this.tooltip.SetToolTip(label6, "Select which type of elements to create.\r\nCheck help (F1) for more information.");
//
// label2
//
label2.AutoSize = true;
label2.Location = new System.Drawing.Point(17, 113);
label2.Name = "label2";
label2.Size = new System.Drawing.Size(55, 13);
label2.TabIndex = 5;
label2.Text = "Spikiness:";
this.tooltip.SetToolTip(label2, "Sets percentage of spikiness.\r\nExcept \"Draw Ellipse behaviour\" spike type, in tha" +
"t case spikiness is in mp.");
//
// label1
//
label1.AutoSize = true;
label1.Location = new System.Drawing.Point(35, 88);
label1.Name = "label1";
label1.Size = new System.Drawing.Size(36, 13);
label1.TabIndex = 3;
label1.Text = "Sides:";
this.tooltip.SetToolTip(label1, "Sets number of sides that the shape should have.\r\nNote that reducing sweep angle " +
"won\'t reduce the number of sides.\r\nWhole number only, 3 sides minimum.");
//
// label4
//
label4.AutoSize = true;
label4.Location = new System.Drawing.Point(125, 24);
label4.Name = "label4";
label4.Size = new System.Drawing.Size(73, 13);
label4.TabIndex = 3;
label4.Text = "Sweep Angle:";
this.tooltip.SetToolTip(label4, "Controls the sweep angle of the slice.\r\n360º will create a closed shape without s" +
"lices.\r\nUse comma ( , ) for fractional number, e.g.: 12,5");
//
// label3
//
label3.AutoSize = true;
label3.Location = new System.Drawing.Point(32, 24);
label3.Name = "label3";
label3.Size = new System.Drawing.Size(62, 13);
label3.TabIndex = 0;
label3.Text = "Start Angle:";
this.tooltip.SetToolTip(label3, "Controls the starting angle of the first point.\r\nUse comma ( , ) for fractional n" +
"umber, e.g.: 12,5");
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.spikiness);
this.groupBox1.Controls.Add(this.sides);
this.groupBox1.Controls.Add(label6);
this.groupBox1.Controls.Add(this.createas);
this.groupBox1.Controls.Add(this.spike50);
this.groupBox1.Controls.Add(this.sides24);
this.groupBox1.Controls.Add(this.sides8);
this.groupBox1.Controls.Add(this.sides3);
this.groupBox1.Controls.Add(this.spikingmode);
this.groupBox1.Controls.Add(this.frontoutside);
this.groupBox1.Controls.Add(this.spike0);
this.groupBox1.Controls.Add(label2);
this.groupBox1.Controls.Add(label1);
this.groupBox1.Location = new System.Drawing.Point(3, 128);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(234, 180);
this.groupBox1.TabIndex = 2;
this.groupBox1.TabStop = false;
this.groupBox1.Text = " Shape Control: ";
//
// spikiness
//
this.spikiness.AllowDecimal = false;
this.spikiness.AllowNegative = false;
this.spikiness.AllowRelative = false;
this.spikiness.ButtonStep = 1;
this.spikiness.ButtonStepBig = 10F;
this.spikiness.ButtonStepFloat = 1F;
this.spikiness.ButtonStepSmall = 5F;
this.spikiness.ButtonStepsUseModifierKeys = true;
this.spikiness.ButtonStepsWrapAround = false;
this.spikiness.Location = new System.Drawing.Point(75, 108);
this.spikiness.Name = "spikiness";
this.spikiness.Size = new System.Drawing.Size(60, 24);
this.spikiness.StepValues = null;
this.spikiness.TabIndex = 6;
this.spikiness.WhenTextChanged += new System.EventHandler(this.spikiness_WhenTextChanged);
//
// sides
//
this.sides.AllowDecimal = false;
this.sides.AllowNegative = false;
this.sides.AllowRelative = false;
this.sides.ButtonStep = 1;
this.sides.ButtonStepBig = 4F;
this.sides.ButtonStepFloat = 1F;
this.sides.ButtonStepSmall = 2F;
this.sides.ButtonStepsUseModifierKeys = true;
this.sides.ButtonStepsWrapAround = false;
this.sides.Location = new System.Drawing.Point(75, 83);
this.sides.Name = "sides";
this.sides.Size = new System.Drawing.Size(60, 24);
this.sides.StepValues = null;
this.sides.TabIndex = 4;
this.sides.WhenTextChanged += new System.EventHandler(this.sides_WhenTextChanged);
//
// createas
//
this.createas.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.createas.FormattingEnabled = true;
this.createas.Items.AddRange(new object[] {
"Close shape towards origin",
"Close shape, first to last vertex",
"Open or close shape",
"Shape w/o intersects or sectors",
"Vertices",
"Things"});
this.createas.Location = new System.Drawing.Point(18, 36);
this.createas.Name = "createas";
this.createas.Size = new System.Drawing.Size(200, 21);
this.createas.TabIndex = 1;
this.tooltip.SetToolTip(this.createas, "Select which type of elements to create.\r\nCheck help (F1) for more information.");
this.createas.SelectedIndexChanged += new System.EventHandler(this.ValueChanged);
//
// spike50
//
this.spike50.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.DrawShapeSpike50;
this.spike50.Location = new System.Drawing.Point(170, 111);
this.spike50.Name = "spike50";
this.spike50.Size = new System.Drawing.Size(24, 24);
this.spike50.TabIndex = 12;
this.spike50.UseVisualStyleBackColor = true;
this.spike50.Click += new System.EventHandler(this.spike50_Click);
//
// sides24
//
this.sides24.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.DrawShape24Sides;
this.sides24.Location = new System.Drawing.Point(200, 83);
this.sides24.Name = "sides24";
this.sides24.Size = new System.Drawing.Size(24, 24);
this.sides24.TabIndex = 10;
this.sides24.UseVisualStyleBackColor = true;
this.sides24.Click += new System.EventHandler(this.sides24_Click);
//
// sides8
//
this.sides8.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.DrawShape8Sides;
this.sides8.Location = new System.Drawing.Point(170, 83);
this.sides8.Name = "sides8";
this.sides8.Size = new System.Drawing.Size(24, 24);
this.sides8.TabIndex = 9;
this.sides8.UseVisualStyleBackColor = true;
this.sides8.Click += new System.EventHandler(this.sides8_Click);
//
// sides3
//
this.sides3.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.DrawShape3Sides;
this.sides3.Location = new System.Drawing.Point(140, 83);
this.sides3.Name = "sides3";
this.sides3.Size = new System.Drawing.Size(24, 24);
this.sides3.TabIndex = 8;
this.sides3.UseVisualStyleBackColor = true;
this.sides3.Click += new System.EventHandler(this.sides3_Click);
//
// spikingmode
//
this.spikingmode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.spikingmode.FormattingEnabled = true;
this.spikingmode.Items.AddRange(new object[] {
"Spike outside, start spiked",
"Spike outside, start normal",
"Spike inside, start spiked",
"Spike inside, start normal",
"Spike zig-zag, start spiked",
"Spike gear, start spiked",
"Spike zig-zag, start normal",
"Spike gear, start normal",
"DrawEllipse behaviour, start spiked",
"DrawEllipse behaviour, start normal"});
this.spikingmode.Location = new System.Drawing.Point(18, 141);
this.spikingmode.Name = "spikingmode";
this.spikingmode.Size = new System.Drawing.Size(200, 21);
this.spikingmode.TabIndex = 7;
this.tooltip.SetToolTip(this.spikingmode, "Controls how spikes behave in relation to the Spikiness level.");
this.spikingmode.SelectedIndexChanged += new System.EventHandler(this.ValueChanged);
//
// frontoutside
//
this.frontoutside.AutoSize = true;
this.frontoutside.Location = new System.Drawing.Point(20, 63);
this.frontoutside.Name = "frontoutside";
this.frontoutside.Size = new System.Drawing.Size(159, 17);
this.frontoutside.TabIndex = 2;
this.frontoutside.Text = "Front Outside / Flip Linedefs";
this.tooltip.SetToolTip(this.frontoutside, "Shape linedefs will point outside when checked.\r\nIgnored if \"Create shape as..\" i" +
"s \"Vertices\" or \"Things\".");
this.frontoutside.UseVisualStyleBackColor = true;
this.frontoutside.CheckedChanged += new System.EventHandler(this.ValueChanged);
//
// spike0
//
this.spike0.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.DrawShapeSpike0;
this.spike0.Location = new System.Drawing.Point(140, 111);
this.spike0.Name = "spike0";
this.spike0.Size = new System.Drawing.Size(24, 24);
this.spike0.TabIndex = 11;
this.spike0.UseVisualStyleBackColor = true;
this.spike0.Click += new System.EventHandler(this.spike0_Click);
//
// ellipse
//
this.ellipse.AutoSize = true;
this.ellipse.Location = new System.Drawing.Point(20, 19);
this.ellipse.Name = "ellipse";
this.ellipse.Size = new System.Drawing.Size(56, 17);
this.ellipse.TabIndex = 0;
this.ellipse.Text = "Ellipse";
this.tooltip.SetToolTip(this.ellipse, "Shape can only be scaled in one axis when unchecked.\r\nThis also allows to be much" +
" easier to setup angles with the mouse.");
this.ellipse.UseVisualStyleBackColor = true;
this.ellipse.CheckedChanged += new System.EventHandler(this.ValueChanged);
//
// groupBox2
//
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox2.Controls.Add(this.sweepangle);
this.groupBox2.Controls.Add(this.startangle);
this.groupBox2.Controls.Add(this.limitanglequad);
this.groupBox2.Controls.Add(this.startanglewheel);
this.groupBox2.Controls.Add(this.sweepanglewheel);
this.groupBox2.Controls.Add(label4);
this.groupBox2.Controls.Add(label3);
this.groupBox2.Location = new System.Drawing.Point(3, 314);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(234, 200);
this.groupBox2.TabIndex = 3;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Adjustment / Slicing: ";
//
// sweepangle
//
this.sweepangle.AllowDecimal = true;
this.sweepangle.AllowNegative = false;
this.sweepangle.AllowRelative = false;
this.sweepangle.ButtonStep = 1;
this.sweepangle.ButtonStepBig = 45F;
this.sweepangle.ButtonStepFloat = 1F;
this.sweepangle.ButtonStepSmall = 3F;
this.sweepangle.ButtonStepsUseModifierKeys = true;
this.sweepangle.ButtonStepsWrapAround = false;
this.sweepangle.Location = new System.Drawing.Point(122, 40);
this.sweepangle.Name = "sweepangle";
this.sweepangle.Size = new System.Drawing.Size(96, 24);
this.sweepangle.StepValues = null;
this.sweepangle.TabIndex = 4;
this.sweepangle.WhenTextChanged += new System.EventHandler(this.sweepangle_WhenTextChanged);
//
// startangle
//
this.startangle.AllowDecimal = true;
this.startangle.AllowNegative = false;
this.startangle.AllowRelative = false;
this.startangle.ButtonStep = 1;
this.startangle.ButtonStepBig = 45F;
this.startangle.ButtonStepFloat = 1F;
this.startangle.ButtonStepSmall = 3F;
this.startangle.ButtonStepsUseModifierKeys = true;
this.startangle.ButtonStepsWrapAround = false;
this.startangle.Location = new System.Drawing.Point(18, 40);
this.startangle.Name = "startangle";
this.startangle.Size = new System.Drawing.Size(96, 24);
this.startangle.StepValues = null;
this.startangle.TabIndex = 1;
this.startangle.WhenTextChanged += new System.EventHandler(this.startangle_WhenTextChanged);
//
// limitanglequad
//
this.limitanglequad.AutoSize = true;
this.limitanglequad.Location = new System.Drawing.Point(20, 172);
this.limitanglequad.Name = "limitanglequad";
this.limitanglequad.Size = new System.Drawing.Size(176, 17);
this.limitanglequad.TabIndex = 6;
this.limitanglequad.Text = "Limit to one quadrant (Top-right)";
this.tooltip.SetToolTip(this.limitanglequad, "Locks start angle to top-right quadrant when checked.\r\nInternally the angle will " +
"automatically adjust based of which quadrant the mouse is in.");
this.limitanglequad.UseVisualStyleBackColor = true;
this.limitanglequad.CheckedChanged += new System.EventHandler(this.ValueChanged);
//
// startanglewheel
//
this.startanglewheel.AllowLoops = false;
this.startanglewheel.Angle = 0F;
this.startanglewheel.AngleOffset = 0F;
this.startanglewheel.Location = new System.Drawing.Point(19, 70);
this.startanglewheel.Name = "startanglewheel";
this.startanglewheel.Size = new System.Drawing.Size(96, 96);
this.startanglewheel.SnapAngle = 22.5F;
this.startanglewheel.TabIndex = 2;
this.startanglewheel.AngleChanged += new System.EventHandler(this.startanglewheel_AngleChanged);
//
// sweepanglewheel
//
this.sweepanglewheel.AllowLoops = false;
this.sweepanglewheel.Angle = 0F;
this.sweepanglewheel.AngleOffset = 0F;
this.sweepanglewheel.Location = new System.Drawing.Point(122, 70);
this.sweepanglewheel.Name = "sweepanglewheel";
this.sweepanglewheel.Size = new System.Drawing.Size(96, 96);
this.sweepanglewheel.SnapAngle = 22.5F;
this.sweepanglewheel.TabIndex = 5;
this.sweepanglewheel.AngleChanged += new System.EventHandler(this.sweepanglewheel_AngleChanged);
//
// previewreference
//
this.previewreference.AutoSize = true;
this.previewreference.Location = new System.Drawing.Point(23, 3);
this.previewreference.Name = "previewreference";
this.previewreference.Size = new System.Drawing.Size(112, 17);
this.previewreference.TabIndex = 0;
this.previewreference.Text = "Preview reference";
this.tooltip.SetToolTip(this.previewreference, "Visual only. \r\nThe reference circle will be shown on screen when checked.");
this.previewreference.UseVisualStyleBackColor = true;
this.previewreference.CheckedChanged += new System.EventHandler(this.ValueChanged);
//
// groupBox3
//
this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox3.Controls.Add(label5);
this.groupBox3.Controls.Add(this.firstpointtype);
this.groupBox3.Controls.Add(this.ellipse);
this.groupBox3.Location = new System.Drawing.Point(3, 26);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(234, 96);
this.groupBox3.TabIndex = 1;
this.groupBox3.TabStop = false;
this.groupBox3.Text = " Sizing: ";
//
// firstpointtype
//
this.firstpointtype.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.firstpointtype.FormattingEnabled = true;
this.firstpointtype.Items.AddRange(new object[] {
"Center towards Radius",
"Corner like DrawEllipse",
"Side/Corner towards Origin"});
this.firstpointtype.Location = new System.Drawing.Point(18, 55);
this.firstpointtype.Name = "firstpointtype";
this.firstpointtype.Size = new System.Drawing.Size(200, 21);
this.firstpointtype.TabIndex = 2;
this.tooltip.SetToolTip(this.firstpointtype, "Select how the shape will be placed in the map:\r\n* Starting from origin\r\n* Replic" +
"ate Draw Ellipse Mode behaviour\r\n* Side/corner into origin.");
this.firstpointtype.SelectedIndexChanged += new System.EventHandler(this.ValueChanged);
//
// tooltip
//
this.tooltip.AutoPopDelay = 10000;
this.tooltip.InitialDelay = 500;
this.tooltip.ReshowDelay = 100;
//
// DrawShapeOptionsPanel
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.previewreference);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Name = "DrawShapeOptionsPanel";
this.Size = new System.Drawing.Size(240, 516);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.CheckBox ellipse;
private System.Windows.Forms.Button spike0;
private GZBuilder.Controls.AngleControlF sweepanglewheel;
private GZBuilder.Controls.AngleControlF startanglewheel;
private System.Windows.Forms.CheckBox frontoutside;
private System.Windows.Forms.CheckBox previewreference;
private System.Windows.Forms.ComboBox spikingmode;
private System.Windows.Forms.Button sides24;
private System.Windows.Forms.Button sides8;
private System.Windows.Forms.Button sides3;
private System.Windows.Forms.Button spike50;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.ComboBox firstpointtype;
private System.Windows.Forms.CheckBox limitanglequad;
private System.Windows.Forms.ComboBox createas;
private System.Windows.Forms.ToolTip tooltip;
private Controls.ButtonsNumericTextbox sides;
private Controls.ButtonsNumericTextbox spikiness;
private Controls.ButtonsNumericTextbox startangle;
private Controls.ButtonsNumericTextbox sweepangle;
}
}

View file

@ -0,0 +1,150 @@
using System;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Geometry;
using CodeImp.DoomBuilder.Controls;
//JBR Draw Shape options panel
namespace CodeImp.DoomBuilder.BuilderModes
{
internal partial class DrawShapeOptionsPanel : UserControl
{
public event EventHandler OnValueChanged;
private bool blockEvents;
public bool PreviewReference { get { return previewreference.Checked; } set { blockEvents = true; previewreference.Checked = value; blockEvents = false; } }
public bool Ellipse { get { return ellipse.Checked; } set { blockEvents = true; ellipse.Checked = value; blockEvents = false; } }
public int FirstPointType { get { return firstpointtype.SelectedIndex; } set { blockEvents = true; firstpointtype.SelectedIndex = value; blockEvents = false; } }
public int CreateAs { get { return createas.SelectedIndex; } set { blockEvents = true; createas.SelectedIndex = value; blockEvents = false; } }
public bool FrontOutside { get { return frontoutside.Checked; } set { blockEvents = true; frontoutside.Checked = value; blockEvents = false; } }
public int Sides { get { return sides.GetResult(3); } set { blockEvents = true; SetValue(sides, value, 3, 1000); blockEvents = false; } }
public int Spikiness { get { return spikiness.GetResult(0); } set { blockEvents = true; SetValue(spikiness, value, 0, 32767); blockEvents = false; } }
public int SpikingMode { get { return spikingmode.SelectedIndex; } set { blockEvents = true; spikingmode.SelectedIndex = value; blockEvents = false; } }
public float StartAngle { get { return startangle.GetResultFloat(0f); } set { blockEvents = true; SetValue(startangle, value, 0f, 360f); blockEvents = false; } }
public float SweepAngle { get { return sweepangle.GetResultFloat(0f); } set { blockEvents = true; SetValue(sweepangle, value, 1f, 360f); blockEvents = false; } }
public bool LimitAngleQuad { get { return limitanglequad.Checked; } set { blockEvents = true; limitanglequad.Checked = value; blockEvents = false; } }
public DrawShapeOptionsPanel()
{
InitializeComponent();
spikingmode.SelectedIndex = 0;
firstpointtype.SelectedIndex = 0;
sides.Text = "3";
spikiness.Text = "0";
startangle.Text = "0";
sweepangle.Text = "360";
}
private void SetValue(ButtonsNumericTextbox component, int value, int min, int max)
{
if (value < min) value = min;
if (value > max) value = max;
component.Text = value.ToString();
}
private void SetValue(ButtonsNumericTextbox component, float value, float min, float max)
{
if (value < min) value = min;
if (value > max) value = max;
component.Text = value.ToString();
}
private void ValueChanged(object sender, EventArgs e)
{
if (!blockEvents && OnValueChanged != null) OnValueChanged(this, e);
}
private void sides_WhenTextChanged(object sender, EventArgs e)
{
int numsides = sides.GetResult(3);
if (numsides < 3)
sides.Text = "3";
if (numsides > 1024)
sides.Text = "1024";
ValueChanged(this, e);
}
private void spikiness_WhenTextChanged(object sender, EventArgs e)
{
int spikeperc = sides.GetResult(0);
if (spikeperc > 32767)
spikiness.Text = "32767";
ValueChanged(this, e);
}
private void startangle_WhenTextChanged(object sender, EventArgs e)
{
float angle = startangle.GetResultFloat(0f);
if (angle > 360f)
{
angle = 360f;
startangle.Text = "360";
}
startanglewheel.Angle = angle;
ValueChanged(this, e);
}
private void sweepangle_WhenTextChanged(object sender, EventArgs e)
{
float angle = sweepangle.GetResultFloat(0f);
if (angle < 1f)
{
angle = 1f;
sweepangle.Text = "1";
}
if (angle > 360f)
{
angle = 360f;
sweepangle.Text = "360";
}
sweepanglewheel.Angle = angle;
ValueChanged(this, e);
}
private void startanglewheel_AngleChanged(object sender, EventArgs e)
{
startangle.Text = startanglewheel.Angle.ToString();
ValueChanged(this, e);
}
private void sweepanglewheel_AngleChanged(object sender, EventArgs e)
{
float v = sweepanglewheel.Angle;
if (v < 0f) v = 0.1f;
if (v > 360f) v = 360f;
if (v == 0f) v = 360f;
sweepangle.Text = v.ToString();
ValueChanged(this, e);
}
private void sides3_Click(object sender, EventArgs e)
{
sides.Text = "3";
ValueChanged(this, e);
}
private void sides8_Click(object sender, EventArgs e)
{
sides.Text = "8";
ValueChanged(this, e);
}
private void sides24_Click(object sender, EventArgs e)
{
sides.Text = "24";
ValueChanged(this, e);
}
private void spike0_Click(object sender, EventArgs e)
{
spikiness.Text = "0";
ValueChanged(this, e);
}
private void spike50_Click(object sender, EventArgs e)
{
spikiness.Text = "50";
ValueChanged(this, e);
}
}
}

View file

@ -0,0 +1,141 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="label5.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="label6.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label2.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label1.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label4.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label3.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
</root>

View file

@ -41,6 +41,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.flipsidedefsitem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
this.curvelinedefsitem = new System.Windows.Forms.ToolStripMenuItem();
this.perpendicularVertexL = new System.Windows.Forms.ToolStripMenuItem();
this.perpendicularLinedefL = new System.Windows.Forms.ToolStripMenuItem();
this.parallelLinedefL = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripSeparator();
this.splitlinedefsitem = new System.Windows.Forms.ToolStripMenuItem();
this.updatelightfogitem = new System.Windows.Forms.ToolStripMenuItem();
@ -49,7 +52,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.alignFloorToBackItem = new System.Windows.Forms.ToolStripMenuItem();
this.alignCeilingToFrontItem = new System.Windows.Forms.ToolStripMenuItem();
this.alignCeilingToBackItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripMenuItem7 = new System.Windows.Forms.ToolStripSeparator();
this.selectSimilarLinesItem = new System.Windows.Forms.ToolStripMenuItem();
this.sectorsmenu = new System.Windows.Forms.ToolStripMenuItem();
this.placethingss = new System.Windows.Forms.ToolStripMenuItem();
@ -62,6 +65,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
this.makedooritem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
this.perpendicularVertexS = new System.Windows.Forms.ToolStripMenuItem();
this.perpendicularLinedefS = new System.Windows.Forms.ToolStripMenuItem();
this.parallelLinedefS = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem11 = new System.Windows.Forms.ToolStripSeparator();
this.selectSimilarSectors = new System.Windows.Forms.ToolStripMenuItem();
this.thingsmenu = new System.Windows.Forms.ToolStripMenuItem();
this.selectInSectorsItem = new System.Windows.Forms.ToolStripMenuItem();
@ -69,11 +76,17 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
this.alignToWallItem = new System.Windows.Forms.ToolStripMenuItem();
this.pointAtCursorItem = new System.Windows.Forms.ToolStripMenuItem();
this.vertexSlopeAssistT = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
this.selectSimilarThingsItem = new System.Windows.Forms.ToolStripMenuItem();
this.vertsmenu = new System.Windows.Forms.ToolStripMenuItem();
this.placethingsv = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
this.vertexIntoShapeV = new System.Windows.Forms.ToolStripMenuItem();
this.perpendicularVertexV = new System.Windows.Forms.ToolStripMenuItem();
this.perpendicularLinedefV = new System.Windows.Forms.ToolStripMenuItem();
this.parallelLinedefV = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem6 = new System.Windows.Forms.ToolStripSeparator();
this.selectSimilarVertsItem = new System.Windows.Forms.ToolStripMenuItem();
this.globalstrip = new System.Windows.Forms.ToolStrip();
this.manualstrip = new System.Windows.Forms.ToolStrip();
@ -99,6 +112,13 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.syncthingteditbutton = new System.Windows.Forms.ToolStripButton();
this.buttonAlignThingsToWall = new System.Windows.Forms.ToolStripButton();
this.buttonTextureOffsetLock = new System.Windows.Forms.ToolStripButton();
this.buttonPlaceThings = new System.Windows.Forms.ToolStripButton();
this.buttonPointAtCursor = new System.Windows.Forms.ToolStripButton();
this.buttonPerpendicularVertex = new System.Windows.Forms.ToolStripButton();
this.buttonPerpendicularLinedef = new System.Windows.Forms.ToolStripButton();
this.buttonVertexIntoShape = new System.Windows.Forms.ToolStripButton();
this.buttonParallelLinedef = new System.Windows.Forms.ToolStripButton();
this.buttonVertexSlopeAssist = new System.Windows.Forms.ToolStripButton();
this.fileMenuStrip = new System.Windows.Forms.MenuStrip();
this.exportStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripMenuItem();
@ -138,11 +158,14 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.flipsidedefsitem,
this.toolStripMenuItem1,
this.curvelinedefsitem,
this.perpendicularVertexL,
this.perpendicularLinedefL,
this.parallelLinedefL,
this.toolStripMenuItem3,
this.splitlinedefsitem,
this.updatelightfogitem,
this.aligntexturesitem,
this.toolStripSeparator5,
this.toolStripMenuItem7,
this.selectSimilarLinesItem});
this.linedefsmenu.Name = "linedefsmenu";
this.linedefsmenu.Size = new System.Drawing.Size(63, 20);
@ -168,8 +191,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.syncthingeditlinedefsitem.Tag = "syncedthingedit";
this.syncthingeditlinedefsitem.Text = "&Synchronized Things Editing";
this.syncthingeditlinedefsitem.ToolTipText = "When enabled, selected things will be dragged when dragging linedefs.\r\nRectangula" +
"r selection will also select things (holding Alt while selecting \r\ninverts this " +
"behaviour).";
"r selection will also select things (holding Alt while selecting \r\ninverts this " +
"behaviour).";
this.syncthingeditlinedefsitem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// toolStripSeparator2
@ -230,6 +253,33 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.curvelinedefsitem.Text = "&Curve Linedefs...";
this.curvelinedefsitem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// perpendicularVertexL
//
this.perpendicularVertexL.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.PerpendicularVertex;
this.perpendicularVertexL.Name = "perpendicularVertexL";
this.perpendicularVertexL.Size = new System.Drawing.Size(224, 22);
this.perpendicularVertexL.Tag = "perpendicularvertex";
this.perpendicularVertexL.Text = "Perpendicular Vertex...";
this.perpendicularVertexL.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// perpendicularLinedefL
//
this.perpendicularLinedefL.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.PerpendicularLinedef;
this.perpendicularLinedefL.Name = "perpendicularLinedefL";
this.perpendicularLinedefL.Size = new System.Drawing.Size(224, 22);
this.perpendicularLinedefL.Tag = "perpendicularlinedef";
this.perpendicularLinedefL.Text = "Perpendicular Linedef...";
this.perpendicularLinedefL.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// parallelLinedefL
//
this.parallelLinedefL.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.ParallelLinedef;
this.parallelLinedefL.Name = "parallelLinedefL";
this.parallelLinedefL.Size = new System.Drawing.Size(224, 22);
this.parallelLinedefL.Tag = "parallellinedef";
this.parallelLinedefL.Text = "Parallel Linedef...";
this.parallelLinedefL.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// toolStripMenuItem3
//
this.toolStripMenuItem3.Name = "toolStripMenuItem3";
@ -294,10 +344,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.alignCeilingToBackItem.Text = "Ceiling to Back Side";
this.alignCeilingToBackItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// toolStripSeparator5
// toolStripMenuItem7
//
this.toolStripSeparator5.Name = "toolStripSeparator5";
this.toolStripSeparator5.Size = new System.Drawing.Size(221, 6);
this.toolStripMenuItem7.Name = "toolStripMenuItem7";
this.toolStripMenuItem7.Size = new System.Drawing.Size(221, 6);
//
// selectSimilarLinesItem
//
@ -321,6 +371,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.toolStripSeparator8,
this.makedooritem,
this.toolStripSeparator4,
this.perpendicularVertexS,
this.perpendicularLinedefS,
this.parallelLinedefS,
this.toolStripMenuItem11,
this.selectSimilarSectors});
this.sectorsmenu.Name = "sectorsmenu";
this.sectorsmenu.Size = new System.Drawing.Size(57, 20);
@ -404,6 +458,38 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.toolStripSeparator4.Size = new System.Drawing.Size(221, 6);
this.toolStripSeparator4.Visible = false;
//
// perpendicularVertexS
//
this.perpendicularVertexS.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.PerpendicularVertex;
this.perpendicularVertexS.Name = "perpendicularVertexS";
this.perpendicularVertexS.Size = new System.Drawing.Size(224, 22);
this.perpendicularVertexS.Tag = "perpendicularvertex";
this.perpendicularVertexS.Text = "Perpendicular Vertex...";
this.perpendicularVertexS.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// perpendicularLinedefS
//
this.perpendicularLinedefS.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.PerpendicularLinedef;
this.perpendicularLinedefS.Name = "perpendicularLinedefS";
this.perpendicularLinedefS.Size = new System.Drawing.Size(224, 22);
this.perpendicularLinedefS.Tag = "perpendicularlinedef";
this.perpendicularLinedefS.Text = "Perpendicular Linedef...";
this.perpendicularLinedefS.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// parallelLinedefS
//
this.parallelLinedefS.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.ParallelLinedef;
this.parallelLinedefS.Name = "parallelLinedefS";
this.parallelLinedefS.Size = new System.Drawing.Size(224, 22);
this.parallelLinedefS.Tag = "parallellinedef";
this.parallelLinedefS.Text = "Parallel Linedef...";
this.parallelLinedefS.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// toolStripMenuItem11
//
this.toolStripMenuItem11.Name = "toolStripMenuItem11";
this.toolStripMenuItem11.Size = new System.Drawing.Size(221, 6);
//
// selectSimilarSectors
//
this.selectSimilarSectors.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Similar;
@ -421,6 +507,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.toolStripSeparator3,
this.alignToWallItem,
this.pointAtCursorItem,
this.vertexSlopeAssistT,
this.toolStripSeparator6,
this.selectSimilarThingsItem});
this.thingsmenu.Name = "thingsmenu";
@ -469,6 +556,15 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.pointAtCursorItem.Text = "&Point to Cursor";
this.pointAtCursorItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// vertexSlopeAssistT
//
this.vertexSlopeAssistT.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.VertexSlope;
this.vertexSlopeAssistT.Name = "vertexSlopeAssistT";
this.vertexSlopeAssistT.Size = new System.Drawing.Size(245, 22);
this.vertexSlopeAssistT.Tag = "vertexslopeassist";
this.vertexSlopeAssistT.Text = "Vertex Slope Assistant (SRB2)...";
this.vertexSlopeAssistT.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// toolStripSeparator6
//
this.toolStripSeparator6.Name = "toolStripSeparator6";
@ -488,6 +584,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.vertsmenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.placethingsv,
this.toolStripSeparator7,
this.vertexIntoShapeV,
this.perpendicularVertexV,
this.perpendicularLinedefV,
this.parallelLinedefV,
this.toolStripMenuItem6,
this.selectSimilarVertsItem});
this.vertsmenu.Name = "vertsmenu";
this.vertsmenu.Size = new System.Drawing.Size(60, 20);
@ -498,7 +599,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
//
this.placethingsv.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.PlaceThings;
this.placethingsv.Name = "placethingsv";
this.placethingsv.Size = new System.Drawing.Size(153, 22);
this.placethingsv.Size = new System.Drawing.Size(198, 22);
this.placethingsv.Tag = "placethings";
this.placethingsv.Text = "&Place Things...";
this.placethingsv.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -506,13 +607,54 @@ namespace CodeImp.DoomBuilder.BuilderModes
// toolStripSeparator7
//
this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(150, 6);
this.toolStripSeparator7.Size = new System.Drawing.Size(195, 6);
//
// vertexIntoShapeV
//
this.vertexIntoShapeV.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.VertexIntoShape;
this.vertexIntoShapeV.Name = "vertexIntoShapeV";
this.vertexIntoShapeV.Size = new System.Drawing.Size(198, 22);
this.vertexIntoShapeV.Tag = "vertexintoshape";
this.vertexIntoShapeV.Text = "Vertex into Shape...";
this.vertexIntoShapeV.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// perpendicularVertexV
//
this.perpendicularVertexV.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.PerpendicularVertex;
this.perpendicularVertexV.Name = "perpendicularVertexV";
this.perpendicularVertexV.Size = new System.Drawing.Size(198, 22);
this.perpendicularVertexV.Tag = "perpendicularvertex";
this.perpendicularVertexV.Text = "Perpendicular Vertex...";
this.perpendicularVertexV.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// perpendicularLinedefV
//
this.perpendicularLinedefV.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.PerpendicularLinedef;
this.perpendicularLinedefV.Name = "perpendicularLinedefV";
this.perpendicularLinedefV.Size = new System.Drawing.Size(198, 22);
this.perpendicularLinedefV.Tag = "perpendicularlinedef";
this.perpendicularLinedefV.Text = "Perpendicular Linedef...";
this.perpendicularLinedefV.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// parallelLinedefV
//
this.parallelLinedefV.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.ParallelLinedef;
this.parallelLinedefV.Name = "parallelLinedefV";
this.parallelLinedefV.Size = new System.Drawing.Size(198, 22);
this.parallelLinedefV.Tag = "parallellinedef";
this.parallelLinedefV.Text = "Parallel Linedef...";
this.parallelLinedefV.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// toolStripMenuItem6
//
this.toolStripMenuItem6.Name = "toolStripMenuItem6";
this.toolStripMenuItem6.Size = new System.Drawing.Size(195, 6);
//
// selectSimilarVertsItem
//
this.selectSimilarVertsItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Similar;
this.selectSimilarVertsItem.Name = "selectSimilarVertsItem";
this.selectSimilarVertsItem.Size = new System.Drawing.Size(153, 22);
this.selectSimilarVertsItem.Size = new System.Drawing.Size(198, 22);
this.selectSimilarVertsItem.Tag = "selectsimilar";
this.selectSimilarVertsItem.Text = "Select Similar...";
this.selectSimilarVertsItem.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -549,7 +691,14 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.buttonMarqueSelectTouching,
this.syncthingteditbutton,
this.buttonAlignThingsToWall,
this.buttonTextureOffsetLock});
this.buttonTextureOffsetLock,
this.buttonPlaceThings,
this.buttonPointAtCursor,
this.buttonPerpendicularVertex,
this.buttonPerpendicularLinedef,
this.buttonVertexIntoShape,
this.buttonParallelLinedef,
this.buttonVertexSlopeAssist});
this.manualstrip.Location = new System.Drawing.Point(0, 73);
this.manualstrip.Name = "manualstrip";
this.manualstrip.Size = new System.Drawing.Size(794, 25);
@ -739,7 +888,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.buttonMarqueSelectTouching.Size = new System.Drawing.Size(23, 22);
this.buttonMarqueSelectTouching.Text = "Select Touching";
this.buttonMarqueSelectTouching.ToolTipText = "Toggle between \"select touching\" and \"select inside\"\r\nrectangular selection modes" +
"";
"";
this.buttonMarqueSelectTouching.Click += new System.EventHandler(this.buttonMarqueSelectTouching_Click);
//
// syncthingteditbutton
@ -774,9 +923,91 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.buttonTextureOffsetLock.Name = "buttonTextureOffsetLock";
this.buttonTextureOffsetLock.Size = new System.Drawing.Size(23, 22);
this.buttonTextureOffsetLock.ToolTipText = "Pin Texture Offsets.\r\nWhen enabled, keeps floor and ceiling texture offsets\r\ncons" +
"tant while sector is dragged";
"tant while sector is dragged";
this.buttonTextureOffsetLock.Click += new System.EventHandler(this.buttonTextureOffsetLock_Click);
//
// buttonPlaceThings
//
this.buttonPlaceThings.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.buttonPlaceThings.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.PlaceThings;
this.buttonPlaceThings.ImageTransparentColor = System.Drawing.Color.Magenta;
this.buttonPlaceThings.Name = "buttonPlaceThings";
this.buttonPlaceThings.Size = new System.Drawing.Size(23, 22);
this.buttonPlaceThings.Tag = "placethings";
this.buttonPlaceThings.Text = "Place Things...";
this.buttonPlaceThings.ToolTipText = "Place Things on each vertex.";
this.buttonPlaceThings.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// buttonPointAtCursor
//
this.buttonPointAtCursor.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.buttonPointAtCursor.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.ThingPointAtCursor;
this.buttonPointAtCursor.ImageTransparentColor = System.Drawing.Color.Magenta;
this.buttonPointAtCursor.Name = "buttonPointAtCursor";
this.buttonPointAtCursor.Size = new System.Drawing.Size(23, 22);
this.buttonPointAtCursor.Tag = "thinglookatcursor";
this.buttonPointAtCursor.Text = "Points selected things to cursor position. Hold Ctrl to point away from cursor.";
this.buttonPointAtCursor.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// buttonPerpendicularVertex
//
this.buttonPerpendicularVertex.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.buttonPerpendicularVertex.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.PerpendicularVertex;
this.buttonPerpendicularVertex.ImageTransparentColor = System.Drawing.Color.Magenta;
this.buttonPerpendicularVertex.Name = "buttonPerpendicularVertex";
this.buttonPerpendicularVertex.Size = new System.Drawing.Size(23, 22);
this.buttonPerpendicularVertex.Tag = "perpendicularvertex";
this.buttonPerpendicularVertex.Text = "Perpendicular Tool";
this.buttonPerpendicularVertex.ToolTipText = "Create perpendicular from selected vertices.";
this.buttonPerpendicularVertex.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// buttonPerpendicularLinedef
//
this.buttonPerpendicularLinedef.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.buttonPerpendicularLinedef.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.PerpendicularLinedef;
this.buttonPerpendicularLinedef.ImageTransparentColor = System.Drawing.Color.Magenta;
this.buttonPerpendicularLinedef.Name = "buttonPerpendicularLinedef";
this.buttonPerpendicularLinedef.Size = new System.Drawing.Size(23, 20);
this.buttonPerpendicularLinedef.Tag = "perpendicularlinedef";
this.buttonPerpendicularLinedef.Text = "Perpendicular Linedef";
this.buttonPerpendicularLinedef.ToolTipText = "Create perpendicular from selected linedefs.";
this.buttonPerpendicularLinedef.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// buttonVertexIntoShape
//
this.buttonVertexIntoShape.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.buttonVertexIntoShape.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.VertexIntoShape;
this.buttonVertexIntoShape.ImageTransparentColor = System.Drawing.Color.Magenta;
this.buttonVertexIntoShape.Name = "buttonVertexIntoShape";
this.buttonVertexIntoShape.Size = new System.Drawing.Size(23, 20);
this.buttonVertexIntoShape.Tag = "vertexintoshape";
this.buttonVertexIntoShape.Text = "Vertex into Shape...";
this.buttonVertexIntoShape.ToolTipText = "Create shapes for each selected vertex.";
this.buttonVertexIntoShape.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// buttonParallelLinedef
//
this.buttonParallelLinedef.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.buttonParallelLinedef.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.ParallelLinedef;
this.buttonParallelLinedef.ImageTransparentColor = System.Drawing.Color.Magenta;
this.buttonParallelLinedef.Name = "buttonParallelLinedef";
this.buttonParallelLinedef.Size = new System.Drawing.Size(23, 20);
this.buttonParallelLinedef.Tag = "parallellinedef";
this.buttonParallelLinedef.Text = "Parallel Linedef...";
this.buttonParallelLinedef.ToolTipText = "Create parallel linedefs from selected linedefs.";
this.buttonParallelLinedef.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// buttonVertexSlopeAssist
//
this.buttonVertexSlopeAssist.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.buttonVertexSlopeAssist.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.VertexSlope;
this.buttonVertexSlopeAssist.ImageTransparentColor = System.Drawing.Color.Magenta;
this.buttonVertexSlopeAssist.Name = "buttonVertexSlopeAssist";
this.buttonVertexSlopeAssist.Size = new System.Drawing.Size(23, 20);
this.buttonVertexSlopeAssist.Tag = "vertexslopeassist";
this.buttonVertexSlopeAssist.Text = "Vertex Slope Assistant (SRB2)";
this.buttonVertexSlopeAssist.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// fileMenuStrip
//
this.fileMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -935,8 +1166,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
private System.Windows.Forms.ToolStripMenuItem exportStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem5;
private System.Windows.Forms.ToolStripButton buttonpastepropertiesoptions;
private System.Windows.Forms.ToolStripMenuItem filterSelectionItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;
private System.Windows.Forms.ToolStripMenuItem filterSelectionItem;
private System.Windows.Forms.ToolStripMenuItem selectSimilarLinesItem;
private System.Windows.Forms.ToolStripMenuItem selectSimilarSectors;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator6;
@ -954,6 +1184,27 @@ namespace CodeImp.DoomBuilder.BuilderModes
private System.Windows.Forms.ToolStripMenuItem itemcopyprops;
private System.Windows.Forms.ToolStripMenuItem itempasteprops;
private System.Windows.Forms.ToolStripMenuItem itempastepropsoptions;
private System.Windows.Forms.ToolStripSeparator separatorcopyprops;
private System.Windows.Forms.ToolStripSeparator separatorcopyprops;
private System.Windows.Forms.ToolStripButton buttonPerpendicularLinedef;
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem7;
private System.Windows.Forms.ToolStripMenuItem perpendicularLinedefL;
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem6;
private System.Windows.Forms.ToolStripButton buttonPlaceThings;
private System.Windows.Forms.ToolStripButton buttonVertexIntoShape;
private System.Windows.Forms.ToolStripMenuItem vertexIntoShapeV;
private System.Windows.Forms.ToolStripButton buttonPerpendicularVertex;
private System.Windows.Forms.ToolStripMenuItem perpendicularVertexL;
private System.Windows.Forms.ToolStripMenuItem perpendicularVertexV;
private System.Windows.Forms.ToolStripMenuItem parallelLinedefL;
private System.Windows.Forms.ToolStripButton buttonParallelLinedef;
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem11;
private System.Windows.Forms.ToolStripMenuItem parallelLinedefS;
private System.Windows.Forms.ToolStripMenuItem perpendicularLinedefS;
private System.Windows.Forms.ToolStripMenuItem perpendicularVertexS;
private System.Windows.Forms.ToolStripMenuItem perpendicularLinedefV;
private System.Windows.Forms.ToolStripMenuItem parallelLinedefV;
private System.Windows.Forms.ToolStripButton buttonPointAtCursor;
private System.Windows.Forms.ToolStripButton buttonVertexSlopeAssist;
private System.Windows.Forms.ToolStripMenuItem vertexSlopeAssistT;
}
}

View file

@ -89,6 +89,14 @@ namespace CodeImp.DoomBuilder.BuilderModes
public ToolStripMenuItem SyncronizeThingEditSectorsItem { get { return syncthingeditsectorsitem; } } //mxd
public ToolStripMenuItem SyncronizeThingEditLinedefsItem { get { return syncthingeditlinedefsitem; } } //mxd
public ToolStripButton MakeDoor { get { return buttonMakeDoor; } } //mxd
public ToolStripButton PlaceThings { get { return buttonPlaceThings; } } //JBR
public ToolStripButton PointAtCursor { get { return buttonPointAtCursor; } } //JBR
public ToolStripButton PerpendicularVertex { get { return buttonPerpendicularVertex; } } //JBR
public ToolStripButton PerpendicularLinedef { get { return buttonPerpendicularLinedef; } } //JBR
public ToolStripButton ParallelLinedef { get { return buttonParallelLinedef; } } //JBR
public ToolStripButton VertexIntoShape { get { return buttonVertexIntoShape; } } //JBR
public ToolStripButton VertexSlopeAssist { get { return buttonVertexSlopeAssist; } } //JBR
public ToolStripMenuItem VertexSlopeAssistMenu { get { return vertexSlopeAssistT; } } //JBR
#endregion

View file

@ -117,30 +117,30 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="menustrip.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="menustrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="menustrip.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="syncthingeditsectorsitem.ToolTipText" xml:space="preserve">
<value>When enabled, things dragging will be synchronized to sector dragging.
Regular, Paint and Rectangular selection will also select things
(holding Alt while selecting inverts this behaviour).
Deleting sectors will also delete selected things.</value>
</data>
<metadata name="globalstrip.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="globalstrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>118, 17</value>
</metadata>
<metadata name="manualstrip.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="globalstrip.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="manualstrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>210, 17</value>
</metadata>
<metadata name="manualstrip.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="fileMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>326, 17</value>
</metadata>

View file

@ -0,0 +1,222 @@
namespace CodeImp.DoomBuilder.BuilderModes.Interface
{
partial class ParallelLinedefForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.Label label1;
System.Windows.Forms.Label label2;
this.cancel = new System.Windows.Forms.Button();
this.apply = new System.Windows.Forms.Button();
this.closeopenpath = new System.Windows.Forms.CheckBox();
this.backwards = new System.Windows.Forms.CheckBox();
this.createas = new System.Windows.Forms.ComboBox();
this.numopentracks = new System.Windows.Forms.Label();
this.numclosetracks = new System.Windows.Forms.Label();
this.distance = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.tooltip = new System.Windows.Forms.ToolTip();
label1 = new System.Windows.Forms.Label();
label2 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// label1
//
label1.AutoSize = true;
label1.Location = new System.Drawing.Point(22, 54);
label1.Name = "label1";
label1.Size = new System.Drawing.Size(52, 13);
label1.TabIndex = 2;
label1.Text = "Distance:";
this.tooltip.SetToolTip(label1, "Set the distance between selected linedef(s) and parallel linedef(s).\r\n");
//
// label2
//
label2.AutoSize = true;
label2.Location = new System.Drawing.Point(22, 9);
label2.Name = "label2";
label2.Size = new System.Drawing.Size(61, 13);
label2.TabIndex = 0;
label2.Text = "Create as...";
this.tooltip.SetToolTip(label2, "Select which type of elements to create.\r\nCheck help (F1) for more information.");
//
// cancel
//
this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancel.Location = new System.Drawing.Point(89, 163);
this.cancel.Name = "cancel";
this.cancel.Size = new System.Drawing.Size(70, 25);
this.cancel.TabIndex = 9;
this.cancel.Text = "Cancel";
this.cancel.UseVisualStyleBackColor = true;
this.cancel.Click += new System.EventHandler(this.cancel_Click);
//
// apply
//
this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.apply.DialogResult = System.Windows.Forms.DialogResult.OK;
this.apply.Location = new System.Drawing.Point(12, 163);
this.apply.Name = "apply";
this.apply.Size = new System.Drawing.Size(70, 25);
this.apply.TabIndex = 8;
this.apply.Text = "OK";
this.apply.UseVisualStyleBackColor = true;
this.apply.Click += new System.EventHandler(this.apply_Click);
//
// closeopenpath
//
this.closeopenpath.AutoSize = true;
this.closeopenpath.Checked = true;
this.closeopenpath.CheckState = System.Windows.Forms.CheckState.Checked;
this.closeopenpath.Location = new System.Drawing.Point(20, 80);
this.closeopenpath.Name = "closeopenpath";
this.closeopenpath.Size = new System.Drawing.Size(133, 17);
this.closeopenpath.TabIndex = 4;
this.closeopenpath.Text = "Close Open-Path Ends";
this.tooltip.SetToolTip(this.closeopenpath, "Attach linedefs between original paths and open-paths at both ends.\r\nOnly availab" +
"le for linedefs elements and doesn\'t affect close-paths.");
this.closeopenpath.UseVisualStyleBackColor = true;
this.closeopenpath.CheckedChanged += new System.EventHandler(this.ValueChanged);
//
// backwards
//
this.backwards.AutoSize = true;
this.backwards.Location = new System.Drawing.Point(20, 103);
this.backwards.Name = "backwards";
this.backwards.Size = new System.Drawing.Size(126, 17);
this.backwards.TabIndex = 5;
this.backwards.Text = "Backwards / Outside";
this.tooltip.SetToolTip(this.backwards, "When checked, it creates parallel path on the opposite side.");
this.backwards.UseVisualStyleBackColor = true;
this.backwards.CheckedChanged += new System.EventHandler(this.ValueChanged);
//
// createas
//
this.createas.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.createas.FormattingEnabled = true;
this.createas.Items.AddRange(new object[] {
"Linked Linedefs",
"Unlinked Linedefs",
"Vertices",
"Things"});
this.createas.Location = new System.Drawing.Point(12, 25);
this.createas.Name = "createas";
this.createas.Size = new System.Drawing.Size(146, 21);
this.createas.TabIndex = 1;
this.tooltip.SetToolTip(this.createas, "Select which type of element to create.\r\nCheck help (F1) for more information.");
this.createas.SelectedIndexChanged += new System.EventHandler(this.ValueChanged);
//
// numopentracks
//
this.numopentracks.AutoSize = true;
this.numopentracks.Location = new System.Drawing.Point(12, 128);
this.numopentracks.Name = "numopentracks";
this.numopentracks.Size = new System.Drawing.Size(78, 13);
this.numopentracks.TabIndex = 6;
this.numopentracks.Text = "0 Open-Path(s)";
this.tooltip.SetToolTip(this.numopentracks, "Number of open-paths found.");
//
// numclosetracks
//
this.numclosetracks.AutoSize = true;
this.numclosetracks.Location = new System.Drawing.Point(12, 142);
this.numclosetracks.Name = "numclosetracks";
this.numclosetracks.Size = new System.Drawing.Size(78, 13);
this.numclosetracks.TabIndex = 7;
this.numclosetracks.Text = "0 Close-Path(s)";
this.tooltip.SetToolTip(this.numclosetracks, "Number of close-paths found.");
//
// distance
//
this.distance.AllowDecimal = false;
this.distance.AllowNegative = false;
this.distance.AllowRelative = false;
this.distance.ButtonStep = 8;
this.distance.ButtonStepBig = 64F;
this.distance.ButtonStepFloat = 1F;
this.distance.ButtonStepSmall = 1F;
this.distance.ButtonStepsUseModifierKeys = true;
this.distance.ButtonStepsWrapAround = false;
this.distance.Location = new System.Drawing.Point(80, 49);
this.distance.Name = "distance";
this.distance.Size = new System.Drawing.Size(72, 24);
this.distance.StepValues = null;
this.distance.TabIndex = 3;
this.distance.WhenTextChanged += new System.EventHandler(this.ValueChanged);
//
// tooltip
//
this.tooltip.AutoPopDelay = 10000;
this.tooltip.InitialDelay = 500;
this.tooltip.ReshowDelay = 100;
//
// ParallelLinedefForm
//
this.AcceptButton = this.apply;
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.CancelButton = this.cancel;
this.ClientSize = new System.Drawing.Size(170, 200);
this.Controls.Add(this.distance);
this.Controls.Add(this.numclosetracks);
this.Controls.Add(this.numopentracks);
this.Controls.Add(this.createas);
this.Controls.Add(label2);
this.Controls.Add(this.backwards);
this.Controls.Add(this.closeopenpath);
this.Controls.Add(label1);
this.Controls.Add(this.cancel);
this.Controls.Add(this.apply);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ParallelLinedefForm";
this.Opacity = 1D;
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "Parallel (Linedef)";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ParallelLinedefForm_FormClosing);
this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.ParallelLinedefForm_HelpRequested);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button cancel;
private System.Windows.Forms.Button apply;
private System.Windows.Forms.CheckBox closeopenpath;
private System.Windows.Forms.CheckBox backwards;
private System.Windows.Forms.ComboBox createas;
private System.Windows.Forms.Label numopentracks;
private System.Windows.Forms.Label numclosetracks;
private Controls.ButtonsNumericTextbox distance;
private System.Windows.Forms.ToolTip tooltip;
}
}

View file

@ -0,0 +1,124 @@
#region ================== Namespaces
using System;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Windows;
using CodeImp.DoomBuilder.Geometry;
using System.Drawing;
#endregion
//JBR Parallel Linedef form
namespace CodeImp.DoomBuilder.BuilderModes.Interface
{
public partial class ParallelLinedefForm : DelayedForm
{
#region ================== Properties
private bool blockEvents;
public int CreateAs { get { return createas.SelectedIndex; } }
public float Distance { get { return distance.GetResultFloat(0); } }
public bool CloseOpenPath { get { return closeopenpath.Checked; } }
public bool Backwards { get { return backwards.Checked; } }
#endregion
#region ================== Constructor / Disposer
public ParallelLinedefForm()
{
InitializeComponent();
blockEvents = true;
createas.SelectedIndex = 0;
distance.Text = "256";
blockEvents = false;
}
#endregion
#region ================== Interface
public void SetNumOpenPaths(int paths)
{
if (paths == 0)
{
numopentracks.Text = "No Open-Paths";
numopentracks.ForeColor = SystemColors.GrayText;
closeopenpath.Enabled = false;
return;
}
numopentracks.ForeColor = SystemColors.ControlText;
closeopenpath.Enabled = true;
if (paths == 1)
numopentracks.Text = "1 Open-Path";
else
numopentracks.Text = paths.ToString() + " Open-Paths";
}
public void SetNumClosePaths(int paths)
{
if (paths == 0)
{
numclosetracks.Text = "No Close-Paths";
numclosetracks.ForeColor = SystemColors.GrayText;
return;
}
numclosetracks.ForeColor = SystemColors.ControlText;
if (paths == 1)
numclosetracks.Text = "1 Close-Path";
else
numclosetracks.Text = paths.ToString() + " Close-Paths";
}
// Window closing
private void ParallelLinedefForm_FormClosing(object sender, FormClosingEventArgs e)
{
// User closing the window?
if (e.CloseReason == CloseReason.UserClosing)
{
// Just cancel
General.Editing.CancelMode();
e.Cancel = true;
}
}
// This shows the window
public void Show(Form owner)
{
// Position at left-top of owner
this.Location = new Point(owner.Location.X + 20, owner.Location.Y + 90);
// Show window
base.Show(owner);
}
// Some value got changed
private void ValueChanged(object sender, EventArgs e)
{
if (!blockEvents) General.Interface.RedrawDisplay();
}
// Cancel clicked
private void cancel_Click(object sender, EventArgs e)
{
// Cancel now
General.Editing.CancelMode();
}
// Apply clicked
private void apply_Click(object sender, EventArgs e)
{
// Apply now
General.Editing.AcceptMode();
}
private void ParallelLinedefForm_HelpRequested(object sender, HelpEventArgs hlpevent)
{
General.ShowHelp("e_parallellinedef.html");
}
#endregion
}
}

View file

@ -0,0 +1,129 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="label1.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="label2.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
</root>

View file

@ -0,0 +1,253 @@
namespace CodeImp.DoomBuilder.BuilderModes.Interface
{
partial class PerpendicularLinedefForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.Label label1;
System.Windows.Forms.Label label2;
System.Windows.Forms.Label label4;
System.Windows.Forms.Label label3;
this.cancel = new System.Windows.Forms.Button();
this.apply = new System.Windows.Forms.Button();
this.backwards = new System.Windows.Forms.CheckBox();
this.createas = new System.Windows.Forms.ComboBox();
this.distance = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.tooltip = new System.Windows.Forms.ToolTip();
this.offsetperc = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.snapmp = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
label1 = new System.Windows.Forms.Label();
label2 = new System.Windows.Forms.Label();
label4 = new System.Windows.Forms.Label();
label3 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// label1
//
label1.AutoSize = true;
label1.Location = new System.Drawing.Point(22, 54);
label1.Name = "label1";
label1.Size = new System.Drawing.Size(52, 13);
label1.TabIndex = 2;
label1.Text = "Distance:";
this.tooltip.SetToolTip(label1, "Set distance between selected linedef(s) and the end of the perpendicular.");
//
// label2
//
label2.AutoSize = true;
label2.Location = new System.Drawing.Point(25, 80);
label2.Name = "label2";
label2.Size = new System.Drawing.Size(49, 13);
label2.TabIndex = 4;
label2.Text = "Offset %:";
this.tooltip.SetToolTip(label2, "Sets offset along each linedef of where the perpendicular should intersect.\r\n50% " +
"means exactly in the center.\r\nUse comma ( , ) for fractional numbers, e.g.: 12,5" +
"");
//
// label4
//
label4.AutoSize = true;
label4.Location = new System.Drawing.Point(17, 128);
label4.Name = "label4";
label4.Size = new System.Drawing.Size(57, 13);
label4.TabIndex = 7;
label4.Text = "Snap dist.:";
this.tooltip.SetToolTip(label4, "Adjust snap distance to vertices that already exist in the map so perpendiculars " +
"get connected to them.\r\nSet to zero to disable snapping.\r\nUse comma ( , ) for fr" +
"actional number, e.g.: 0,5");
//
// label3
//
label3.AutoSize = true;
label3.Location = new System.Drawing.Point(22, 9);
label3.Name = "label3";
label3.Size = new System.Drawing.Size(61, 13);
label3.TabIndex = 0;
label3.Text = "Create as...";
this.tooltip.SetToolTip(label3, "Select which type of elements to create.\r\nCheck help (F1) for more information.\r\n" +
"");
//
// cancel
//
this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancel.Location = new System.Drawing.Point(89, 155);
this.cancel.Name = "cancel";
this.cancel.Size = new System.Drawing.Size(70, 25);
this.cancel.TabIndex = 10;
this.cancel.Text = "Cancel";
this.cancel.UseVisualStyleBackColor = true;
this.cancel.Click += new System.EventHandler(this.cancel_Click);
//
// apply
//
this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.apply.DialogResult = System.Windows.Forms.DialogResult.OK;
this.apply.Location = new System.Drawing.Point(12, 155);
this.apply.Name = "apply";
this.apply.Size = new System.Drawing.Size(70, 25);
this.apply.TabIndex = 9;
this.apply.Text = "OK";
this.apply.UseVisualStyleBackColor = true;
this.apply.Click += new System.EventHandler(this.apply_Click);
//
// backwards
//
this.backwards.AutoSize = true;
this.backwards.Location = new System.Drawing.Point(20, 103);
this.backwards.Name = "backwards";
this.backwards.Size = new System.Drawing.Size(79, 17);
this.backwards.TabIndex = 6;
this.backwards.Text = "Backwards";
this.tooltip.SetToolTip(this.backwards, "When checked, it creates a perpendicular on the opposite side of where the linede" +
"fs are facing.");
this.backwards.UseVisualStyleBackColor = true;
this.backwards.CheckedChanged += new System.EventHandler(this.ValueChanged);
//
// createas
//
this.createas.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.createas.FormattingEnabled = true;
this.createas.Items.AddRange(new object[] {
"Linked Linedefs",
"Unlinked Linedefs",
"Vertices",
"Vertices with Linedef Split",
"Things"});
this.createas.Location = new System.Drawing.Point(12, 25);
this.createas.Name = "createas";
this.createas.Size = new System.Drawing.Size(146, 21);
this.createas.TabIndex = 1;
this.tooltip.SetToolTip(this.createas, "Select which type of elements to create.\r\nCheck help (F1) for more information.\r\n" +
"");
this.createas.SelectedIndexChanged += new System.EventHandler(this.ValueChanged);
//
// distance
//
this.distance.AllowDecimal = false;
this.distance.AllowNegative = false;
this.distance.AllowRelative = false;
this.distance.ButtonStep = 8;
this.distance.ButtonStepBig = 64F;
this.distance.ButtonStepFloat = 1F;
this.distance.ButtonStepSmall = 1F;
this.distance.ButtonStepsUseModifierKeys = true;
this.distance.ButtonStepsWrapAround = false;
this.distance.Location = new System.Drawing.Point(80, 49);
this.distance.Name = "distance";
this.distance.Size = new System.Drawing.Size(72, 24);
this.distance.StepValues = null;
this.distance.TabIndex = 3;
this.distance.WhenTextChanged += new System.EventHandler(this.ValueChanged);
//
// tooltip
//
this.tooltip.AutoPopDelay = 10000;
this.tooltip.InitialDelay = 500;
this.tooltip.ReshowDelay = 100;
//
// offsetperc
//
this.offsetperc.AllowDecimal = true;
this.offsetperc.AllowNegative = false;
this.offsetperc.AllowRelative = false;
this.offsetperc.ButtonStep = 5;
this.offsetperc.ButtonStepBig = 25F;
this.offsetperc.ButtonStepFloat = 1F;
this.offsetperc.ButtonStepSmall = 1F;
this.offsetperc.ButtonStepsUseModifierKeys = true;
this.offsetperc.ButtonStepsWrapAround = false;
this.offsetperc.Location = new System.Drawing.Point(80, 75);
this.offsetperc.Name = "offsetperc";
this.offsetperc.Size = new System.Drawing.Size(72, 24);
this.offsetperc.StepValues = null;
this.offsetperc.TabIndex = 5;
this.offsetperc.WhenTextChanged += new System.EventHandler(this.offsetperc_WhenTextChanged);
//
// snapmp
//
this.snapmp.AllowDecimal = true;
this.snapmp.AllowNegative = false;
this.snapmp.AllowRelative = false;
this.snapmp.ButtonStep = 1;
this.snapmp.ButtonStepBig = 1F;
this.snapmp.ButtonStepFloat = 1F;
this.snapmp.ButtonStepSmall = 0.1F;
this.snapmp.ButtonStepsUseModifierKeys = false;
this.snapmp.ButtonStepsWrapAround = false;
this.snapmp.Location = new System.Drawing.Point(80, 123);
this.snapmp.Name = "snapmp";
this.snapmp.Size = new System.Drawing.Size(72, 24);
this.snapmp.StepValues = null;
this.snapmp.TabIndex = 8;
//
// PerpendicularLinedefForm
//
this.AcceptButton = this.apply;
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.CancelButton = this.cancel;
this.ClientSize = new System.Drawing.Size(170, 192);
this.Controls.Add(this.snapmp);
this.Controls.Add(this.offsetperc);
this.Controls.Add(this.distance);
this.Controls.Add(label4);
this.Controls.Add(this.createas);
this.Controls.Add(label3);
this.Controls.Add(label2);
this.Controls.Add(this.backwards);
this.Controls.Add(label1);
this.Controls.Add(this.cancel);
this.Controls.Add(this.apply);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "PerpendicularLinedefForm";
this.Opacity = 1D;
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "Perpendicular (Linedef)";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.PerpendicularLinedefForm_FormClosing);
this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.PerpendicularLinedefForm_HelpRequested);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button cancel;
private System.Windows.Forms.Button apply;
private System.Windows.Forms.CheckBox backwards;
private System.Windows.Forms.ComboBox createas;
private Controls.ButtonsNumericTextbox distance;
private System.Windows.Forms.ToolTip tooltip;
private Controls.ButtonsNumericTextbox offsetperc;
private Controls.ButtonsNumericTextbox snapmp;
}
}

View file

@ -0,0 +1,103 @@
#region ================== Namespaces
using System;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Windows;
using CodeImp.DoomBuilder.Geometry;
using System.Drawing;
#endregion
//JBR Perpendicular Linedef form
namespace CodeImp.DoomBuilder.BuilderModes.Interface
{
public partial class PerpendicularLinedefForm : DelayedForm
{
#region ================== Properties
private bool blockEvents;
public int CreateAs { get { return createas.SelectedIndex; } }
public float Distance { get { return distance.GetResultFloat(0f); } }
public float OffsetPerc { get { return offsetperc.GetResultFloat(0f); } }
public bool Backwards { get { return backwards.Checked; } }
public float SnapMP { get { return snapmp.GetResultFloat(0f); } }
#endregion
#region ================== Constructor / Disposer
public PerpendicularLinedefForm()
{
InitializeComponent();
blockEvents = true;
createas.SelectedIndex = 0;
distance.Text = "256";
offsetperc.Text = "50";
snapmp.Text = "2";
blockEvents = false;
}
#endregion
#region ================== Interface
// Window closing
private void PerpendicularLinedefForm_FormClosing(object sender, FormClosingEventArgs e)
{
// User closing the window?
if (e.CloseReason == CloseReason.UserClosing)
{
// Just cancel
General.Editing.CancelMode();
e.Cancel = true;
}
}
// This shows the window
public void Show(Form owner)
{
// Position at left-top of owner
this.Location = new Point(owner.Location.X + 20, owner.Location.Y + 90);
// Show window
base.Show(owner);
}
// Some value got changed
private void ValueChanged(object sender, EventArgs e)
{
if (!blockEvents) General.Interface.RedrawDisplay();
}
private void offsetperc_WhenTextChanged(object sender, EventArgs e)
{
float perc = offsetperc.GetResultFloat(0f);
if (perc > 100f)
offsetperc.Text = "100";
ValueChanged(this, e);
}
// Cancel clicked
private void cancel_Click(object sender, EventArgs e)
{
// Cancel now
General.Editing.CancelMode();
}
// Apply clicked
private void apply_Click(object sender, EventArgs e)
{
// Apply now
General.Editing.AcceptMode();
}
private void PerpendicularLinedefForm_HelpRequested(object sender, HelpEventArgs hlpevent)
{
General.ShowHelp("e_perpendicularlinedef.html");
}
#endregion
}
}

View file

@ -0,0 +1,135 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="label1.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="label2.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label4.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label3.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
</root>

View file

@ -0,0 +1,232 @@
namespace CodeImp.DoomBuilder.BuilderModes.Interface
{
partial class PerpendicularVertexForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.Label label1;
System.Windows.Forms.Label label4;
System.Windows.Forms.Label label2;
this.cancel = new System.Windows.Forms.Button();
this.apply = new System.Windows.Forms.Button();
this.backwards = new System.Windows.Forms.CheckBox();
this.processtips = new System.Windows.Forms.CheckBox();
this.createas = new System.Windows.Forms.ComboBox();
this.distance = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.snapmp = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.tooltip = new System.Windows.Forms.ToolTip(this.components);
label1 = new System.Windows.Forms.Label();
label4 = new System.Windows.Forms.Label();
label2 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// label1
//
label1.AutoSize = true;
label1.Location = new System.Drawing.Point(22, 54);
label1.Name = "label1";
label1.Size = new System.Drawing.Size(52, 13);
label1.TabIndex = 2;
label1.Text = "Distance:";
this.tooltip.SetToolTip(label1, "Set distance between selected linedef(s) and the end of the perpendicular.");
//
// label4
//
label4.AutoSize = true;
label4.Location = new System.Drawing.Point(17, 128);
label4.Name = "label4";
label4.Size = new System.Drawing.Size(57, 13);
label4.TabIndex = 6;
label4.Text = "Snap dist.:";
this.tooltip.SetToolTip(label4, "Adjust snap distance to vertices that already exist in the map so perpendiculars " +
"get connected to them.\r\nSet to zero to disable snapping.\r\nUse comma ( , ) for fr" +
"actional number, e.g.: 0,5");
//
// label2
//
label2.AutoSize = true;
label2.Location = new System.Drawing.Point(22, 9);
label2.Name = "label2";
label2.Size = new System.Drawing.Size(61, 13);
label2.TabIndex = 0;
label2.Text = "Create as...";
this.tooltip.SetToolTip(label2, "Select which type of elements to create.\r\nCheck help (F1) for more information.");
//
// cancel
//
this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancel.Location = new System.Drawing.Point(89, 155);
this.cancel.Name = "cancel";
this.cancel.Size = new System.Drawing.Size(70, 25);
this.cancel.TabIndex = 9;
this.cancel.Text = "Cancel";
this.cancel.UseVisualStyleBackColor = true;
this.cancel.Click += new System.EventHandler(this.cancel_Click);
//
// apply
//
this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.apply.DialogResult = System.Windows.Forms.DialogResult.OK;
this.apply.Location = new System.Drawing.Point(12, 155);
this.apply.Name = "apply";
this.apply.Size = new System.Drawing.Size(70, 25);
this.apply.TabIndex = 8;
this.apply.Text = "OK";
this.apply.UseVisualStyleBackColor = true;
this.apply.Click += new System.EventHandler(this.apply_Click);
//
// backwards
//
this.backwards.AutoSize = true;
this.backwards.Location = new System.Drawing.Point(20, 103);
this.backwards.Name = "backwards";
this.backwards.Size = new System.Drawing.Size(79, 17);
this.backwards.TabIndex = 5;
this.backwards.Text = "Backwards";
this.tooltip.SetToolTip(this.backwards, "When checked, it creates a perpendicular on the opposite side of where the linede" +
"fs are facing.");
this.backwards.UseVisualStyleBackColor = true;
this.backwards.CheckedChanged += new System.EventHandler(this.ValueChanged);
//
// processtips
//
this.processtips.AutoSize = true;
this.processtips.Checked = true;
this.processtips.CheckState = System.Windows.Forms.CheckState.Checked;
this.processtips.Location = new System.Drawing.Point(20, 80);
this.processtips.Name = "processtips";
this.processtips.Size = new System.Drawing.Size(83, 17);
this.processtips.TabIndex = 4;
this.processtips.Text = "Process tips";
this.tooltip.SetToolTip(this.processtips, "When unchecked, vertices with only one linedef selected won\'t be processed.");
this.processtips.UseVisualStyleBackColor = true;
this.processtips.CheckedChanged += new System.EventHandler(this.ValueChanged);
//
// createas
//
this.createas.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.createas.FormattingEnabled = true;
this.createas.Items.AddRange(new object[] {
"Linked Linedefs",
"Unlinked Linedefs",
"Vertices",
"Things"});
this.createas.Location = new System.Drawing.Point(12, 25);
this.createas.Name = "createas";
this.createas.Size = new System.Drawing.Size(146, 21);
this.createas.TabIndex = 1;
this.tooltip.SetToolTip(this.createas, "Select which type of elements to create.\r\nCheck help (F1) for more information.");
this.createas.SelectedIndexChanged += new System.EventHandler(this.ValueChanged);
//
// distance
//
this.distance.AllowDecimal = false;
this.distance.AllowNegative = false;
this.distance.AllowRelative = false;
this.distance.ButtonStep = 8;
this.distance.ButtonStepBig = 64F;
this.distance.ButtonStepFloat = 1F;
this.distance.ButtonStepSmall = 1F;
this.distance.ButtonStepsUseModifierKeys = true;
this.distance.ButtonStepsWrapAround = false;
this.distance.Location = new System.Drawing.Point(80, 49);
this.distance.Name = "distance";
this.distance.Size = new System.Drawing.Size(72, 24);
this.distance.StepValues = null;
this.distance.TabIndex = 3;
this.distance.WhenTextChanged += new System.EventHandler(this.ValueChanged);
//
// snapmp
//
this.snapmp.AllowDecimal = true;
this.snapmp.AllowNegative = false;
this.snapmp.AllowRelative = false;
this.snapmp.ButtonStep = 1;
this.snapmp.ButtonStepBig = 1F;
this.snapmp.ButtonStepFloat = 1F;
this.snapmp.ButtonStepSmall = 1F;
this.snapmp.ButtonStepsUseModifierKeys = false;
this.snapmp.ButtonStepsWrapAround = false;
this.snapmp.Location = new System.Drawing.Point(80, 123);
this.snapmp.Name = "snapmp";
this.snapmp.Size = new System.Drawing.Size(72, 24);
this.snapmp.StepValues = null;
this.snapmp.TabIndex = 7;
//
// tooltip
//
this.tooltip.AutoPopDelay = 10000;
this.tooltip.InitialDelay = 500;
this.tooltip.ReshowDelay = 100;
//
// PerpendicularVertexForm
//
this.AcceptButton = this.apply;
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.CancelButton = this.cancel;
this.ClientSize = new System.Drawing.Size(170, 192);
this.Controls.Add(this.snapmp);
this.Controls.Add(this.distance);
this.Controls.Add(label4);
this.Controls.Add(this.createas);
this.Controls.Add(label2);
this.Controls.Add(this.processtips);
this.Controls.Add(this.backwards);
this.Controls.Add(label1);
this.Controls.Add(this.cancel);
this.Controls.Add(this.apply);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "PerpendicularVertexForm";
this.Opacity = 1D;
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "Perpendicular (Vertex)";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.PerpendicularVertexForm_FormClosing);
this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.PerpendicularVertexForm_HelpRequested);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button cancel;
private System.Windows.Forms.Button apply;
private System.Windows.Forms.CheckBox backwards;
private System.Windows.Forms.CheckBox processtips;
private System.Windows.Forms.ComboBox createas;
private Controls.ButtonsNumericTextbox distance;
private Controls.ButtonsNumericTextbox snapmp;
private System.Windows.Forms.ToolTip tooltip;
}
}

View file

@ -0,0 +1,94 @@
#region ================== Namespaces
using System;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Windows;
using CodeImp.DoomBuilder.Geometry;
using System.Drawing;
#endregion
//JBR Perpendicular Linedef form
namespace CodeImp.DoomBuilder.BuilderModes.Interface
{
public partial class PerpendicularVertexForm : DelayedForm
{
#region ================== Properties
private bool blockEvents;
public int CreateAs { get { return createas.SelectedIndex; } }
public float Distance { get { return distance.GetResultFloat(0f); } }
public bool ProcessTips { get { return processtips.Checked; } }
public bool Backwards { get { return backwards.Checked; } }
public float SnapMP { get { return snapmp.GetResultFloat(0f); } }
#endregion
#region ================== Constructor / Disposer
public PerpendicularVertexForm()
{
InitializeComponent();
blockEvents = true;
createas.SelectedIndex = 0;
distance.Text = "256";
snapmp.Text = "2";
blockEvents = false;
}
#endregion
#region ================== Interface
// Window closing
private void PerpendicularVertexForm_FormClosing(object sender, FormClosingEventArgs e)
{
// User closing the window?
if (e.CloseReason == CloseReason.UserClosing)
{
// Just cancel
General.Editing.CancelMode();
e.Cancel = true;
}
}
// This shows the window
public void Show(Form owner)
{
// Position at left-top of owner
this.Location = new Point(owner.Location.X + 20, owner.Location.Y + 90);
// Show window
base.Show(owner);
}
// Some value got changed
private void ValueChanged(object sender, EventArgs e)
{
if (!blockEvents) General.Interface.RedrawDisplay();
}
// Cancel clicked
private void cancel_Click(object sender, EventArgs e)
{
// Cancel now
General.Editing.CancelMode();
}
// Apply clicked
private void apply_Click(object sender, EventArgs e)
{
// Apply now
General.Editing.AcceptMode();
}
private void PerpendicularVertexForm_HelpRequested(object sender, HelpEventArgs hlpevent)
{
General.ShowHelp("e_perpendicularvertex.html");
}
#endregion
}
}

View file

@ -0,0 +1,132 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="label1.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="label4.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label2.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
</root>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,398 @@
#region ================== Namespaces
using System;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Windows;
using CodeImp.DoomBuilder.Geometry;
using System.Drawing;
using CodeImp.DoomBuilder.Controls;
#endregion
//JBR Vertex into Shape form
namespace CodeImp.DoomBuilder.BuilderModes.Interface
{
public partial class VertexIntoShapeForm : DelayedForm
{
#region ================== Properties
private bool blockEvents;
public float RadiusX { get { return GetValue(randomsizing.SelectedIndex, radiusX, RradiusX, rand[0], rand[0]); } }
public float RadiusY { get { return GetValue(randomsizing.SelectedIndex, radiusY, RradiusY, rand[0], rand[1]); } }
public bool Ellipse { get { return ellipse.Checked; } }
public bool RemoveVertices { get { return removevertices.Checked; } }
public bool PreviewReference { get { return previewreference.Checked; } }
public int CreateAs { get { return createas.SelectedIndex; } }
public bool FrontOutside { get { return frontoutside.Checked; } }
public int Sides { get { return GetValue(randomsides.SelectedIndex, sides, Rsides, rand[2], 3); } }
public int Spikiness { get { return GetValue(randomspikiness.SelectedIndex, spikiness, Rspikiness, rand[3], 0); } }
public int SpikingMode { get { return spikingmode.SelectedIndex; } }
public float StartAngle { get { return GetValue(randomstartangle.SelectedIndex, startangle, Rstartangle, rand[4], rand[4]); } }
public float SweepAngle { get { return GetValue(randomsweepangle.SelectedIndex, sweepangle, Rsweepangle, rand[5], rand[5]); } }
Random randomizer;
int randseed; // Random seed
float[] rand; // To hold random values, 0.0 to 1.0
#endregion
#region ================== Constructor / Disposer
public VertexIntoShapeForm()
{
InitializeComponent();
blockEvents = true;
NewSeed();
createas.SelectedIndex = 0;
spikingmode.SelectedIndex = 0;
radiusX.Text = "256";
radiusY.Text = "256";
sides.Text = "3";
spikiness.Text = "0";
startangle.Text = "0";
sweepangle.Text = "360";
RradiusX.Text = "256";
RradiusY.Text = "256";
Rsides.Text = "3";
Rspikiness.Text = "0";
Rstartangle.Text = "0";
Rsweepangle.Text = "360";
randomsizing.SelectedIndex = 0;
randomsides.SelectedIndex = 0;
randomspikiness.SelectedIndex = 0;
randomstartangle.SelectedIndex = 0;
randomsweepangle.SelectedIndex = 0;
blockEvents = false;
}
#endregion
#region ================== Methods
public void NewSeed()
{
randomizer = new Random();
randseed = randomizer.Next();
randomizer = new Random(randseed);
rand = new float[6];
for (int i = 0; i < rand.Length; i++)
rand[i] = (float)randomizer.NextDouble();
}
public void RestartSeed()
{
randomizer = new Random(randseed);
for (int i = 0; i < rand.Length; i++)
rand[i] = (float)randomizer.NextDouble();
}
public void NextShape()
{
for (int i = 0; i < rand.Length; i++)
rand[i] = (float)randomizer.NextDouble();
}
private int GetValue(int randtype, ButtonsNumericTextbox setting, ButtonsNumericTextbox rsetting, float randval, int def)
{
if (randtype == 0)
return setting.GetResult(def);
int va = setting.GetResult(def);
int vb = rsetting.GetResult(def);
if (randtype == 1)
return (randval >= 0.5f) ? vb : va;
else
return va + (int)((float)(vb - va) * randval);
}
private float GetValue(int randtype, ButtonsNumericTextbox setting, ButtonsNumericTextbox rsetting, float randval1, float randval2)
{
if (randtype == 0)
return setting.GetResultFloat(0f);
float va = setting.GetResultFloat(0f);
float vb = rsetting.GetResultFloat(0f);
if (randtype == 1)
return (randval1 >= 0.5f) ? vb : va;
if (randtype == 2)
return va + (vb - va) * randval1;
if (randtype == 3)
return (randval2 >= 0.5f) ? vb : va;
else
return va + (vb - va) * randval2;
}
#endregion
#region ================== Interface
// Window closing
private void VertexIntoShapeForm_FormClosing(object sender, FormClosingEventArgs e)
{
// User closing the window?
if (e.CloseReason == CloseReason.UserClosing)
{
// Just cancel
General.Editing.CancelMode();
e.Cancel = true;
}
}
// This shows the window
public void Show(Form owner)
{
// Position at left-top of owner
this.Location = new Point(owner.Location.X + 20, owner.Location.Y + 90);
// Show window
base.Show(owner);
}
private void ValueChanged(object sender, EventArgs e)
{
if (!blockEvents) General.Interface.RedrawDisplay();
}
private void radiusX_ValueChanged(object sender, EventArgs e)
{
if (!ellipse.Checked) radiusY.Text = radiusX.GetResultFloat(0f).ToString();
ValueChanged(this, e);
}
private void radiusY_ValueChanged(object sender, EventArgs e)
{
if (!ellipse.Checked) radiusX.Text = radiusY.GetResultFloat(0f).ToString();
ValueChanged(this, e);
}
private void ellipse_CheckedChanged(object sender, EventArgs e)
{
if (!ellipse.Checked) radiusY.Text = radiusX.GetResultFloat(0f).ToString();
ValueChanged(this, e);
}
private void sides_WhenTextChanged(object sender, EventArgs e)
{
int numsides = sides.GetResult(3);
if (numsides < 3)
sides.Text = "3";
if (numsides > 1024)
sides.Text = "1024";
ValueChanged(this, e);
}
private void spikiness_WhenTextChanged(object sender, EventArgs e)
{
int spikeperc = spikiness.GetResult(0);
if (spikeperc > 32767)
spikiness.Text = "32767";
ValueChanged(this, e);
}
private void startangle_ValueChanged(object sender, EventArgs e)
{
float angle = startangle.GetResultFloat(0f);
if (angle > 360f)
{
angle = 360f;
startangle.Text = "360";
}
startanglewheel.Angle = angle;
ValueChanged(this, e);
}
private void sweepangle_ValueChanged(object sender, EventArgs e)
{
float angle = sweepangle.GetResultFloat(1f);
if (angle < 1f)
{
angle = 1f;
sweepangle.Text = "1";
}
if (angle > 360f)
{
angle = 360f;
sweepangle.Text = "360";
}
sweepanglewheel.Angle = angle;
ValueChanged(this, e);
}
private void startanglewheel_AngleChanged(object sender, EventArgs e)
{
startangle.Text = startanglewheel.Angle.ToString();
ValueChanged(this, e);
}
private void sweepanglewheel_AngleChanged(object sender, EventArgs e)
{
float v = sweepanglewheel.Angle;
if (v < 0f) v = 0.1f;
if (v > 360f) v = 360f;
if (v == 0f) v = 360f;
sweepangle.Text = v.ToString();
ValueChanged(this, e);
}
private void sides3_Click(object sender, EventArgs e)
{
sides.Text = "3";
ValueChanged(this, e);
}
private void sides8_Click(object sender, EventArgs e)
{
sides.Text = "8";
ValueChanged(this, e);
}
private void sides24_Click(object sender, EventArgs e)
{
sides.Text = "24";
ValueChanged(this, e);
}
private void spike0_Click(object sender, EventArgs e)
{
spikiness.Text = "0";
ValueChanged(this, e);
}
private void spike50_Click(object sender, EventArgs e)
{
spikiness.Text = "50";
ValueChanged(this, e);
}
private void randomize_Click(object sender, EventArgs e)
{
NewSeed();
ValueChanged(this, e);
}
private void RradiusX_WhenTextChanged(object sender, EventArgs e)
{
if (!ellipse.Checked) RradiusY.Text = RradiusX.GetResultFloat(0f).ToString();
ValueChanged(this, e);
}
private void RradiusY_WhenTextChanged(object sender, EventArgs e)
{
if (!ellipse.Checked) RradiusX.Text = RradiusY.GetResultFloat(0f).ToString();
ValueChanged(this, e);
}
private void Rsides_WhenTextChanged(object sender, EventArgs e)
{
int numsides = Rsides.GetResult(3);
if (numsides < 3)
Rsides.Text = "3";
if (numsides > 1024)
Rsides.Text = "1024";
ValueChanged(this, e);
}
private void Rspikiness_WhenTextChanged(object sender, EventArgs e)
{
int spikeperc = Rspikiness.GetResult(0);
if (spikeperc > 32767)
Rspikiness.Text = "32767";
ValueChanged(this, e);
}
private void Rstartangle_WhenTextChanged(object sender, EventArgs e)
{
float angle = Rstartangle.GetResultFloat(0f);
if (angle > 360f)
{
angle = 360f;
Rstartangle.Text = "360";
}
Rstartanglewheel.Angle = angle;
ValueChanged(this, e);
}
private void Rsweepangle_WhenTextChanged(object sender, EventArgs e)
{
float angle = Rsweepangle.GetResultFloat(1f);
if (angle < 1f)
{
angle = 1f;
Rsweepangle.Text = "1";
}
if (angle > 360f)
{
angle = 360f;
Rsweepangle.Text = "360";
}
Rsweepanglewheel.Angle = angle;
ValueChanged(this, e);
}
private void Rstartanglewheel_AngleChanged(object sender, EventArgs e)
{
Rstartangle.Text = Rstartanglewheel.Angle.ToString();
ValueChanged(this, e);
}
private void Rsweepanglewheel_AngleChanged(object sender, EventArgs e)
{
float v = Rsweepanglewheel.Angle;
if (v < 0f) v = 0.1f;
if (v > 360f) v = 360f;
if (v == 0f) v = 360f;
Rsweepangle.Text = v.ToString();
ValueChanged(this, e);
}
private void Rsides3_Click(object sender, EventArgs e)
{
Rsides.Text = "3";
ValueChanged(this, e);
}
private void Rsides8_Click(object sender, EventArgs e)
{
Rsides.Text = "8";
ValueChanged(this, e);
}
private void Rsides24_Click(object sender, EventArgs e)
{
Rsides.Text = "24";
ValueChanged(this, e);
}
private void Rspike0_Click(object sender, EventArgs e)
{
Rspikiness.Text = "0";
ValueChanged(this, e);
}
private void Rspike50_Click(object sender, EventArgs e)
{
Rspikiness.Text = "50";
ValueChanged(this, e);
}
private void cancel_Click(object sender, EventArgs e)
{
// Cancel now
General.Editing.CancelMode();
}
private void apply_Click(object sender, EventArgs e)
{
// Apply now
General.Editing.AcceptMode();
}
private void VertexIntoShape_HelpRequested(object sender, HelpEventArgs hlpevent)
{
General.ShowHelp("e_vertexintoshape.html");
}
#endregion
}
}

View file

@ -0,0 +1,191 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="label5.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="label4.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label3.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label6.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label2.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label1.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label7.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label9.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label10.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label8.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label11.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<data name="randomsizing.ToolTip" xml:space="preserve">
<value>Select how to randomize the values.
* Disabled - Value in randomizer is ignored.
* Boolean - Set value by random chance, either on or off.
* Linear - Set value by random amount, between value in
settings and value in randomizer.</value>
</data>
<data name="randomsides.ToolTip" xml:space="preserve">
<value>Select how to randomize the values.
* Disabled - Value in randomizer is ignored.
* Boolean - Set value by random chance, either on or off.
* Linear - Set value by random amount, between value in
settings and value in randomizer.</value>
</data>
<data name="randomspikiness.ToolTip" xml:space="preserve">
<value>Select how to randomize the values.
* Disabled - Value in randomizer is ignored.
* Boolean - Set value by random chance, either on or off.
* Linear - Set value by random amount, between value in
settings and value in randomizer.</value>
</data>
<data name="randomstartangle.ToolTip" xml:space="preserve">
<value>Select how to randomize the values.
* Disabled - Value in randomizer is ignored.
* Boolean - Set value by random chance, either on or off.
* Linear - Set value by random amount, between value in
settings and value in randomizer.</value>
</data>
<data name="randomsweepangle.ToolTip" xml:space="preserve">
<value>Select how to randomize the values.
* Disabled - Value in randomizer is ignored.
* Boolean - Set value by random chance, either on or off.
* Linear - Set value by random amount, between value in
settings and value in randomizer.</value>
</data>
</root>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,603 @@
#region ================== Namespaces
using System;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Windows;
using CodeImp.DoomBuilder.Geometry;
using System.Drawing;
using System.Collections.Generic;
using CodeImp.DoomBuilder.Map;
#endregion
//JBR Vertex Slope Assistant form
namespace CodeImp.DoomBuilder.BuilderModes.Interface
{
public partial class VertexSlopeAssistForm : DelayedForm
{
#region ================== Properties / Variables
[Serializable]
public delegate void ContextEventHandler(object sender, int action);
private bool blockEvents;
public event EventHandler OnDrawNewTaggedTriangle;
public event EventHandler OnDrawNewEmptyTriangle;
public event EventHandler OnGroupChanged;
public event EventHandler OnGroupChoosen;
public event EventHandler OnGroupNewTriangle;
public event EventHandler OnGroupNewVertex;
public event EventHandler OnGroupModify;
public event EventHandler OnGroupModifyAsTriangle;
public event EventHandler OnGroupModifyAsVertex;
public event EventHandler OnGroupTag;
public event EventHandler OnGroupDelete;
public event EventHandler OnValueChanged;
public event EventHandler OnRotateAll;
public event EventHandler OnFlipAll;
public event EventHandler OnRotateHeight;
public event EventHandler OnFlipHeight;
public event ContextEventHandler OnContextSet;
public bool AffineVSlopes { get { return affinevslopes.Checked; } }
public int TagID { get { return tagID.GetResult(0); } set { tagID.Text = value.ToString(); UpdateForm(); } }
public Vector3D Vertex1 { get { return GetVector3DFromUI(vslopeX1, vslopeY1, vslopeZ1); } set { SetVector3DFromUI(vslopeX1, vslopeY1, vslopeZ1, value); } }
public Vector3D Vertex2 { get { return GetVector3DFromUI(vslopeX2, vslopeY2, vslopeZ2); } set { SetVector3DFromUI(vslopeX2, vslopeY2, vslopeZ2, value); } }
public Vector3D Vertex3 { get { return GetVector3DFromUI(vslopeX3, vslopeY3, vslopeZ3); } set { SetVector3DFromUI(vslopeX3, vslopeY3, vslopeZ3, value); } }
public bool Vertex1AbsZ { get { return vslopeAbsZ1.Checked; } set { vslopeAbsZ1.Checked = value; } }
public bool Vertex2AbsZ { get { return vslopeAbsZ2.Checked; } set { vslopeAbsZ2.Checked = value; } }
public bool Vertex3AbsZ { get { return vslopeAbsZ3.Checked; } set { vslopeAbsZ3.Checked = value; } }
public string ModeText { get { return currentmode.Text; } set { currentmode.Text = value; } }
public const int HEIGHTADJ_STEP = 1;
public const int HEIGHTADJ_SMALL = 4;
public const int HEIGHTADJ_BIG = 16;
// List[GroupIndex] = Linedef Tag
public List<int> vslopeTags;
// SortedDictionary<Linedef Tag, List of VSlopes>
public SortedDictionary<int, List<Thing>> vslopeDic;
#endregion
#region ================== Constructor / Disposer
public VertexSlopeAssistForm()
{
InitializeComponent();
blockEvents = true;
vslopeX1.Text = "0";
vslopeY1.Text = "0";
vslopeZ1.Text = "0";
vslopeX2.Text = "0";
vslopeY2.Text = "0";
vslopeZ2.Text = "0";
vslopeX3.Text = "0";
vslopeY3.Text = "0";
vslopeZ3.Text = "0";
tooltip.SetToolTip(heightAdj, string.Format("Hold Ctrl to change value by {0}.\nHold Shift to change value by {1}.", HEIGHTADJ_SMALL, HEIGHTADJ_BIG));
CreateList();
tagID.Text = General.Map.Map.GetNewTag(vslopeTags).ToString();
blockEvents = false;
}
#endregion
#region ================== Methods
private Vector3D GetVector3DFromUI(Controls.ButtonsNumericTextbox X, Controls.ButtonsNumericTextbox Y, Controls.ButtonsNumericTextbox Z)
{
return new Vector3D(X.GetResult(0), Y.GetResult(0), Z.GetResult(0));
}
private void SetVector3DFromUI(Controls.ButtonsNumericTextbox X, Controls.ButtonsNumericTextbox Y, Controls.ButtonsNumericTextbox Z, Vector3D value)
{
blockEvents = true;
X.Text = value.x.ToString();
Y.Text = value.y.ToString();
Z.Text = value.z.ToString();
blockEvents = false;
}
// http://www.jeffreythompson.org/collision-detection/tri-point.php
private bool TriangleCollision(float p1x, float p1y, float p2x, float p2y, float p3x, float p3y, float px, float py)
{
// get the area of the triangle
float areaOrig = Math.Abs((p2x - p1x) * (p3y - p1y) - (p3x - p1x) * (p2y - p1y));
// get the area of 3 triangles made between the point and the corners of the triangle
float area1 = Math.Abs((p1x - px) * (p2y - py) - (p2x - px) * (p1y - py));
float area2 = Math.Abs((p2x - px) * (p3y - py) - (p3x - px) * (p2y - py));
float area3 = Math.Abs((p3x - px) * (p1y - py) - (p1x - px) * (p3y - py));
// if the sum of the three areas equals the original, we're inside the triangle!
return (area1 + area2 + area3 == areaOrig);
}
private bool PointBoxCollision(float px, float py, float left, float bottom, float width, float height)
{
// Graphic axis direction of going up being positive
float right = left + width;
float top = bottom + height;
return px >= left && px < right && py >= bottom && py < top;
}
public void OpenContextLinedefMenu(int mx, int my, bool tagexist)
{
setAction704Item.Enabled = tagexist;
setAction705Item.Enabled = tagexist;
setAction714Item.Enabled = tagexist;
setAction715Item.Enabled = tagexist;
contextVSlopeLinedef.Show(mx, my);
}
public void OpenContextGroupMenu(int mx, int my, bool tagexist)
{
if (tagexist)
contextExistingGroup.Show(mx, my);
else
contextNewGroup.Show(mx, my);
}
public void CreateList()
{
// Create dictionary
vslopeDic = new SortedDictionary<int, List<Thing>>();
vslopegroups.Items.Clear();
foreach (Thing t in General.Map.Map.Things)
{
if (t.SRB2Type == 750) // Vertex Slope
{
if (vslopeDic.ContainsKey(t.AngleDoom))
{
vslopeDic[t.AngleDoom].Add(t);
}
else
{
List<Thing> thingsList = new List<Thing>();
thingsList.Add(t);
vslopeDic.Add(t.AngleDoom, thingsList);
}
}
}
// Generate ListBox items
vslopeTags = new List<int>();
vslopegroups.Items.Clear();
foreach (KeyValuePair<int, List<Thing>> kvp in vslopeDic)
{
vslopeTags.Add(kvp.Key);
if (kvp.Value.Count == 3)
{
vslopegroups.Items.Add(string.Format("Tag {0} - Triangle", kvp.Key));
}
else if (kvp.Value.Count == 1)
{
vslopegroups.Items.Add(string.Format("Tag {0} - Vertex", kvp.Key));
}
else
{
vslopegroups.Items.Add(string.Format("Tag {0} - INVALID! {1} Vertices", kvp.Key, kvp.Value.Count));
}
}
// Select tag from list
int tagid = tagID.GetResult(0);
vslopegroups.SelectedIndex = vslopeTags.IndexOf(tagid);
}
public void UpdateForm()
{
blockEvents = true;
int tagid = tagID.GetResult(0);
bool tagexist = vslopeTags.Contains(tagid);
toolNewTriangleGroup.Enabled = !tagexist;
toolNewVertexGroup.Enabled = !tagexist;
toolRemakeGroup.Enabled = tagexist;
toolRemakeAsTriangleGroup.Enabled = tagexist;
toolRemakeAsVertexGroup.Enabled = tagexist;
toolChangeTagGroup.Enabled = tagexist;
toolDeleteGroup.Enabled = tagexist;
toolDrawNewTaggedTriangle.Enabled = !tagexist;
if (tagexist)
vslopegroups.ContextMenuStrip = contextExistingGroup;
else
vslopegroups.ContextMenuStrip = contextNewGroup;
vslopegroups.SelectedIndex = vslopeTags.IndexOf(tagid);
if (tagexist)
{
List<Thing> things = vslopeDic[tagid];
if (things.Count >= 1)
{
Thing thing = things[0];
Vector3D pos = thing.Position;
vslopeX1.Text = pos.x.ToString();
vslopeY1.Text = pos.y.ToString();
if (thing.Parameter == 0)
{
vslopeAbsZ1.Checked = false;
labelVSlope1.Text = "H1:";
vslopeZ1.Text = pos.z.ToString();
}
else
{
vslopeAbsZ1.Checked = true;
labelVSlope1.Text = "Z1:";
vslopeZ1.Text = thing.GetFlagsValue().ToString();
}
}
if (things.Count >= 2)
{
Thing thing = things[1];
Vector3D pos = thing.Position;
vslopeX2.Text = pos.x.ToString();
vslopeY2.Text = pos.y.ToString();
if (thing.Parameter == 0)
{
vslopeAbsZ2.Checked = false;
labelVSlope2.Text = "H2:";
vslopeZ2.Text = pos.z.ToString();
}
else
{
vslopeAbsZ2.Checked = true;
labelVSlope2.Text = "Z2:";
vslopeZ2.Text = thing.GetFlagsValue().ToString();
}
}
if (things.Count >= 3)
{
Thing thing = things[2];
Vector3D pos = thing.Position;
vslopeX3.Text = pos.x.ToString();
vslopeY3.Text = pos.y.ToString();
if (thing.Parameter == 0)
{
vslopeAbsZ3.Checked = false;
labelVSlope3.Text = "H3:";
vslopeZ3.Text = pos.z.ToString();
}
else
{
vslopeAbsZ3.Checked = true;
labelVSlope3.Text = "Z3:";
vslopeZ3.Text = thing.GetFlagsValue().ToString();
}
}
vslopeX1.Enabled = (things.Count >= 1);
vslopeY1.Enabled = (things.Count >= 1);
vslopeZ1.Enabled = (things.Count >= 1);
vslopeAbsZ1.Enabled = (things.Count >= 1);
vslopeX2.Enabled = (things.Count >= 2);
vslopeY2.Enabled = (things.Count >= 2);
vslopeZ2.Enabled = (things.Count >= 2);
vslopeAbsZ2.Enabled = (things.Count >= 2);
vslopeX3.Enabled = (things.Count >= 3);
vslopeY3.Enabled = (things.Count >= 3);
vslopeZ3.Enabled = (things.Count >= 3);
vslopeAbsZ3.Enabled = (things.Count >= 3);
}
else
{
vslopeX1.Enabled = false;
vslopeY1.Enabled = false;
vslopeZ1.Enabled = true;
vslopeAbsZ1.Enabled = true;
vslopeX2.Enabled = false;
vslopeY2.Enabled = false;
vslopeZ2.Enabled = true;
vslopeAbsZ2.Enabled = true;
vslopeX3.Enabled = false;
vslopeY3.Enabled = false;
vslopeZ3.Enabled = true;
vslopeAbsZ3.Enabled = true;
}
blockEvents = false;
}
public int VerticesInTag()
{
int tagid = tagID.GetResult(0);
bool tagexist = vslopeTags.Contains(tagid);
if (tagexist)
{
return vslopeDic[tagid].Count;
}
return 0;
}
public int VerticesInTag(int tagid)
{
bool tagexist = vslopeTags.Contains(tagid);
if (tagexist)
{
return vslopeDic[tagid].Count;
}
return 0;
}
public List<Thing> GetThingsList()
{
int tagid = tagID.GetResult(0);
bool tagexist = vslopeTags.Contains(tagid);
if (tagexist)
{
return vslopeDic[tagid];
}
return null;
}
public List<Thing> GetThingsList(int tagid)
{
bool tagexist = vslopeTags.Contains(tagid);
if (tagexist)
{
return vslopeDic[tagid];
}
return null;
}
public int GetGroupsAt(Vector2D pos, ref List<int> groups, bool vertexgroups, bool trianglegroups)
{
int numgroups = 0;
foreach (KeyValuePair<int, List<Thing>> kvp in vslopeDic)
{
if (vertexgroups && kvp.Value.Count == 1)
{
if (PointBoxCollision(pos.x, pos.y, kvp.Value[0].Position.x - 8f, kvp.Value[0].Position.y - 8f, 16f, 16f))
{
numgroups++;
groups.Add(kvp.Key);
}
}
else if (trianglegroups && kvp.Value.Count == 3)
{
if (TriangleCollision(
kvp.Value[0].Position.x, kvp.Value[0].Position.y,
kvp.Value[1].Position.x, kvp.Value[1].Position.y,
kvp.Value[2].Position.x, kvp.Value[2].Position.y,
pos.x, pos.y))
{
numgroups++;
groups.Add(kvp.Key);
}
}
}
return numgroups;
}
#endregion
#region ================== Interface
// Window closing
private void VertexSlopeAssistForm_FormClosing(object sender, FormClosingEventArgs e)
{
// User closing the window?
if (e.CloseReason == CloseReason.UserClosing)
{
// Just cancel
General.Editing.CancelMode();
e.Cancel = true;
}
}
// This shows the window
public void Show(Form owner)
{
// Position at left-top of owner
this.Location = new Point(owner.Location.X + 20, owner.Location.Y + 90);
blockEvents = true;
CreateList();
blockEvents = false;
tagID_ValueChanged(tagID, EventArgs.Empty);
// Show window
base.Show(owner);
}
// Some value got changed
private void ValueChanged(object sender, EventArgs e)
{
if (!blockEvents) General.Interface.RedrawDisplay();
}
// Cancel clicked
private void cancel_Click(object sender, EventArgs e)
{
// Cancel now
General.Editing.CancelMode();
}
// Apply clicked
private void apply_Click(object sender, EventArgs e)
{
// Apply now
General.Editing.AcceptMode();
}
private void VertexSlopeAssistForm_HelpRequested(object sender, HelpEventArgs hlpevent)
{
General.ShowHelp("e_vertexslopeassist.html");
}
private void tagID_ValueChanged(object sender, EventArgs e)
{
if (blockEvents) return;
UpdateForm();
if (OnGroupChanged != null) OnGroupChanged(sender, e);
ValueChanged(sender, e);
}
private void vslopegroups_SelectedIndexChanged(object sender, EventArgs e)
{
if (blockEvents) return;
if (vslopegroups.SelectedIndex == -1) return;
int tagid = vslopeTags[vslopegroups.SelectedIndex];
tagID.Text = tagid.ToString();
if (OnGroupChanged != null) OnGroupChanged(sender, e);
ValueChanged(sender, e);
}
private void vslopegroups_DoubleClick(object sender, EventArgs e)
{
if (OnGroupChoosen != null) OnGroupChoosen(sender, e);
ValueChanged(sender, e);
}
private void drawNewTaggedTriangle_Click(object sender, EventArgs e)
{
if (OnDrawNewTaggedTriangle != null) OnDrawNewTaggedTriangle(sender, e);
ValueChanged(sender, e);
}
private void drawNewEmptyTriangle_Click(object sender, EventArgs e)
{
if (OnDrawNewEmptyTriangle != null) OnDrawNewEmptyTriangle(sender, e);
ValueChanged(sender, e);
}
private void newtag_Click(object sender, EventArgs e)
{
tagID.Text = General.Map.Map.GetNewTag(vslopeTags).ToString();
ValueChanged(sender, e);
}
private void newTriangleGroup_Click(object sender, EventArgs e)
{
if (OnGroupNewTriangle != null) OnGroupNewTriangle(sender, e);
ValueChanged(sender, e);
}
private void newVertexGroup_Click(object sender, EventArgs e)
{
if (OnGroupNewVertex != null) OnGroupNewVertex(sender, e);
ValueChanged(sender, e);
}
private void remakeGroup_Click(object sender, EventArgs e)
{
if (OnGroupModify != null) OnGroupModify(sender, e);
ValueChanged(sender, e);
}
private void remakeAsTriangleGroup_Click(object sender, EventArgs e)
{
if (OnGroupModifyAsTriangle != null) OnGroupModifyAsTriangle(sender, e);
ValueChanged(sender, e);
}
private void remakeAsVertexGroup_Click(object sender, EventArgs e)
{
if (OnGroupModifyAsVertex != null) OnGroupModifyAsVertex(sender, e);
ValueChanged(sender, e);
}
private void changeTagGroup_Click(object sender, EventArgs e)
{
if (OnGroupTag != null) OnGroupTag(sender, e);
ValueChanged(sender, e);
}
private void deleteGroup_Click(object sender, EventArgs e)
{
if (OnGroupDelete != null) OnGroupDelete(sender, e);
ValueChanged(sender, e);
}
private void vslope_ValueChanged(object sender, EventArgs e)
{
if (blockEvents) return;
if (OnValueChanged != null) OnValueChanged(sender, e);
ValueChanged(sender, e);
}
private void rot_all_Click(object sender, EventArgs e)
{
if (OnRotateAll != null) OnRotateAll(sender, e);
ValueChanged(sender, e);
}
private void flip_all_Click(object sender, EventArgs e)
{
if (OnFlipAll != null) OnFlipAll(sender, e);
ValueChanged(sender, e);
}
private void rot_height_Click(object sender, EventArgs e)
{
if (OnRotateHeight != null) OnRotateHeight(sender, e);
ValueChanged(sender, e);
}
private void flip_height_Click(object sender, EventArgs e)
{
if (OnFlipHeight != null) OnFlipHeight(sender, e);
ValueChanged(sender, e);
}
private void heightAdj_ValueChanged(object sender, EventArgs e)
{
int adjust = -heightAdj.Value;
// Modifiers
if ((ModifierKeys & Keys.Control) == Keys.Control)
adjust *= HEIGHTADJ_SMALL;
else if ((ModifierKeys & Keys.Shift) == Keys.Shift)
adjust *= HEIGHTADJ_BIG;
else
adjust *= HEIGHTADJ_STEP;
// Adjust heights...
vslopeZ1.Text = (vslopeZ1.GetResult(0) + adjust).ToString();
vslopeZ2.Text = (vslopeZ2.GetResult(0) + adjust).ToString();
vslopeZ3.Text = (vslopeZ3.GetResult(0) + adjust).ToString();
heightAdj.Value = 0;
}
private void setAction704Item_Click(object sender, EventArgs e)
{
if (OnContextSet != null) OnContextSet(sender, 704);
ValueChanged(sender, e);
}
private void setAction705Item_Click(object sender, EventArgs e)
{
if (OnContextSet != null) OnContextSet(sender, 705);
ValueChanged(sender, e);
}
private void setAction714Item_Click(object sender, EventArgs e)
{
if (OnContextSet != null) OnContextSet(sender, 714);
ValueChanged(sender, e);
}
private void setAction715Item_Click(object sender, EventArgs e)
{
if (OnContextSet != null) OnContextSet(sender, 715);
ValueChanged(sender, e);
}
private void removeActionItem_Click(object sender, EventArgs e)
{
if (OnContextSet != null) OnContextSet(sender, 0);
ValueChanged(sender, e);
}
private void contextVSlopeLinedef_Closed(object sender, ToolStripDropDownClosedEventArgs e)
{
if (OnContextSet != null) OnContextSet(sender, -1);
ValueChanged(sender, e);
}
#endregion
}
}

View file

@ -0,0 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="label1.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="label4.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label3.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label2.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label5.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label6.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label7.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label11.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="toolStripGroups.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>594, 17</value>
</metadata>
<metadata name="contextNewGroup.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>273, 17</value>
</metadata>
<data name="affinevslopes.ToolTip" xml:space="preserve">
<value>When checked, all Vertex Slopes will slightly move inside the
the triangle so height can be adjusted freely without any
neighbour sectors affecting it but this will also cause an
error of &gt;= 1 pixel on the slope edges.
This setting affects:
* Create New Triangle
* New Triangle Group
* Remake Group (On triangle groups only)</value>
</data>
<metadata name="contextExistingGroup.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>105, 17</value>
</metadata>
<metadata name="contextVSlopeLinedef.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>424, 17</value>
</metadata>
</root>

View file

@ -0,0 +1,88 @@
#region ================== Namespaces
using System;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Windows;
using CodeImp.DoomBuilder.Geometry;
using System.Drawing;
using System.Collections.Generic;
using CodeImp.DoomBuilder.Map;
#endregion
//JBR Vertex Slope Assistant, Tag form
namespace CodeImp.DoomBuilder.BuilderModes.Interface
{
public partial class VertexSlopeAssistTagForm : DelayedForm
{
#region ================== Properties
public int TagID { get { return tagID.GetResult(0); } set { tagID.Text = value.ToString(); } }
#endregion
#region ================== Constructor / Disposer
public VertexSlopeAssistTagForm()
{
InitializeComponent();
tagID.Text = "0";
}
#endregion
#region ================== Methods
// Returns selected tag number, -1 if cancel
public static int RunDialog(IWin32Window owner, int tag)
{
VertexSlopeAssistTagForm f = new VertexSlopeAssistTagForm();
f.tagID.Text = tag.ToString();
DialogResult result = f.ShowDialog(owner);
int newtag = -1;
if (result == DialogResult.OK)
{
newtag = f.tagID.GetResult(tag);
}
f.Dispose();
return newtag;
}
#endregion
#region ================== Interface
// Window closing
private void VertexSlopeAssistRetagForm_FormClosing(object sender, FormClosingEventArgs e)
{
// User closing the window?
if (e.CloseReason == CloseReason.UserClosing)
{
// Just cancel
e.Cancel = true;
}
}
private void newtag_Click(object sender, EventArgs e)
{
tagID.Text = General.Map.Map.GetNewTag().ToString();
}
// This shows the window
public void Show(Form owner)
{
// Position at left-top of owner
this.Location = new Point(owner.Location.X + 20, owner.Location.Y + 90);
// Show window
base.Show(owner);
}
private void VertexSlopeAssistRetagForm_HelpRequested(object sender, HelpEventArgs hlpevent)
{
General.ShowHelp("e_vertexslopeassist.html");
}
#endregion
}
}

View file

@ -0,0 +1,143 @@
namespace CodeImp.DoomBuilder.BuilderModes.Interface
{
partial class VertexSlopeAssistTagForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.Label label1;
this.apply = new System.Windows.Forms.Button();
this.cancel = new System.Windows.Forms.Button();
this.newtag = new System.Windows.Forms.Button();
this.tagID = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.tooltip = new System.Windows.Forms.ToolTip(this.components);
label1 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// label1
//
label1.AutoSize = true;
label1.Location = new System.Drawing.Point(15, 17);
label1.Name = "label1";
label1.Size = new System.Drawing.Size(64, 13);
label1.TabIndex = 1;
label1.Text = "New Tag #:";
this.tooltip.SetToolTip(label1, "Tag number to be used for the vertex slope, should be between 1 to 65535.");
//
// apply
//
this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.apply.DialogResult = System.Windows.Forms.DialogResult.OK;
this.apply.Location = new System.Drawing.Point(12, 48);
this.apply.Name = "apply";
this.apply.Size = new System.Drawing.Size(70, 25);
this.apply.TabIndex = 9;
this.apply.Text = "OK";
this.apply.UseVisualStyleBackColor = true;
//
// cancel
//
this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancel.Location = new System.Drawing.Point(89, 48);
this.cancel.Name = "cancel";
this.cancel.Size = new System.Drawing.Size(70, 25);
this.cancel.TabIndex = 10;
this.cancel.Text = "Cancel";
this.cancel.UseVisualStyleBackColor = true;
//
// newtag
//
this.newtag.Location = new System.Drawing.Point(163, 12);
this.newtag.Name = "newtag";
this.newtag.Size = new System.Drawing.Size(48, 23);
this.newtag.TabIndex = 3;
this.newtag.Text = "New";
this.tooltip.SetToolTip(this.newtag, "Find a new unused tag.");
this.newtag.UseVisualStyleBackColor = true;
this.newtag.Click += new System.EventHandler(this.newtag_Click);
//
// tagID
//
this.tagID.AllowDecimal = false;
this.tagID.AllowNegative = false;
this.tagID.AllowRelative = false;
this.tagID.ButtonStep = 1;
this.tagID.ButtonStepBig = 100F;
this.tagID.ButtonStepFloat = 1F;
this.tagID.ButtonStepSmall = 10F;
this.tagID.ButtonStepsUseModifierKeys = true;
this.tagID.ButtonStepsWrapAround = false;
this.tagID.Location = new System.Drawing.Point(85, 12);
this.tagID.Name = "tagID";
this.tagID.Size = new System.Drawing.Size(72, 24);
this.tagID.StepValues = null;
this.tagID.TabIndex = 2;
//
// tooltip
//
this.tooltip.AutoPopDelay = 10000;
this.tooltip.InitialDelay = 500;
this.tooltip.ReshowDelay = 100;
//
// VertexSlopeAssistTagForm
//
this.AcceptButton = this.apply;
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.CancelButton = this.cancel;
this.ClientSize = new System.Drawing.Size(230, 85);
this.Controls.Add(this.tagID);
this.Controls.Add(this.newtag);
this.Controls.Add(label1);
this.Controls.Add(this.cancel);
this.Controls.Add(this.apply);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "VertexSlopeAssistTagForm";
this.Opacity = 1D;
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "Vertex Slope Assistant (Tag)";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.VertexSlopeAssistRetagForm_FormClosing);
this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.VertexSlopeAssistRetagForm_HelpRequested);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button apply;
private System.Windows.Forms.Button cancel;
private System.Windows.Forms.Button newtag;
private Controls.ButtonsNumericTextbox tagID;
private System.Windows.Forms.ToolTip tooltip;
}
}

View file

@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="label1.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View file

@ -1,10 +1,10 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.42000
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
@ -13,12 +13,12 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
/// <summary>
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
@ -33,7 +33,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
@ -47,8 +47,8 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
@ -61,7 +61,27 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap AddTriangle {
get {
object obj = ResourceManager.GetObject("AddTriangle", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap AddVertex {
get {
object obj = ResourceManager.GetObject("AddVertex", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap AlignThings {
get {
@ -71,7 +91,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Angle {
get {
@ -81,7 +101,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap BrightnessGradient {
get {
@ -91,7 +111,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap CeilingAlign {
get {
@ -101,7 +121,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap CeilsGradient {
get {
@ -111,7 +131,17 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Close {
get {
object obj = ResourceManager.GetObject("Close", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ColorPick {
get {
@ -121,7 +151,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Copy {
get {
@ -131,7 +161,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap CopyProperties {
get {
@ -141,7 +171,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap CurveLines {
get {
@ -151,7 +181,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Door {
get {
@ -161,7 +191,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap DrawCurveMode {
get {
@ -171,7 +201,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap DrawEllipseMode {
get {
@ -181,7 +211,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap DrawGeometryMode {
get {
@ -191,7 +221,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap DrawGridMode {
get {
@ -201,7 +231,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap DrawRectangleMode {
get {
@ -211,7 +241,87 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap DrawShape24Sides {
get {
object obj = ResourceManager.GetObject("DrawShape24Sides", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap DrawShape3Sides {
get {
object obj = ResourceManager.GetObject("DrawShape3Sides", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap DrawShape8Sides {
get {
object obj = ResourceManager.GetObject("DrawShape8Sides", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap DrawShapeMode {
get {
object obj = ResourceManager.GetObject("DrawShapeMode", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap DrawShapeSpike0 {
get {
object obj = ResourceManager.GetObject("DrawShapeSpike0", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap DrawShapeSpike50 {
get {
object obj = ResourceManager.GetObject("DrawShapeSpike50", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap DrawTaggedTriangle {
get {
object obj = ResourceManager.GetObject("DrawTaggedTriangle", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap DrawTriangle {
get {
object obj = ResourceManager.GetObject("DrawTriangle", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap FilterThings {
get {
@ -221,7 +331,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Flip {
get {
@ -231,7 +341,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap FlipSelectionH {
get {
@ -241,7 +351,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap FlipSelectionV {
get {
@ -251,7 +361,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap FloorAlign {
get {
@ -261,7 +371,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap FloorsGradient {
get {
@ -271,7 +381,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Folder {
get {
@ -281,7 +391,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Gear {
get {
@ -291,7 +401,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Hide {
get {
@ -301,7 +411,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap HideAll {
get {
@ -311,7 +421,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap InsertThingsRadiallyMode {
get {
@ -321,7 +431,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Join {
get {
@ -331,7 +441,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap List {
get {
@ -341,7 +451,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap List_Images {
get {
@ -351,7 +461,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Merge {
get {
@ -361,7 +471,17 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ParallelLinedef {
get {
object obj = ResourceManager.GetObject("ParallelLinedef", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap PasteProperties {
get {
@ -371,7 +491,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap PastePropertiesOptions {
get {
@ -381,7 +501,27 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap PerpendicularLinedef {
get {
object obj = ResourceManager.GetObject("PerpendicularLinedef", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap PerpendicularVertex {
get {
object obj = ResourceManager.GetObject("PerpendicularVertex", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap PlaceThings {
get {
@ -391,7 +531,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Reset {
get {
@ -401,7 +541,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Save {
get {
@ -411,7 +551,17 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Search {
get {
object obj = ResourceManager.GetObject("Search", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap SelectThingsInSectors {
get {
@ -421,7 +571,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap SelectTouching {
get {
@ -431,7 +581,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Show {
get {
@ -441,7 +591,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Show2 {
get {
@ -451,7 +601,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Show3 {
get {
@ -461,7 +611,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Similar {
get {
@ -471,7 +621,17 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap SingleVertex {
get {
object obj = ResourceManager.GetObject("SingleVertex", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Text {
get {
@ -481,7 +641,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap TextureLock {
get {
@ -491,7 +651,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ThingPointAtCursor {
get {
@ -501,7 +661,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap treeview {
get {
@ -511,7 +671,27 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap VertexIntoShape {
get {
object obj = ResourceManager.GetObject("VertexIntoShape", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap VertexSlope {
get {
object obj = ResourceManager.GetObject("VertexSlope", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ViewSelectionEffects {
get {
@ -521,7 +701,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ViewSelectionIndex {
get {
@ -531,7 +711,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap VisualModeGZ {
get {

View file

@ -262,4 +262,58 @@
<data name="InsertThingsRadiallyMode" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\InsertThingsRadiallyMode.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="AddTriangle" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AddTriangle.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="AddVertex" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AddVertex.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Close" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Close.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="DrawShape24Sides" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\DrawShape24Sides.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="DrawShape3Sides" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\DrawShape3Sides.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="DrawShape8Sides" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\DrawShape8Sides.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="DrawShapeMode" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\DrawShapeMode.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="DrawShapeSpike0" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\DrawShapeSpike0.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="DrawShapeSpike50" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\DrawShapeSpike50.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="DrawTaggedTriangle" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\DrawTaggedTriangle.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="DrawTriangle" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\DrawTriangle.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ParallelLinedef" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ParallelLinedef.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="PerpendicularLinedef" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\PerpendicularLinedef.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="PerpendicularVertex" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\PerpendicularVertex.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Search" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Search.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="SingleVertex" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\SingleVertex.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="VertexIntoShape" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\VertexIntoShape.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="VertexSlope" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\VertexSlope.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View file

@ -30,6 +30,8 @@ categories
// allowkeys and allowmouse are true by default, the others are false by default.
//
//JBR Added defaults in some actions
verticesmode
{
title = "Vertices Mode";
@ -38,6 +40,7 @@ verticesmode
allowkeys = true;
allowmouse = true;
allowscroll = true;
default = 86; // V
}
linedefsmode
@ -48,6 +51,7 @@ linedefsmode
allowkeys = true;
allowmouse = true;
allowscroll = true;
default = 76; // L
}
sectorsmode
@ -58,6 +62,7 @@ sectorsmode
allowkeys = true;
allowmouse = true;
allowscroll = true;
default = 83; // S
}
thingsmode
@ -68,6 +73,7 @@ thingsmode
allowkeys = true;
allowmouse = true;
allowscroll = true;
default = 84; // T
}
drawlinesmode
@ -78,6 +84,7 @@ drawlinesmode
allowkeys = true;
allowmouse = true;
allowscroll = true;
default = 131140; // Ctrl-D
}
//mxd
@ -89,7 +96,7 @@ drawrectanglemode
allowkeys = true;
allowmouse = true;
allowscroll = true;
default = 196676;
default = 196676; // Ctrl-Shift-D
}
//mxd
@ -101,7 +108,7 @@ drawellipsemode
allowkeys = true;
allowmouse = true;
allowscroll = true;
default = 327748;
default = 327748; // Alt-Shift-D
}
//mxd
@ -125,6 +132,19 @@ drawgridmode
allowkeys = true;
allowmouse = true;
allowscroll = true;
default = 327751; //Alt-Shift-G
}
//JBR
drawshapemode
{
title = "Start Shape Drawing";
category = "drawing";
description = "Starts drawing a shape. Increase/Decrease Subdivision Level and Increase/Decrease Corners Bevel actions are avaliable in this mode.";
allowkeys = true;
allowmouse = true;
allowscroll = true;
default = 262212; //Alt-D
}
insertthingsradiallymode
@ -1305,6 +1325,61 @@ floodfilltextures
default = 65540;
}
//JBR
perpendicularvertex
{
title = "Perpendicular Vertex";
category = "classic";
description = "Create perpendicular from selected vertices.";
allowkeys = true;
allowmouse = true;
allowscroll = true;
}
//JBR
perpendicularlinedef
{
title = "Perpendicular Linedef";
category = "classic";
description = "Create perpendicular from selected linedefs.";
allowkeys = true;
allowmouse = true;
allowscroll = true;
}
//JBR
parallellinedef
{
title = "Parallel Linedef";
category = "classic";
description = "Create parallel linedefs from selected linedefs.";
allowkeys = true;
allowmouse = true;
allowscroll = true;
}
//JBR
vertexintoshape
{
title = "Vertex into shape";
category = "classic";
description = "Create shapes on each selected vertex.";
allowkeys = true;
allowmouse = true;
allowscroll = true;
}
//JBR
vertexslopeassist
{
title = "Vertex Slope Assistant";
category = "classic";
description = "Vertex slope assistant. (SRB2 only)";
allowkeys = true;
allowmouse = true;
allowscroll = true;
}
flipselectionv
{
title = "Flip Selection Vertically";

Binary file not shown.

After

Width:  |  Height:  |  Size: 413 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 699 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 B

View file

@ -229,6 +229,19 @@ group general
"Place second vertex to finish drawing"
"Press <k>builder_cancelmode</k> or <k>builder_classicedit</k> to cancel"
class DrawShapeMode
group general
"Press <k>builder_classicselect</k> to place a vertex"
"Use <k>buildermodes_increasebevel</k> and <k>buildermodes_decreasebevel</k> to change bevel by current grid size"
"Use <k>buildermodes_increasesubdivlevel</k> and <k>buildermodes_decreasesubdivlevel</k> to change the number of sides in shape"
"Hold <b>Shift</b> to toggle grid snapping"
"Hold <b>Ctrl</b> to toggle snapping to nearest vertex"
"Hold <b>Alt - Shift</b> to snap to 4 cardinal directions"
"Place second vertex to finish drawing"
"Press <k>builder_cancelmode</k> or <k>builder_classicedit</k> to cancel"
group gridlockhelp
"Use <k>builder_griddec</k> and <k>builder_gridinc</k> to change grid size."
"Hold <b>Alt - Shift</b> to snap to 4 cardinal directions"

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 482 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 639 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

View file

@ -143,7 +143,7 @@ namespace CodeImp.DoomBuilder.ColorPicker
if(formLocation.X == 0 && formLocation.Y == 0)
{
Size displaySize = General.Interface.Display.Size;
Point displayLocation = General.Interface.Display.LocationAbs;
Point displayLocation = General.Interface.Display.GetLocationAbs();
formLocation = new Point(displayLocation.X + displaySize.Width - form.Width - 16, displayLocation.Y + 16);
}
form.Location = formLocation;