Platformer Pro  2.3.2
A platform game kit for Unity.
XNodeEditor.NodeEditorWindow Class Reference

Contains GUI methods More...

Inheritance diagram for XNodeEditor.NodeEditorWindow:

Public Types

enum class  NodeActivity {
  Idle , HoldNode , DragNode , HoldGrid ,
  DragGrid
}
 

Public Member Functions

void Controls ()
 
void Home ()
 Puts all selected nodes in focus. If no nodes are present, resets view and zoom to to origin More...
 
void RemoveSelectedNodes ()
 Remove nodes in the graph in Selection.objects More...
 
void RenameSelectedNode ()
 Initiate a rename on the currently selected node More...
 
void MoveNodeToTop (XNode.Node node)
 Draw this node on top of other nodes by placing it last in the graph.nodes list More...
 
void DuplicateSelectedNodes ()
 Duplicate selected nodes and select the duplicates More...
 
void CopySelectedNodes ()
 
void PasteNodes (Vector2 pos)
 
void DrawDraggedConnection ()
 Draw a connection as we are dragging it More...
 
void AutoConnect (XNode.Node node)
 Attempt to connect dragged output to target node More...
 
void DrawGrid (Rect rect, float zoom, Vector2 panOffset)
 
void DrawSelectionBox ()
 
void DrawNoodle (Gradient gradient, NoodlePath path, NoodleStroke stroke, float thickness, List< Vector2 > gridPoints)
 Draw a bezier from output to input in grid coordinates More...
 
void DrawConnections ()
 Draws all connections More...
 
void Save ()
 
void SaveAs ()
 
Vector2 WindowToGridPosition (Vector2 windowPosition)
 
Vector2 GridToWindowPosition (Vector2 gridPosition)
 
Rect GridToWindowRectNoClipped (Rect gridRect)
 
Rect GridToWindowRect (Rect gridRect)
 
Vector2 GridToWindowPositionNoClipped (Vector2 gridPosition)
 
void SelectNode (XNode.Node node, bool add)
 
void DeselectNode (XNode.Node node)
 

Static Public Member Functions

static void BeginZoomed (Rect rect, float zoom, float topPadding)
 
static void EndZoomed (Rect rect, float zoom, float topPadding)
 
static bool DropdownButton (string name, float width)
 
static NodeEditorWindow Init ()
 Create editor window More...
 
static bool OnOpen (int instanceID, int line)
 
static NodeEditorWindow Open (XNode.NodeGraph graph)
 Open the provided graph in the NodeEditor More...
 
static void RepaintAll ()
 Repaint all open NodeEditorWindows. More...
 
static string GetTitle (XNode.NodeGraph graph)
 

Public Attributes

XNode.NodePort hoveredPort = null
 
NodeGraphEditor graphEditor
 
XNode.NodeGraph graph
 

Static Public Attributes

static NodeActivity currentActivity = NodeActivity.Idle
 
static Vector2[] dragOffset
 
static XNode.Node[] copyBuffer = null
 
static NodeEditorWindow current
 

Protected Member Functions

virtual void OnGUI ()
 

Properties

static bool isPanning [get]
 
Dictionary< XNode.NodePort, Rect > portConnectionPoints [get]
 Stores node positions for all nodePorts. More...
 
Dictionary< XNode.Node, Vector2 > nodeSizes [get]
 
Vector2 panOffset [get, set]
 
float zoom [get, set]
 

Events

Action onLateGUI
 Executed after all other window GUI. Useful if Zoom is ruining your day. Automatically resets after being run. More...
 

Detailed Description

Contains GUI methods

Member Enumeration Documentation

◆ NodeActivity

Enumerator
Idle 
HoldNode 
DragNode 
HoldGrid 
DragGrid 

Member Function Documentation

◆ AutoConnect()

void XNodeEditor.NodeEditorWindow.AutoConnect ( XNode.Node  node)

Attempt to connect dragged output to target node

◆ BeginZoomed()

static void XNodeEditor.NodeEditorWindow.BeginZoomed ( Rect  rect,
float  zoom,
float  topPadding 
)
static

◆ Controls()

void XNodeEditor.NodeEditorWindow.Controls ( )

◆ CopySelectedNodes()

void XNodeEditor.NodeEditorWindow.CopySelectedNodes ( )

◆ DeselectNode()

void XNodeEditor.NodeEditorWindow.DeselectNode ( XNode.Node  node)

◆ DrawConnections()

void XNodeEditor.NodeEditorWindow.DrawConnections ( )

Draws all connections

◆ DrawDraggedConnection()

void XNodeEditor.NodeEditorWindow.DrawDraggedConnection ( )

Draw a connection as we are dragging it

◆ DrawGrid()

void XNodeEditor.NodeEditorWindow.DrawGrid ( Rect  rect,
float  zoom,
Vector2  panOffset 
)

◆ DrawNoodle()

void XNodeEditor.NodeEditorWindow.DrawNoodle ( Gradient  gradient,
NoodlePath  path,
NoodleStroke  stroke,
float  thickness,
List< Vector2 >  gridPoints 
)

