1
0
mirror of https://github.com/Siccity/xNode.git synced 2025-12-20 09:16:01 +08:00

Fixed formatting

This commit is contained in:
Thor Brigsted 2018-12-27 02:55:09 +01:00
parent 3d1da00652
commit c321c276d1
2 changed files with 10 additions and 11 deletions

View File

@ -45,7 +45,7 @@ namespace XNodeEditor {
float spacePadding = 0; float spacePadding = 0;
SpaceAttribute spaceAttribute; SpaceAttribute spaceAttribute;
if (NodeEditorUtilities.GetCachedAttrib(port.node.GetType(), property.name, out spaceAttribute)) spacePadding = spaceAttribute.height; if (NodeEditorUtilities.GetCachedAttrib(port.node.GetType(), property.name, out spaceAttribute)) spacePadding = spaceAttribute.height;
// If property is an input, display a regular property field and put a port handle on the left side // If property is an input, display a regular property field and put a port handle on the left side
if (port.direction == XNode.NodePort.IO.Input) { if (port.direction == XNode.NodePort.IO.Input) {
@ -59,9 +59,9 @@ namespace XNodeEditor {
} }
//Call GUILayout.Space if Space attribute is set and we are NOT drawing a PropertyField //Call GUILayout.Space if Space attribute is set and we are NOT drawing a PropertyField
bool useLayoutSpace = instancePortList bool useLayoutSpace = instancePortList ||
|| showBacking == XNode.Node.ShowBackingValue.Never showBacking == XNode.Node.ShowBackingValue.Never ||
|| (showBacking == XNode.Node.ShowBackingValue.Unconnected && port.IsConnected); (showBacking == XNode.Node.ShowBackingValue.Unconnected && port.IsConnected);
if (spacePadding > 0 && useLayoutSpace) { if (spacePadding > 0 && useLayoutSpace) {
GUILayout.Space(spacePadding); GUILayout.Space(spacePadding);
spacePadding = 0; spacePadding = 0;
@ -104,11 +104,10 @@ namespace XNodeEditor {
} }
//Call GUILayout.Space if Space attribute is set and we are NOT drawing a PropertyField //Call GUILayout.Space if Space attribute is set and we are NOT drawing a PropertyField
bool useLayoutSpace = instancePortList bool useLayoutSpace = instancePortList ||
|| showBacking == XNode.Node.ShowBackingValue.Never showBacking == XNode.Node.ShowBackingValue.Never ||
|| (showBacking == XNode.Node.ShowBackingValue.Unconnected && port.IsConnected); (showBacking == XNode.Node.ShowBackingValue.Unconnected && port.IsConnected);
if (spacePadding > 0 && useLayoutSpace) if (spacePadding > 0 && useLayoutSpace) {
{
GUILayout.Space(spacePadding); GUILayout.Space(spacePadding);
spacePadding = 0; spacePadding = 0;
} }

View File

@ -56,7 +56,7 @@ namespace XNodeEditor {
} }
Dictionary<Type, Attribute> typeTypes; Dictionary<Type, Attribute> typeTypes;
if(!typeFields.TryGetValue(fieldName, out typeTypes)) { if (!typeFields.TryGetValue(fieldName, out typeTypes)) {
typeTypes = new Dictionary<Type, Attribute>(); typeTypes = new Dictionary<Type, Attribute>();
typeFields.Add(fieldName, typeTypes); typeFields.Add(fieldName, typeTypes);
} }
@ -67,7 +67,7 @@ namespace XNodeEditor {
else typeTypes.Add(typeof(T), null); else typeTypes.Add(typeof(T), null);
} }
if(attr == null) { if (attr == null) {
attribOut = null; attribOut = null;
return false; return false;
} }