Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
Expansions.Missions.Editor.MEGUIConnector Class Reference

Mission expansion line connector, this uses vectoricy to draw a line between to MEGUINodes More...

Inheritance diagram for Expansions.Missions.Editor.MEGUIConnector:
Expansions.Missions.Editor.IMEHistoryTarget

Public Member Functions

void Activate ()
 Activate this connector and restore all it's references with the nodes and the editor More...
 
void AddNewEnd (MEGUINode node, MENodeConnectionType type)
 
void CleanUp ()
 
void ConnectLogic ()
 Connect the inner MENode from the UI Connection More...
 
IEnumerator DelayedUpdateLine ()
 
void Deselect ()
 Deselect this connector More...
 
void Destroy ()
 Disable this connector and remove all it's references with the nodes and the editor More...
 
void DisconnectLogic ()
 Disconnect the innter MENode from the UI Connection More...
 
MEGUINode GetConnectedNode ()
 
ConfigNode GetState ()
 
void HideLine ()
 Hides the line connector by setting the alpha value to 0 More...
 
bool IsConnectedToNode (MEGUINode node)
 
bool IsNewConnectionValid (MENodeConnectionType newType)
 
void Select ()
 Select this connector More...
 
void SetUpConnector (Canvas screenCanvas, RectTransform contentTransform, MissionEditorLogic missionEditorLogic)
 Set up a new MEGUIConnector More...
 
void UpdateLine ()
 Updates the line points More...
 
bool WasMouseClickWithinTolerance (Vector2 clickPosition, float acceptableDistanceForLineCheck)
 

Public Attributes

float curveArcSize = 15.0f
 Size of the curve in line segments More...
 
int curveSegments = 5
 Number of points used in the line curves More...
 
MEGUINode fromNode
 Node where the line starts from More...
 
bool isSelected
 Has the node been selected by the editor user? More...
 
float lineExtendFromConnectorDistance = 25.0f
 Distance that the line will extend from a node before bending More...
 
float normalLineWidth = 4.0f
 Thickness of the line when it's not selected More...
 
float selectedLineWidth = 8.0f
 Thickness of the line when it's selected More...
 
MEGUINode toNode
 Node where the line ends More...
 

Protected Member Functions

void MakeCurveType1 (Vector2 point, float deltaX, float deltaY, ref int index)
 Generates the points to make a curve from horizontal to vertical More...
 
void MakeCurveType2 (Vector2 point, float deltaX, float deltaY, ref int index)
 Generate the points to make a curve from vertical to horizontal More...
 

Protected Attributes

VectorLine connectionLine
 

Properties

Color LineColour [get, set]
 Colour of the line More...
 

Detailed Description

Mission expansion line connector, this uses vectoricy to draw a line between to MEGUINodes

Member Function Documentation

void Expansions.Missions.Editor.MEGUIConnector.Activate ( )
inline

Activate this connector and restore all it's references with the nodes and the editor

void Expansions.Missions.Editor.MEGUIConnector.AddNewEnd ( MEGUINode  node,
MENodeConnectionType  type 
)
inline
void Expansions.Missions.Editor.MEGUIConnector.CleanUp ( )
inline
void Expansions.Missions.Editor.MEGUIConnector.ConnectLogic ( )
inline

Connect the inner MENode from the UI Connection

IEnumerator Expansions.Missions.Editor.MEGUIConnector.DelayedUpdateLine ( )
inline
void Expansions.Missions.Editor.MEGUIConnector.Deselect ( )
inline

Deselect this connector

void Expansions.Missions.Editor.MEGUIConnector.Destroy ( )
inline

Disable this connector and remove all it's references with the nodes and the editor

void Expansions.Missions.Editor.MEGUIConnector.DisconnectLogic ( )
inline

Disconnect the innter MENode from the UI Connection

MEGUINode Expansions.Missions.Editor.MEGUIConnector.GetConnectedNode ( )
inline
ConfigNode Expansions.Missions.Editor.MEGUIConnector.GetState ( )
inline
void Expansions.Missions.Editor.MEGUIConnector.HideLine ( )
inline

Hides the line connector by setting the alpha value to 0

bool Expansions.Missions.Editor.MEGUIConnector.IsConnectedToNode ( MEGUINode  node)
inline
bool Expansions.Missions.Editor.MEGUIConnector.IsNewConnectionValid ( MENodeConnectionType  newType)
inline
void Expansions.Missions.Editor.MEGUIConnector.MakeCurveType1 ( Vector2  point,
float  deltaX,
float  deltaY,
ref int  index 
)
inlineprotected

Generates the points to make a curve from horizontal to vertical

Parameters
pointPoint where the line blends
deltaXThe delta x size between the two points that can affect the curve size
deltaYThe delta y size between the two points that can affect the curve size
indexStart point index in the line points array
void Expansions.Missions.Editor.MEGUIConnector.MakeCurveType2 ( Vector2  point,
float  deltaX,
float  deltaY,
ref int  index 
)
inlineprotected

Generate the points to make a curve from vertical to horizontal

Parameters
pointPoint where the line blends
deltaXThe delta x size between the two points that can affect the curve size
deltaYThe delta y size between the two points that can affect the curve size
indexStart point index in the line points array
void Expansions.Missions.Editor.MEGUIConnector.Select ( )
inline

Select this connector

void Expansions.Missions.Editor.MEGUIConnector.SetUpConnector ( Canvas  screenCanvas,
RectTransform  contentTransform,
MissionEditorLogic  missionEditorLogic 
)
inline

Set up a new MEGUIConnector

Parameters
screenCanvas
scrollMask
contentTransform
missionEditorLogic
void Expansions.Missions.Editor.MEGUIConnector.UpdateLine ( )
inline

Updates the line points

bool Expansions.Missions.Editor.MEGUIConnector.WasMouseClickWithinTolerance ( Vector2  clickPosition,
float  acceptableDistanceForLineCheck 
)
inline

Member Data Documentation

VectorLine Expansions.Missions.Editor.MEGUIConnector.connectionLine
protected
float Expansions.Missions.Editor.MEGUIConnector.curveArcSize = 15.0f

Size of the curve in line segments

int Expansions.Missions.Editor.MEGUIConnector.curveSegments = 5

Number of points used in the line curves

MEGUINode Expansions.Missions.Editor.MEGUIConnector.fromNode

Node where the line starts from

bool Expansions.Missions.Editor.MEGUIConnector.isSelected

Has the node been selected by the editor user?

float Expansions.Missions.Editor.MEGUIConnector.lineExtendFromConnectorDistance = 25.0f

Distance that the line will extend from a node before bending

float Expansions.Missions.Editor.MEGUIConnector.normalLineWidth = 4.0f

Thickness of the line when it's not selected

float Expansions.Missions.Editor.MEGUIConnector.selectedLineWidth = 8.0f

Thickness of the line when it's selected

MEGUINode Expansions.Missions.Editor.MEGUIConnector.toNode

Node where the line ends

4

Property Documentation

Color Expansions.Missions.Editor.MEGUIConnector.LineColour
getset

Colour of the line


The documentation for this class was generated from the following file: