//----------------------------------------------------------------------------------- public CNFieldView(CNFieldController controller, CommandNodeEditor ownerEditor) { Controller = controller; selectionListBox_ = new CRListBox(Controller, "FieldLB", false); ownerNode_ = ownerEditor.Data; Controller.WantsUpdate += controller.BuildListItems; }
//----------------------------------------------------------------------------------- public CNFieldExtendedView(CNFieldController controller, CommandNodeEditor ownerEditor) : base(controller, ownerEditor) { nodesController_ = new CNNodesController(controller, ownerEditor); nodesListBox_ = new CRListBox(nodesController_, "FieldnodesLB", true); field_ = controller.Field; controller.WantsUpdate += nodesController_.SetSelectableNodes; }
//----------------------------------------------------------------------------------- public CNNodesController(CNFieldController fController, CommandNodeEditor ownerEditor) { fController_ = fController; field_ = fController.Field; manager_ = CNManager.Instance; hierarchy_ = manager_.Hierarchy; ownerNode_ = ownerEditor.Data; listCommandNodeAllowed_ = new List <CommandNode>(); listCommandNodeCurrent_ = new List <CommandNode>(); listSelectedIdx_ = new List <int>(); listTreeNodeAux_ = new List <CRTreeNode>(); SetSelectableNodes(); }
//----------------------------------------------------------------------------------- public override void Init(CNFieldController controller, CommandNodeEditor ownerEditor) { Instance.minSize = new Vector2(minWidth, minHeight); View = new CNFieldExtendedView(controller, ownerEditor); Controller = controller; }
//----------------------------------------------------------------------------------- public static CNFieldWindow ShowWindow <T>(string windowName, CNFieldController controller, CommandNodeEditor ownerEditor) where T : CNFieldWindow { if (IsOpen) { Instance.Close(); } Instance = EditorWindow.GetWindow <T>(true, windowName, true); Instance.Init(controller, ownerEditor); return(Instance); }
//----------------------------------------------------------------------------------- public abstract void Init(CNFieldController controller, CommandNodeEditor ownerEditor);
public void ApplyDragAction(CommandNode node, CommandNodeEditor nodeEditor, UnityEngine.Object[] arrDraggedObjects) { Type nodeType = node.GetType(); @switchDragAction[nodeType](nodeEditor, arrDraggedObjects); }