mirror of
https://github.com/Siccity/xNode.git
synced 2025-12-21 01:36:03 +08:00
UI stylistic changes
This commit is contained in:
parent
8972d0ba07
commit
0e6eb55143
@ -137,7 +137,7 @@ public class NodeEditor {
|
|||||||
Color col = GUI.color;
|
Color col = GUI.color;
|
||||||
GUI.color = NodeEditorUtilities.GetTypeColor(port.type);
|
GUI.color = NodeEditorUtilities.GetTypeColor(port.type);
|
||||||
GUI.DrawTexture(handleRect, NodeEditorResources.dot);
|
GUI.DrawTexture(handleRect, NodeEditorResources.dot);
|
||||||
GUI.color = Color.black;
|
GUI.color = new Color(0.29f,0.31f,0.32f);
|
||||||
GUI.DrawTexture(handleRect, NodeEditorResources.dotOuter);
|
GUI.DrawTexture(handleRect, NodeEditorResources.dotOuter);
|
||||||
GUI.color = col;
|
GUI.color = col;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -131,7 +131,9 @@ public partial class NodeEditorWindow {
|
|||||||
if (!_portConnectionPoints.ContainsKey(draggedOutput)) return;
|
if (!_portConnectionPoints.ContainsKey(draggedOutput)) return;
|
||||||
Vector2 from = draggedOutput.node.position.position + _portConnectionPoints[draggedOutput].center;
|
Vector2 from = draggedOutput.node.position.position + _portConnectionPoints[draggedOutput].center;
|
||||||
Vector2 to = draggedOutputTarget != null ? draggedOutputTarget.node.position.position + portConnectionPoints[draggedOutputTarget].center : WindowToGridPosition(Event.current.mousePosition);
|
Vector2 to = draggedOutputTarget != null ? draggedOutputTarget.node.position.position + portConnectionPoints[draggedOutputTarget].center : WindowToGridPosition(Event.current.mousePosition);
|
||||||
DrawConnection(from, to, NodeEditorUtilities.GetTypeColor(draggedOutput.type));
|
Color col = NodeEditorUtilities.GetTypeColor(draggedOutput.type);
|
||||||
|
col.a = 0.6f;
|
||||||
|
DrawConnection(from, to, col);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -25,9 +25,7 @@ public static class NodeEditorResources {
|
|||||||
public GUIStyle inputStyle, outputStyle;
|
public GUIStyle inputStyle, outputStyle;
|
||||||
|
|
||||||
public Styles() {
|
public Styles() {
|
||||||
GUIStyle baseStyle = new GUIStyle();
|
GUIStyle baseStyle = new GUIStyle("Label");
|
||||||
baseStyle.normal.textColor = Color.black;
|
|
||||||
baseStyle.onHover.textColor = Color.red;
|
|
||||||
baseStyle.fixedHeight = 18;
|
baseStyle.fixedHeight = 18;
|
||||||
|
|
||||||
inputStyle = new GUIStyle(baseStyle);
|
inputStyle = new GUIStyle(baseStyle);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user