WorldUI - Megasploot/Dungeondraft GitHub Wiki
Overview
This is a special Editor class that allows you to adjust the cursor type and draw a polyline that would be used for things like the WallTool and PathTool
Properties
int CursorMode
Gets or sets the type of cursor the active tool should use.
0 = Off
1 = Point
2 = Tile
3 = Vertex
4 = Segment
5 = Circle
6 = Texture
bool UseHalfSnap
Gets or sets if the snapping of the active tool snaps in the middle of a grid unit.
bool Texture
Gets or sets the preview Texture shown on the cursor. Only used by the PortalTool.
Functions
void MarkPolyPoint()
Creates a new point on the polyline at the cursor position. Remember to call ClearPolyline() when you finish using it.
void UndoPolyPoint()
Uncreates the last polyline point.
void AddPolyPoint(Vector2 position)
Force add a new point at an exact global position.
void ClearPolyline()
Deletes any existing polyline points and resets it for the next use.
Vector2 GetSnappedPosition(Vector2 position)
Takes any Vector2 and returns a Vector2 snapped to the grid.