浏览代码
Modify Node to be compatible with MG's layout
Modify Node to be compatible with MG's layout
- NodalView.uss is now gone as the Node's layouting is now in GraphView.uss - Node now has a bunch of containers to match Hugo's design This is not be final as, for example, the collapse button is an ugly button and we're not yet dealing with empty input/output list as required. Signed-off-by: joce <joce@unity3d.com>/main
Peter Bay Bastian
8 年前
当前提交
4a3e71ed
共有 6 个文件被更改,包括 283 次插入 和 130 次删除
-
1MaterialGraphProject/Assets/NewUI/Editor/Demo/Views/NodesContentView.cs
-
14MaterialGraphProject/Assets/NewUI/Editor/Demo/Views/Presenters/NodesContentViewPresenter.cs
-
90MaterialGraphProject/Assets/NewUI/Editor/Elements/Node.cs
-
196MaterialGraphProject/Assets/NewUI/Editor/Views/GraphView.uss
-
104MaterialGraphProject/Assets/NewUI/Editor/Demo/Views/NodalView.uss
-
8MaterialGraphProject/Assets/NewUI/Editor/Demo/Views/NodalView.uss.meta
|
|||
* { font:path("Assets/Resources/Roboto/Roboto-Regular.ttf"); |
|||
font-size:12; } |
|||
|
|||
Node #input { |
|||
flex:1; |
|||
} |
|||
|
|||
Node #output { |
|||
flex:1; |
|||
} |
|||
|
|||
Node #nodeMain { |
|||
flex:1; |
|||
} |
|||
|
|||
NodeAnchor { |
|||
margin-top:5; |
|||
margin-bottom:5; |
|||
} |
|||
|
|||
NodeAnchor #connector { |
|||
background-color:#111212; |
|||
border-radius:24; |
|||
width:10; |
|||
height:10; |
|||
} |
|||
|
|||
NodeAnchor #connector.anchorHighlight { |
|||
background-color:#F0F0F0; |
|||
} |
|||
|
|||
NodeAnchor #type { |
|||
text-color:#999; |
|||
flex:1; |
|||
} |
|||
|
|||
Node.horizontal #output NodeAnchor #type { |
|||
text-alignment:middle-right; |
|||
} |
|||
|
|||
Node.horizontal NodeAnchor #connector { |
|||
margin-left: 0; |
|||
margin-right: 4; |
|||
margin-top:2; |
|||
} |
|||
|
|||
Node.horizontal #output NodeAnchor #connector { |
|||
margin-left: 4; |
|||
margin-right: 0; |
|||
} |
|||
|
|||
Node.horizontal { |
|||
flex-direction: row; |
|||
} |
|||
|
|||
Node.horizontal #nodeMain{ |
|||
flex-direction: row; |
|||
} |
|||
|
|||
Node.horizontal #input, Node.horizontal #output { |
|||
margin-top: 24; |
|||
} |
|||
|
|||
Node.horizontal #input NodeAnchor { |
|||
flex-direction: row; |
|||
} |
|||
|
|||
Node.horizontal #output NodeAnchor { |
|||
flex-direction: row-reverse; |
|||
} |
|||
|
|||
Node.vertical #input, Node.vertical #output { |
|||
flex: 1; |
|||
flex-direction: row; |
|||
justify-content: center; |
|||
} |
|||
|
|||
Node.vertical NodeAnchor { |
|||
align-items: center; |
|||
} |
|||
|
|||
/* there is currently an issue with text size evaluation |
|||
which causes layout to "shake", so this is a just to avoid the visual glitch */ |
|||
Node.vertical NodeAnchor #type { |
|||
text-alignment:middle-center; |
|||
} |
|||
|
|||
Node.vertical #input NodeAnchor { |
|||
flex-direction: column; |
|||
} |
|||
|
|||
Node.vertical #output NodeAnchor { |
|||
flex-direction: column-reverse; |
|||
} |
|||
|
|||
/* Example of dynamic properties |
|||
Read from the GridBackground decorator */ |
|||
GridBackground { |
|||
grid-background-color:#141515; |
|||
line-color:#141515; |
|||
thick-line-color:#141515; |
|||
spacing:75.0; |
|||
thick-lines:0; |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: b3dd47151f230aa41a6182074b34fc0a |
|||
timeCreated: 1475841339 |
|||
licenseType: Pro |
|||
StyleSheetImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue