mirror of
https://github.com/Siccity/xNode.git
synced 2025-12-21 09:46:03 +08:00
Improved node body design
This commit is contained in:
parent
85069f72ea
commit
efa1dc9ad5
@ -161,13 +161,8 @@ public partial class NodeEditorWindow {
|
|||||||
|
|
||||||
GUILayout.BeginArea(new Rect(nodePos,new Vector2(nodeEditor.GetWidth(), 4000)));
|
GUILayout.BeginArea(new Rect(nodePos,new Vector2(nodeEditor.GetWidth(), 4000)));
|
||||||
|
|
||||||
GUI.color = new Color(0.29f, 0.31f, 0.32f,0.8f);
|
GUIStyle style = NodeEditorResources.styles.nodeBody;
|
||||||
GUIStyle style = NodeEditorResources.styles.nodeContent;
|
|
||||||
GUILayout.BeginVertical(new GUIStyle(style));
|
GUILayout.BeginVertical(new GUIStyle(style));
|
||||||
GUI.color = new Color(0.1f, 0.1f, 0.1f, 0.9f);
|
|
||||||
style = NodeEditorResources.styles.nodeFrame;
|
|
||||||
GUILayout.BeginVertical(new GUIStyle(style));
|
|
||||||
GUI.color = Color.white;
|
|
||||||
|
|
||||||
//Draw node contents
|
//Draw node contents
|
||||||
Dictionary<NodePort, Vector2> portHandlePoints;
|
Dictionary<NodePort, Vector2> portHandlePoints;
|
||||||
@ -181,7 +176,6 @@ public partial class NodeEditorWindow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GUILayout.EndVertical();
|
|
||||||
GUILayout.EndVertical();
|
GUILayout.EndVertical();
|
||||||
|
|
||||||
//if (e.type == EventType.Repaint) node.rect.size = GUILayoutUtility.GetLastRect().size;
|
//if (e.type == EventType.Repaint) node.rect.size = GUILayoutUtility.GetLastRect().size;
|
||||||
|
|||||||
@ -12,10 +12,8 @@ public static class NodeEditorResources {
|
|||||||
private static Texture2D _dot;
|
private static Texture2D _dot;
|
||||||
public static Texture2D dotOuter { get { return _dotOuter != null ? _dotOuter : _dotOuter = Resources.Load<Texture2D>("unec_dot_outer"); } }
|
public static Texture2D dotOuter { get { return _dotOuter != null ? _dotOuter : _dotOuter = Resources.Load<Texture2D>("unec_dot_outer"); } }
|
||||||
private static Texture2D _dotOuter;
|
private static Texture2D _dotOuter;
|
||||||
public static Texture2D nodeFrame { get { return _nodeFrame != null ? _nodeFrame : _nodeFrame = Resources.Load<Texture2D>("unec_nodeframe"); } }
|
public static Texture2D nodeBody { get { return _nodeBody != null ? _nodeBody : _nodeBody = Resources.Load<Texture2D>("unec_node"); } }
|
||||||
private static Texture2D _nodeFrame;
|
private static Texture2D _nodeBody;
|
||||||
public static Texture2D nodeFrameOuter { get { return _nodeFrameOuter != null ? _nodeFrameOuter : _nodeFrameOuter = Resources.Load<Texture2D>("unec_nodeframe_outer"); } }
|
|
||||||
private static Texture2D _nodeFrameOuter;
|
|
||||||
|
|
||||||
//Grid colors
|
//Grid colors
|
||||||
private static Color backgroundColor = new Color(0.18f, 0.18f, 0.18f);
|
private static Color backgroundColor = new Color(0.18f, 0.18f, 0.18f);
|
||||||
@ -28,7 +26,7 @@ public static class NodeEditorResources {
|
|||||||
public static Styles _styles = null;
|
public static Styles _styles = null;
|
||||||
|
|
||||||
public class Styles {
|
public class Styles {
|
||||||
public GUIStyle inputPort, outputPort, nodeHeader, nodeFrame, nodeContent;
|
public GUIStyle inputPort, outputPort, nodeHeader, nodeBody;
|
||||||
|
|
||||||
public Styles() {
|
public Styles() {
|
||||||
GUIStyle baseStyle = new GUIStyle("Label");
|
GUIStyle baseStyle = new GUIStyle("Label");
|
||||||
@ -47,13 +45,9 @@ public static class NodeEditorResources {
|
|||||||
nodeHeader.fontStyle = FontStyle.Bold;
|
nodeHeader.fontStyle = FontStyle.Bold;
|
||||||
nodeHeader.normal.textColor = Color.white;
|
nodeHeader.normal.textColor = Color.white;
|
||||||
|
|
||||||
nodeFrame = new GUIStyle();
|
nodeBody = new GUIStyle();
|
||||||
nodeFrame.normal.background = nodeFrameOuter;
|
nodeBody.normal.background = NodeEditorResources.nodeBody;
|
||||||
nodeFrame.border = new RectOffset(32, 32, 32, 32);
|
nodeBody.border = new RectOffset(32, 32, 32, 32);
|
||||||
|
|
||||||
nodeContent = new GUIStyle();
|
|
||||||
nodeContent.normal.background = NodeEditorResources.nodeFrame;
|
|
||||||
nodeContent.border = new RectOffset(32, 32, 32, 32);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@ -7,13 +7,11 @@ TextureImporter:
|
|||||||
serializedVersion: 4
|
serializedVersion: 4
|
||||||
mipmaps:
|
mipmaps:
|
||||||
mipMapMode: 0
|
mipMapMode: 0
|
||||||
enableMipMap: 1
|
enableMipMap: 0
|
||||||
sRGBTexture: 1
|
sRGBTexture: 0
|
||||||
linearTexture: 0
|
linearTexture: 0
|
||||||
fadeOut: 0
|
fadeOut: 0
|
||||||
borderMipMap: 0
|
borderMipMap: 0
|
||||||
mipMapsPreserveCoverage: 0
|
|
||||||
alphaTestReferenceValue: 0.5
|
|
||||||
mipMapFadeDistanceStart: 1
|
mipMapFadeDistanceStart: 1
|
||||||
mipMapFadeDistanceEnd: 3
|
mipMapFadeDistanceEnd: 3
|
||||||
bumpmap:
|
bumpmap:
|
||||||
@ -29,14 +27,11 @@ TextureImporter:
|
|||||||
textureFormat: 1
|
textureFormat: 1
|
||||||
maxTextureSize: 2048
|
maxTextureSize: 2048
|
||||||
textureSettings:
|
textureSettings:
|
||||||
serializedVersion: 2
|
|
||||||
filterMode: -1
|
filterMode: -1
|
||||||
aniso: -1
|
aniso: 1
|
||||||
mipBias: -1
|
mipBias: -1
|
||||||
wrapU: -1
|
wrapMode: 1
|
||||||
wrapV: -1
|
nPOTScale: 0
|
||||||
wrapW: -1
|
|
||||||
nPOTScale: 1
|
|
||||||
lightmap: 0
|
lightmap: 0
|
||||||
compressionQuality: 50
|
compressionQuality: 50
|
||||||
spriteMode: 0
|
spriteMode: 0
|
||||||
@ -47,9 +42,9 @@ TextureImporter:
|
|||||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
spritePixelsToUnits: 100
|
spritePixelsToUnits: 100
|
||||||
alphaUsage: 1
|
alphaUsage: 1
|
||||||
alphaIsTransparency: 0
|
alphaIsTransparency: 1
|
||||||
spriteTessellationDetail: -1
|
spriteTessellationDetail: -1
|
||||||
textureType: 0
|
textureType: 2
|
||||||
textureShape: 1
|
textureShape: 1
|
||||||
maxTextureSizeSet: 0
|
maxTextureSizeSet: 0
|
||||||
compressionQualitySet: 0
|
compressionQualitySet: 0
|
||||||
@ -63,11 +58,42 @@ TextureImporter:
|
|||||||
crunchedCompression: 0
|
crunchedCompression: 0
|
||||||
allowsAlphaSplitting: 0
|
allowsAlphaSplitting: 0
|
||||||
overridden: 0
|
overridden: 0
|
||||||
|
- buildTarget: Standalone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
- buildTarget: iPhone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
- buildTarget: Android
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
- buildTarget: WebGL
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
spriteSheet:
|
spriteSheet:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
sprites: []
|
sprites: []
|
||||||
outline: []
|
outline: []
|
||||||
physicsShape: []
|
|
||||||
spritePackingTag:
|
spritePackingTag:
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
|
|||||||
Binary file not shown.
@ -1,98 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: dc27da104f7cfb24f8ad84db914f015a
|
|
||||||
timeCreated: 1506974712
|
|
||||||
licenseType: Free
|
|
||||||
TextureImporter:
|
|
||||||
fileIDToRecycleName: {}
|
|
||||||
serializedVersion: 4
|
|
||||||
mipmaps:
|
|
||||||
mipMapMode: 0
|
|
||||||
enableMipMap: 0
|
|
||||||
sRGBTexture: 0
|
|
||||||
linearTexture: 0
|
|
||||||
fadeOut: 0
|
|
||||||
borderMipMap: 0
|
|
||||||
mipMapsPreserveCoverage: 0
|
|
||||||
alphaTestReferenceValue: 0.5
|
|
||||||
mipMapFadeDistanceStart: 1
|
|
||||||
mipMapFadeDistanceEnd: 3
|
|
||||||
bumpmap:
|
|
||||||
convertToNormalMap: 0
|
|
||||||
externalNormalMap: 0
|
|
||||||
heightScale: 0.25
|
|
||||||
normalMapFilter: 0
|
|
||||||
isReadable: 0
|
|
||||||
grayScaleToAlpha: 0
|
|
||||||
generateCubemap: 6
|
|
||||||
cubemapConvolution: 0
|
|
||||||
seamlessCubemap: 0
|
|
||||||
textureFormat: 1
|
|
||||||
maxTextureSize: 2048
|
|
||||||
textureSettings:
|
|
||||||
serializedVersion: 2
|
|
||||||
filterMode: -1
|
|
||||||
aniso: 1
|
|
||||||
mipBias: -1
|
|
||||||
wrapU: 1
|
|
||||||
wrapV: 1
|
|
||||||
wrapW: -1
|
|
||||||
nPOTScale: 0
|
|
||||||
lightmap: 0
|
|
||||||
compressionQuality: 50
|
|
||||||
spriteMode: 0
|
|
||||||
spriteExtrude: 1
|
|
||||||
spriteMeshType: 1
|
|
||||||
alignment: 0
|
|
||||||
spritePivot: {x: 0.5, y: 0.5}
|
|
||||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
spritePixelsToUnits: 100
|
|
||||||
alphaUsage: 1
|
|
||||||
alphaIsTransparency: 1
|
|
||||||
spriteTessellationDetail: -1
|
|
||||||
textureType: 2
|
|
||||||
textureShape: 1
|
|
||||||
maxTextureSizeSet: 0
|
|
||||||
compressionQualitySet: 0
|
|
||||||
textureFormatSet: 0
|
|
||||||
platformSettings:
|
|
||||||
- buildTarget: DefaultTexturePlatform
|
|
||||||
maxTextureSize: 2048
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
- buildTarget: Standalone
|
|
||||||
maxTextureSize: 2048
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
- buildTarget: Android
|
|
||||||
maxTextureSize: 2048
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
- buildTarget: WebGL
|
|
||||||
maxTextureSize: 2048
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
spriteSheet:
|
|
||||||
serializedVersion: 2
|
|
||||||
sprites: []
|
|
||||||
outline: []
|
|
||||||
physicsShape: []
|
|
||||||
spritePackingTag:
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
Binary file not shown.
@ -1,98 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 1608df194c29ecd4d818b3b68dcdbc54
|
|
||||||
timeCreated: 1506974648
|
|
||||||
licenseType: Free
|
|
||||||
TextureImporter:
|
|
||||||
fileIDToRecycleName: {}
|
|
||||||
serializedVersion: 4
|
|
||||||
mipmaps:
|
|
||||||
mipMapMode: 0
|
|
||||||
enableMipMap: 0
|
|
||||||
sRGBTexture: 0
|
|
||||||
linearTexture: 0
|
|
||||||
fadeOut: 0
|
|
||||||
borderMipMap: 0
|
|
||||||
mipMapsPreserveCoverage: 0
|
|
||||||
alphaTestReferenceValue: 0.5
|
|
||||||
mipMapFadeDistanceStart: 1
|
|
||||||
mipMapFadeDistanceEnd: 3
|
|
||||||
bumpmap:
|
|
||||||
convertToNormalMap: 0
|
|
||||||
externalNormalMap: 0
|
|
||||||
heightScale: 0.25
|
|
||||||
normalMapFilter: 0
|
|
||||||
isReadable: 0
|
|
||||||
grayScaleToAlpha: 0
|
|
||||||
generateCubemap: 6
|
|
||||||
cubemapConvolution: 0
|
|
||||||
seamlessCubemap: 0
|
|
||||||
textureFormat: 1
|
|
||||||
maxTextureSize: 2048
|
|
||||||
textureSettings:
|
|
||||||
serializedVersion: 2
|
|
||||||
filterMode: -1
|
|
||||||
aniso: 1
|
|
||||||
mipBias: -1
|
|
||||||
wrapU: 1
|
|
||||||
wrapV: 1
|
|
||||||
wrapW: -1
|
|
||||||
nPOTScale: 0
|
|
||||||
lightmap: 0
|
|
||||||
compressionQuality: 50
|
|
||||||
spriteMode: 0
|
|
||||||
spriteExtrude: 1
|
|
||||||
spriteMeshType: 1
|
|
||||||
alignment: 0
|
|
||||||
spritePivot: {x: 0.5, y: 0.5}
|
|
||||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
spritePixelsToUnits: 100
|
|
||||||
alphaUsage: 1
|
|
||||||
alphaIsTransparency: 1
|
|
||||||
spriteTessellationDetail: -1
|
|
||||||
textureType: 2
|
|
||||||
textureShape: 1
|
|
||||||
maxTextureSizeSet: 0
|
|
||||||
compressionQualitySet: 0
|
|
||||||
textureFormatSet: 0
|
|
||||||
platformSettings:
|
|
||||||
- buildTarget: DefaultTexturePlatform
|
|
||||||
maxTextureSize: 2048
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
- buildTarget: Standalone
|
|
||||||
maxTextureSize: 2048
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
- buildTarget: Android
|
|
||||||
maxTextureSize: 2048
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
- buildTarget: WebGL
|
|
||||||
maxTextureSize: 2048
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
spriteSheet:
|
|
||||||
serializedVersion: 2
|
|
||||||
sprites: []
|
|
||||||
outline: []
|
|
||||||
physicsShape: []
|
|
||||||
spritePackingTag:
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
Loading…
x
Reference in New Issue
Block a user