Draw a bezier from output to input in grid coordinates

◆ DrawSelectionBox()

void XNodeEditor.NodeEditorWindow.DrawSelectionBox ( )

◆ DropdownButton()

static bool XNodeEditor.NodeEditorWindow.DropdownButton ( string  name,
float  width 
)
static

◆ DuplicateSelectedNodes()

void XNodeEditor.NodeEditorWindow.DuplicateSelectedNodes ( )

Duplicate selected nodes and select the duplicates

◆ EndZoomed()

static void XNodeEditor.NodeEditorWindow.EndZoomed ( Rect  rect,
float  zoom,
float  topPadding 
)
static

◆ GetTitle()

static string XNodeEditor.NodeEditorWindow.GetTitle ( XNode.NodeGraph  graph)
static

◆ GridToWindowPosition()

Vector2 XNodeEditor.NodeEditorWindow.GridToWindowPosition ( Vector2  gridPosition)

◆ GridToWindowPositionNoClipped()

Vector2 XNodeEditor.NodeEditorWindow.GridToWindowPositionNoClipped ( Vector2  gridPosition)

◆ GridToWindowRect()

Rect XNodeEditor.NodeEditorWindow.GridToWindowRect ( Rect  gridRect)

◆ GridToWindowRectNoClipped()

Rect XNodeEditor.NodeEditorWindow.GridToWindowRectNoClipped ( Rect  gridRect)

◆ Home()

void XNodeEditor.NodeEditorWindow.Home ( )

Puts all selected nodes in focus. If no nodes are present, resets view and zoom to to origin

◆ Init()

static NodeEditorWindow XNodeEditor.NodeEditorWindow.Init ( )
static

Create editor window

◆ MoveNodeToTop()

void XNodeEditor.NodeEditorWindow.MoveNodeToTop ( XNode.Node  node)

Draw this node on top of other nodes by placing it last in the graph.nodes list

◆ OnGUI()

virtual void XNodeEditor.NodeEditorWindow.OnGUI ( )
protectedvirtual

◆ OnOpen()

static bool XNodeEditor.NodeEditorWindow.OnOpen ( int  instanceID,
int  line 
)
static

◆ Open()

static NodeEditorWindow XNodeEditor.NodeEditorWindow.Open ( XNode.NodeGraph  graph)
static

Open the provided graph in the NodeEditor

◆ PasteNodes()

void XNodeEditor.NodeEditorWindow.PasteNodes ( Vector2  pos)

◆ RemoveSelectedNodes()

void XNodeEditor.NodeEditorWindow.RemoveSelectedNodes ( )

Remove nodes in the graph in Selection.objects

◆ RenameSelectedNode()

void XNodeEditor.NodeEditorWindow.RenameSelectedNode ( )

Initiate a rename on the currently selected node

◆ RepaintAll()

static void XNodeEditor.NodeEditorWindow.RepaintAll ( )
static

Repaint all open NodeEditorWindows.

◆ Save()

void XNodeEditor.NodeEditorWindow.Save ( )

◆ SaveAs()

void XNodeEditor.NodeEditorWindow.SaveAs ( )

◆ SelectNode()

void XNodeEditor.NodeEditorWindow.SelectNode ( XNode.Node  node,
bool  add 
)

◆ WindowToGridPosition()

Vector2 XNodeEditor.NodeEditorWindow.WindowToGridPosition ( Vector2  windowPosition)

Member Data Documentation

◆ copyBuffer

XNode.Node [] XNodeEditor.NodeEditorWindow.copyBuffer = null
static

◆ current

NodeEditorWindow XNodeEditor.NodeEditorWindow.current
static

◆ currentActivity

NodeActivity XNodeEditor.NodeEditorWindow.currentActivity = NodeActivity.Idle
static

◆ dragOffset

Vector2 [] XNodeEditor.NodeEditorWindow.dragOffset
static

◆ graph

XNode.NodeGraph XNodeEditor.NodeEditorWindow.graph

◆ graphEditor

NodeGraphEditor XNodeEditor.NodeEditorWindow.graphEditor

◆ hoveredPort

XNode.NodePort XNodeEditor.NodeEditorWindow.hoveredPort = null

Property Documentation

◆ isPanning

bool XNodeEditor.NodeEditorWindow.isPanning
staticget

◆ nodeSizes

Dictionary<XNode.Node, Vector2> XNodeEditor.NodeEditorWindow.nodeSizes
get

◆ panOffset

Vector2 XNodeEditor.NodeEditorWindow.panOffset
getset

◆ portConnectionPoints

Dictionary<XNode.NodePort, Rect> XNodeEditor.NodeEditorWindow.portConnectionPoints
get

Stores node positions for all nodePorts.

◆ zoom

float XNodeEditor.NodeEditorWindow.zoom
getset

Event Documentation

◆ onLateGUI

Action XNodeEditor.NodeEditorWindow.onLateGUI

Executed after all other window GUI. Useful if Zoom is ruining your day. Automatically resets after being run.


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