浏览代码

USS clean-up for nodes

/main
Peter Bay Bastian 8 年前
当前提交
c90ddfc2
共有 9 个文件被更改,包括 83 次插入119 次删除
  1. 2
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/COPIED/NodeAnchor.cs
  2. 1
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/Drawer/HeaderDrawer.cs
  3. 2
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/Drawer/NodeDrawer.cs
  4. 68
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/Styles/SerializableGraph.uss
  5. 2
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Drawer/MaterialNodeDrawer.cs
  6. 100
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Styles/MaterialGraph.uss
  7. 19
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/Styles/Header.uss
  8. 8
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/Styles/Header.uss.meta

2
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/COPIED/NodeAnchor.cs


public NodeAnchor(NodeAnchorData data)
{
// currently we don't want to be styled as .graphElement since we're contained in a Node
classList = ClassList.empty;
classList = new ClassList("NodeAnchor");
m_CurrentConnector = m_RegularConnector;
AddManipulator(m_CurrentConnector);

1
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/Drawer/HeaderDrawer.cs


namespace UnityEditor.Graphing.Drawing
{
[StyleSheet("Assets/GraphFramework/SerializableGraph/Editor/Drawing/Styles/Header.uss")]
public class HeaderDrawer : GraphElement
{
private VisualElement m_Title;

2
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/Drawer/NodeDrawer.cs


AddContainers();
AddToClassList("NodeDrawer");
AddToClassList("Node");
}
private void AddContainers()

68
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/Styles/SerializableGraph.uss


NodeDrawer {
.Node {
padding-top: 15;
height: 26;
NodeDrawer #slots {
.Node #slots {
background-color: #444;
width: 200;
NodeDrawer #slots #input {
flex:1;
.Node #slots #input {
flex: 1;
NodeDrawer #slots #output {
flex:1;
.Node #slots #output {
flex: 1;
NodeDrawer #controls {
flex-direction: column;
padding-bottom: 2;
.Node #slots .NodeAnchor {
height: 26;
align-items: center;
NodeDrawer #controls #element{
flex-direction: column;
.Node #slots .NodeAnchor #connector {
background-color:#FF0;
border-color:#FF0;
/* width is currently hard-coded */
border-width: 4;
margin-left: 5;
margin-right: 5;
NodeDrawer {
height: 26;
.Node #slots .NodeAnchor #connector.anchorHighlight {
background-color:#00F;
NodeDrawer #preview {
flex-direction: column;
.Node #slots #input .NodeAnchor {
flex-direction: row;
NodeDrawer #preview #image {
height: 200;
width: 200;
.Node #slots #output .NodeAnchor {
flex-direction: row-reverse;
NodeAnchor {
height: 26;
.Node #slots .NodeAnchor #type {
text-color:#FFF;
flex:1;
.Node #slots #input .NodeAnchor #type {
text-alignment: middle-left;
}
.Node #slots #output .NodeAnchor #type {
text-alignment: middle-right;
}
.Node #controls {
flex-direction: column;
padding-bottom: 2;
background-color: #444;
}
.Node #controls #element{
flex-direction: column;
}

2
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Drawer/MaterialNodeDrawer.cs


{
CreateContainers();
AddToClassList("MaterialNode");
onEnter += SchedulePolling;
onLeave += UnschedulePolling;
}

100
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Styles/MaterialGraph.uss


MaterialNodeDrawer {
flex-direction: column;
}
HeaderDrawer {
flex-direction: row;
}
HeaderDrawer #title {
text-color: #FFFFFF;
width: 200;
text-alignment: middle-center;
}
HeaderDrawer #expandButton {
text-color: #FFFFFF;
position-type: absolute;
position-top: 0;
position-left: 5;
width: 10;
text-alignment: middle-center;
height: 14;
}
MaterialNodeDrawer #slots {
margin-top: 15;
flex-direction: row;
background-color: #444;
width: 200;
}
MaterialNodeDrawer #slots #input{
flex:1;
}
MaterialNodeDrawer #slots #output {
flex:1;
}
/* NodeAnchor */
MaterialNodeDrawer #slots NodeAnchor {
align-items: center;
}
MaterialNodeDrawer #slots #input NodeAnchor {
flex-direction: row;
}
MaterialNodeDrawer #slots #output NodeAnchor {
flex-direction: row-reverse;
}
/* NodeAnchor #connector */
NodeAnchor #connector {
background-color:#FF0;
border-color:#FF0;
/* width is currently hard-coded */
border-width: 4;
margin-left: 5;
margin-right: 5;
}
NodeAnchor #connector.anchorHighlight {
background-color:#00F;
}
/* NodeAnchor #type */
MaterialNodeDrawer #slots NodeAnchor #type {
text-color:#FFF;
flex:1;
}
MaterialNodeDrawer #slots #input NodeAnchor #type {
text-alignment: middle-left;
}
MaterialNodeDrawer #slots #output NodeAnchor #type {
text-alignment: middle-right;
}
MaterialNodeDrawer #controls {
.MaterialNode #preview {
padding-bottom: 2;
MaterialNodeDrawer #controls #element{
flex-direction: column;
}
MaterialNodeDrawer #preview {
flex-direction: column;
background-color: #444;
}
MaterialNodeDrawer #preview #image {
.MaterialNode #preview #image {
height: 200;
width: 200;
}

thick-line-color:#030C22;
spacing:75.0;
thick-lines:10;
}
}

19
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/Styles/Header.uss


HeaderDrawer {
flex-direction: row;
}
HeaderDrawer #title {
text-color: #FFFFFF;
width: 200;
text-alignment: middle-center;
}
HeaderDrawer #expandButton {
text-color: #FFFFFF;
position-type: absolute;
position-top: 0;
position-left: 5;
width: 10;
text-alignment: middle-center;
height: 14;
}

8
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/Styles/Header.uss.meta


fileFormatVersion: 2
guid: d8ee6a82394ca48bbbdc1184a36492e2
timeCreated: 1481286707
licenseType: Pro
StyleSheetImporter:
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存