Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strengthen #216

Open
wants to merge 73 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
ba47fbd
!W 加入了IcSkillSystme连接
yika-aixi Sep 21, 2019
113eb4b
!T 调整了绘制顺序
yika-aixi Sep 21, 2019
574e345
!B 没有过滤保护和内部等其他类型字段,导致出现多次
yika-aixi Sep 21, 2019
d6e64f8
!T 忽略meta
yika-aixi Sep 21, 2019
ee68490
!D meta
yika-aixi Sep 21, 2019
3a1b594
!W Input新增了一个BaseType得指定,当`TypeConstraint`为TypeConstraint.Inherited时可用
yika-aixi Sep 22, 2019
3134dc1
!B 节点创建时没有设置Input的TypeConstraintBaseType
yika-aixi Sep 22, 2019
354f7d1
!W 新增了一个获取当前节点鼠标在Group中的坐标
yika-aixi Sep 24, 2019
38df17b
!W 绘制不可被unity序列化的类型端口
yika-aixi Sep 24, 2019
0602d3f
!W 动态Port新增了一个删除
yika-aixi Sep 24, 2019
2017fc8
!OW 让使用者可以自定义不需要显示的字段
yika-aixi Sep 25, 2019
25514fc
!B Group 空问题
yika-aixi Sep 25, 2019
7c3c106
!W 加了一个创建当前Group所支持的所有节点功能,用于调试
yika-aixi Sep 25, 2019
9be869f
!B 坐标计算错误
yika-aixi Sep 25, 2019
40db69a
!T 回滚绘制顺序,太难看了,哈哈
yika-aixi Sep 25, 2019
fdd42a8
!W 输出端口索引显示
yika-aixi Sep 25, 2019
46d0933
!W 绘制GroupName
yika-aixi Sep 26, 2019
2248e0f
!O 调整了GroupName 绘制得顺序,如果连接数只有一个不显示索引,索引数+1
yika-aixi Sep 27, 2019
eb3d24f
!W 右键添加节点的方式从`GenericMenu`改为`PopupWindow`,目前有个小bug,点出线后,右键本来应该是取消线的选择…
yika-aixi Nov 23, 2019
0721750
!W 搜索时按下`↓`键切换焦点到`TreeView`
yika-aixi Nov 26, 2019
284ecdd
!T 加一个最小尺寸
yika-aixi Nov 26, 2019
02f5998
!B 节点选择窗口无法关闭
yika-aixi Nov 26, 2019
cfb4d2c
!W `GenericMenu`改为`MenuPopupWindow`
yika-aixi Nov 26, 2019
1691e4c
!W
yika-aixi Nov 26, 2019
2b21b0d
!B 端口连接后,没有释放连接线
yika-aixi Nov 26, 2019
0893d3b
!W 一个关闭所有`Node Editor Window`窗口的菜单项
yika-aixi Nov 27, 2019
1fece9c
!T(Node Editor Window Action) 右键Node恢复为`GenericMenu`
yika-aixi Nov 27, 2019
413f4e2
!O(Dynamic Port List) 默认实现存在潜规则,删除了潜规则
yika-aixi Nov 27, 2019
5b8a751
Merge branch 'Cabin_Icarus' of https://github.com/yika-aixi/xNode int…
yika-aixi Nov 27, 2019
2c45dd4
!O(NodeEditorGUILayout) DynamicPortList
yika-aixi Nov 29, 2019
25053ea
!WO(Node Editor Window) Multi Open Support
yika-aixi Nov 29, 2019
ae9429f
!TX
yika-aixi Nov 29, 2019
efbab70
!WF(Node Editor) OnFocus Trigger OnInit
yika-aixi Dec 1, 2019
e04b4fc
!W(Node Editor GUILayout) DynamicPortList Add `OnAdd` Action
yika-aixi Dec 1, 2019
ecb8636
!W(Node) one new Attribute `LabelAttribute`
yika-aixi Dec 2, 2019
32e375e
!W(Node Editor GUI Layout) `LabelAttribute` logic
yika-aixi Dec 2, 2019
84c1e9e
!TX todo
yika-aixi Dec 3, 2019
6213363
!TX remove todo
yika-aixi Dec 3, 2019
15ef258
!TX
yika-aixi Dec 3, 2019
fe313be
!B NullReferenceException
yika-aixi Dec 4, 2019
17eb6cd
!W(Node Port) `_fieldName`字段增加一个常量提供给Editor使用
yika-aixi Dec 8, 2019
ec7133d
!W(Node) `output`动态端口永远在最后
yika-aixi Dec 8, 2019
2bcfbc8
!W(NodePort) 刷新ValueType,外部通过`SerializedProperty`改变了port的顺序,但是实例的valu…
yika-aixi Dec 8, 2019
eb7c909
!R(Dynamic Port List) 顺序改变,这次重写应该再也不会出现未知的错误=-=
yika-aixi Dec 8, 2019
259a70d
!B(Node Port) 相同节点,相同端口连接不断开链接同时也不进行连接
yika-aixi Dec 8, 2019
a749def
!TX
yika-aixi Dec 8, 2019
cf6cdde
!BO(Menu Tree View) 可能会出现多个相同菜单,删除了`OnFocus`
yika-aixi Dec 9, 2019
cf59838
!O
yika-aixi Dec 9, 2019
210cb33
!B(Node Editor Window) multi open NullPointerException
yika-aixi Dec 9, 2019
f77183c
Sync Siccity `https://github.com/Siccity/xNode`
yika-aixi Dec 9, 2019
7e4e4b6
!TX
yika-aixi Dec 9, 2019
c0b80b5
!B(Create Node) pos error
yika-aixi Dec 9, 2019
7624d4a
!OA(Menu Popup Window) Move to MenuPopup folder
yika-aixi Dec 21, 2019
10636cd
!T(Port) remove baseType
yika-aixi Dec 21, 2019
2a12608
!TX(Port) remove baseType
yika-aixi Dec 21, 2019
1e155fb
!TX(Port) remove baseType
yika-aixi Dec 21, 2019
2fb21d0
!TX Coding conventions
yika-aixi Dec 21, 2019
f7251ee
Merge remote-tracking branch 'remotes/Siccity/master' into Cabin_Icarus
yika-aixi Dec 21, 2019
5d22596
!TX(Code format)
yika-aixi Dec 23, 2019
6ecef29
!TX(Code format)
yika-aixi Dec 23, 2019
d35fba4
Merge remote-tracking branch 'remotes/Siccity/master' into Cabin_Icarus
yika-aixi Dec 23, 2019
33a516b
!TX(Code format) var to concrete Type
yika-aixi Dec 23, 2019
daf7fb9
!B(NodeEditorWindow) multiple NodeEditorWindow,Target error
yika-aixi Jan 6, 2020
7a7c0ff
!I Siccity/master -> yika-aixi/Cabin_Icarus
yika-aixi May 28, 2020
570e01d
!W OnRename
yika-aixi May 28, 2020
e77fcc5
!W(Node Editor) Out Port Always at the bottom
yika-aixi Aug 2, 2020
3761aa1
!O(Node Editor) Adjust the drawing order
yika-aixi Aug 2, 2020
8454b1f
!W(Node Editor Widnow) exposed set Lock
yika-aixi Aug 2, 2020
4ab79fe
!WT
yika-aixi Aug 2, 2020
e49753c
!TX
yika-aixi Aug 6, 2020
d705c8b
!B(Node Port) Now the conversion judgment will be made, if it can be …
yika-aixi Sep 11, 2020
8da6d7f
!B(Node Editor Widnow) Switch graph still old graph
yika-aixi Sep 12, 2020
8c4a6e8
!TX
yika-aixi Sep 15, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ sysinfo.txt
.git.meta
.gitignore.meta
.gitattributes.meta
*.meta

# OS X only:
.DS_Store
7 changes: 0 additions & 7 deletions CONTRIBUTING.md.meta

This file was deleted.

7 changes: 0 additions & 7 deletions LICENSE.md.meta

This file was deleted.

7 changes: 0 additions & 7 deletions README.md.meta

This file was deleted.

9 changes: 0 additions & 9 deletions Scripts.meta

This file was deleted.

10 changes: 0 additions & 10 deletions Scripts/Attributes.meta

This file was deleted.

13 changes: 0 additions & 13 deletions Scripts/Attributes/NodeEnum.cs.meta

This file was deleted.

9 changes: 0 additions & 9 deletions Scripts/Editor.meta

This file was deleted.

10 changes: 0 additions & 10 deletions Scripts/Editor/Drawers.meta

This file was deleted.

13 changes: 0 additions & 13 deletions Scripts/Editor/Drawers/NodeEnumDrawer.cs.meta

This file was deleted.

8 changes: 0 additions & 8 deletions Scripts/Editor/Drawers/Odin.meta

This file was deleted.

11 changes: 0 additions & 11 deletions Scripts/Editor/Drawers/Odin/InNodeEditorAttributeProcessor.cs.meta

This file was deleted.

11 changes: 0 additions & 11 deletions Scripts/Editor/Drawers/Odin/InputAttributeDrawer.cs.meta

