Beispiel #1
0
        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);
        }
Beispiel #2
0
        /// <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));
        }
Beispiel #4
0
 public override Color GetColor()
 {
     return(GUI_Info.TypeToColor(typeof(T)));
 }
Beispiel #5
0
 public override void DrawKnob(GUI_Info info)
 {
     GUI.color = GetColor();
     GUI.DrawTexture(GetKnobRect(info), GUI_Info.ConnectorKnob);
 }
Beispiel #6
0
 public abstract Vector2 GetGUIPosForOrderGraph(Vector2 size, GUI_Info info);
Beispiel #7
0
 public abstract void DrawKnob(GUI_Info info);
Beispiel #8
0
 public abstract Rect GetKnobRect(GUI_Info info);
 public void DrawKnob(GUI_Info info)
 {
     GUI.color = GetColor();
     GUI.DrawTexture(GetKnobRect(info), GUI_Info.TreeKnob);
 }