mirror of
https://github.com/Siccity/xNode.git
synced 2026-03-26 22:49:02 +08:00
!W 绘制GroupName
This commit is contained in:
parent
fdd42a8274
commit
46d093339c
@ -24,6 +24,7 @@ namespace XNodeEditor {
|
|||||||
Controls();
|
Controls();
|
||||||
|
|
||||||
DrawGrid(position, zoom, panOffset);
|
DrawGrid(position, zoom, panOffset);
|
||||||
|
_drawGroupName();
|
||||||
DrawDraggedConnection();
|
DrawDraggedConnection();
|
||||||
DrawConnections();
|
DrawConnections();
|
||||||
DrawNodes();
|
DrawNodes();
|
||||||
@ -40,6 +41,19 @@ namespace XNodeEditor {
|
|||||||
GUI.matrix = m;
|
GUI.matrix = m;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void _drawGroupName()
|
||||||
|
{
|
||||||
|
var guiContent = new GUIContent(this.graph.name);
|
||||||
|
var col = EditorStyles.label.normal.textColor;
|
||||||
|
var fontSize = EditorStyles.label.fontSize;
|
||||||
|
EditorStyles.label.fontSize = 48;
|
||||||
|
var size = GUILayoutUtility.GetRect(guiContent, EditorStyles.label);
|
||||||
|
EditorStyles.label.normal.textColor = new Color(175 / 255f, 185 / 255f, 185 / 255f);
|
||||||
|
EditorGUI.LabelField(new Rect(new Vector2(5, 5), size.size), guiContent);
|
||||||
|
EditorStyles.label.fontSize = fontSize;
|
||||||
|
EditorStyles.label.normal.textColor = col;
|
||||||
|
}
|
||||||
|
|
||||||
public static void BeginZoomed(Rect rect, float zoom, float topPadding) {
|
public static void BeginZoomed(Rect rect, float zoom, float topPadding) {
|
||||||
GUI.EndClip();
|
GUI.EndClip();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user