This file was deleted.

11 changes: 0 additions & 11 deletions Scripts/Editor/Drawers/Odin/OutputAttributeDrawer.cs.meta

This file was deleted.

8 changes: 0 additions & 8 deletions Scripts/Editor/Internal.meta

This file was deleted.

11 changes: 0 additions & 11 deletions Scripts/Editor/Internal/RerouteReference.cs.meta

This file was deleted.

101 changes: 101 additions & 0 deletions Scripts/Editor/MenuPopup/MenuPopupWindow.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
using System;
using UnityEditor;
using UnityEditor.IMGUI.Controls;
using UnityEngine;

namespace XNodeEditor
{
/// <summary>
/// Menu Popup Window
/// </summary>
public class MenuPopupWindow : PopupWindowContent
{
public Vector2 openBeforeMousePos;
private SearchField search;
private MenuTreeView menuTree;
public Action onCloseAction;
public MenuPopupWindow()
{
search = new SearchField();
menuTree = new MenuTreeView();
}

private bool isInit;

/// <summary>
/// Add Item
/// </summary>
/// <param name="menuPath">Item Path</param>
/// <param name="onClick"></param>
/// <param name="symbol">Path separator</param>
/// <param name="autoClose">Automatically close window after selecting an item</param>
public void AddItem(string menuPath, Action onClick, char symbol = '/',bool autoClose = true)
{
menuTree.AddItem(menuPath, () =>
{
onClick?.Invoke();
if (autoClose)
{
editorWindow.Close();
}
},symbol);
}

/// <summary>
/// Init or Reload Tree
/// </summary>
public void Init()
{
menuTree.Reload();
isInit = true;
}

public override void OnOpen()
{
search.SetFocus();
}

public override void OnClose()
{
onCloseAction?.Invoke();
}

private string _str;
public override void OnGUI(Rect rect)
{
if (!isInit)
{
Init();
}

EventAction();

EditorGUI.BeginChangeCheck();
{
_str = search.OnGUI(new Rect(rect.position, new Vector2(rect.width, 20)),_str);
}
if (EditorGUI.EndChangeCheck())
{
menuTree.searchString = _str;
}

menuTree.OnGUI(new Rect(new Vector2(0,25),rect.size - new Vector2(0,20)));
}

private void EventAction()
{
Event e = Event.current;
switch (e.type)
{
case EventType.KeyDown:

if (e.keyCode == KeyCode.DownArrow && !menuTree.HasFocus())
{
menuTree.SetFocusAndEnsureSelectedItem();
e.Use();
}
break;
}
}
}
}
Loading