Show / Hide Table of Contents

Class ConnectionControl

Base class for displaying connections in the level graph editor window.

Inheritance
System.Object
ConnectionControl
Namespace: Edgar.Unity
Assembly: cs.temp.dll.dll
Syntax
public class ConnectionControl

Fields

DefaultHandleWidth

Default width of the connection handle.

Declaration
public static readonly float DefaultHandleWidth
Field Value
Type Description
System.Single

Properties

Connection

The connection that this control represents/displays.

Declaration
public ConnectionBase Connection { get; }
Property Value
Type Description
ConnectionBase

From

Control of the From room.

Declaration
public RoomControl From { get; }
Property Value
Type Description
RoomControl

To

Control of the To room.

Declaration
public RoomControl To { get; }
Property Value
Type Description
RoomControl

Methods

Draw(Vector2, Single, Boolean)

Draws the room control.

Declaration
public virtual void Draw(Vector2 gridOffset, float zoom, bool isDirected)
Parameters
Type Name Description
Vector2 gridOffset

Offset of the level graph editor window.

System.Single zoom

Zoom of the level graph editor window.

System.Boolean isDirected
Remarks

It is advised to use the GetHandleRect(Vector2, Single) method for the base position and shape of the connection handle.

GetHandleRect(Vector2, Single)

Returns the Rect that will be used for determining if a user interacted with the handle of the connection.

Declaration
public virtual Rect GetHandleRect(Vector2 gridOffset, float zoom)
Parameters
Type Name Description
Vector2 gridOffset

Offset of the level graph editor window.

System.Single zoom

Zoom of the level graph editor window.

Returns
Type Description
Rect

Initialize(ConnectionBase, RoomControl, RoomControl)

Initializes the control.

Declaration
public void Initialize(ConnectionBase connection, RoomControl from, RoomControl to)
Parameters
Type Name Description
ConnectionBase connection
RoomControl from
RoomControl to

IsSelected()

Checks if the connection is currently selected in the editor.

Declaration
protected virtual bool IsSelected()
Returns
Type Description
System.Boolean
In This Article
Back to top Generated by DocFX