mirror of
https://github.com/Siccity/xNode.git
synced 2026-02-10 17:18:44 +08:00
Added GetSecondaryGridTexture
This commit is contained in:
parent
639680b4f2
commit
43df6ef75b
@ -53,7 +53,7 @@ namespace XNodeEditor {
|
|||||||
|
|
||||||
Vector2 center = rect.size / 2f;
|
Vector2 center = rect.size / 2f;
|
||||||
Texture2D gridTex = currentGraphEditor.GetGridTexture();
|
Texture2D gridTex = currentGraphEditor.GetGridTexture();
|
||||||
Texture2D crossTex = NodeEditorPreferences.crossTexture;
|
Texture2D crossTex = currentGraphEditor.GetSecondaryGridTexture();
|
||||||
|
|
||||||
// Offset from origin in tile units
|
// Offset from origin in tile units
|
||||||
float xOffset = -(center.x * zoom + panOffset.x) / gridTex.width;
|
float xOffset = -(center.x * zoom + panOffset.x) / gridTex.width;
|
||||||
|
|||||||
@ -19,6 +19,10 @@ namespace XNodeEditor {
|
|||||||
return NodeEditorPreferences.gridTexture;
|
return NodeEditorPreferences.gridTexture;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public virtual Texture2D GetSecondaryGridTexture() {
|
||||||
|
return NodeEditorPreferences.crossTexture;
|
||||||
|
}
|
||||||
|
|
||||||
[AttributeUsage(AttributeTargets.Class)]
|
[AttributeUsage(AttributeTargets.Class)]
|
||||||
public class CustomNodeGraphEditorAttribute : Attribute,
|
public class CustomNodeGraphEditorAttribute : Attribute,
|
||||||
INodeEditorAttrib {
|
INodeEditorAttrib {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user