PathTool - Megasploot/Dungeondraft GitHub Wiki
Overview
The tool used to edit paths. Inherits from Tool.
See WorldUI.
Note, adding a point directly to the Pathway will not reflect visually the normal behavior to the user. Dungeondraft internally calls Global.World.UI.MarkPolyPoint() which adds a visual point where the mouse cursor is and then informs the Pathway of the changes.
Accessed by Global.Editor.Tools["PathTool"]
.
Controls
Controls are UI elements that can be accessed by indexing Controls[id].
HSlider Controls["Width"]
Allows the user to adjust the future path width.
HSlider Controls["Smoothness"]
Allows the user to adjust the future path smoothness.
CheckButton Controls["BlockLight"]
Allows the user to adjust blocking light.
OptionButton Controls["TransitionIn"]
Allows the user to adjust the start transition. Id 0 is None, Id 1 is Fade, Id 2 is Grow.
OptionButton Controls["TransitionOut"]
Allows the user to adjust the end transition. Id 0 is None, Id 1 is Fade, Id 2 is Shrink.
Properties
Pathway ActivePath
Gets the current unfinished Pathway (path).
See Pathway.
float Smoothness
Gets or sets the next path's smoothness.
int ActiveLayer
Gets and sets whether the tool's layer.
Texture Texture
Gets and sets the texture used for the next path drawn.
float Width
Gets and sets the width used for the next path drawn.
Functions
void StartPath()
Create a new path with zero points and sets it as the ActivePath.
void Confirm()
Finishes any path started and closes loops if possible.
void UpdatePath()
Updates the visuals of the current unfinished path.
void SetFadeIn(bool value)
Marks future paths to fade in.
void SetFadeOut(bool value)
Marks future paths to fade out.
void SetTransitionIn(int value)
Sets the type of transition for the fade. 0 is disable, 1 is fade in, 2 is grow/shrink.
void SetTransitionOut(int value)
Sets the type of transition for the fade. 0 is disable, 1 is fade in, 2 is grow/shrink.
void SetBlockLight(bool value)
Updates whether the current unfinished path should block light.