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