public override Vector2 GetGUIPosForOrderGraph(Vector2 size, GUI_Info info) { var r = GetKnobRect(info); r.x += info.knobSize; r.y += (r.height - size.y) * 0.5f; return(r.position); }
/// <summary> /// Get the rect of the knob left to the input /// </summary> public override Rect GetKnobRect(GUI_Info info) { int knobSize = info.knobSize; return(new Rect(rect.x + rect.width, rect.y + (rect.height - knobSize) / 2, knobSize, knobSize)); }
/// <summary> /// Get the rect of the knob left to the input /// </summary> public Rect GetKnobRect(GUI_Info info) { int knobSize = info.knobSize; return(new Rect(rect.x + (rect.width - knobSize) / 2, body.rectPixelCorrected.y + body.positionSize.height, knobSize, knobSize)); }
public override Color GetColor() { return(GUI_Info.TypeToColor(typeof(T))); }
public override void DrawKnob(GUI_Info info) { GUI.color = GetColor(); GUI.DrawTexture(GetKnobRect(info), GUI_Info.ConnectorKnob); }
public abstract Vector2 GetGUIPosForOrderGraph(Vector2 size, GUI_Info info);
public abstract void DrawKnob(GUI_Info info);
public abstract Rect GetKnobRect(GUI_Info info);
public void DrawKnob(GUI_Info info) { GUI.color = GetColor(); GUI.DrawTexture(GetKnobRect(info), GUI_Info.TreeKnob); }