DiagramToolElement.Draw C# (CSharp) Method

Draw() public method

public Draw ( Vector2 position ) : bool
position Vector2
return bool
    public bool Draw(Vector2 position)
    {
        rect.x = position.x;
        rect.y = position.y;
        bool oldActive = active;
        if (active) {
            iconStyle.normal.background = texActive;
        } else {
            iconStyle.normal.background = texNormal;
        }
        bool newState = GUI.Toggle (rect, active, "", iconStyle);
        if (oldActive != newState && newState) {
            active = newState;
            bar.SelectionChanged (this);
        }
        return false;
    }