Rectangle.getRect C# (CSharp) Method

getRect() public method

public getRect ( ) : Rect
return Rect
    public Rect getRect() {
        return new Rect(x,y,w,h);
    }
}

Usage Example

示例#1
0
    public void draw()
    {
        GUI.DrawTexture(bgRect.getRect(), backgroundTexture, ScaleMode.StretchToFill);

        // begin rotation
        GUIUtility.RotateAroundPivot(-90, new Vector2(bgRect.x + (errorRect.x - bgRect.x) / 2, bgRect.y + (bgRect.h / 2)));
        GUI.Label(labelRect.getRect(), "Errors", labelStyle);
        GUIUtility.RotateAroundPivot(90, new Vector2(bgRect.x + (errorRect.x - bgRect.x) / 2, bgRect.y + (bgRect.h / 2)));
        // end rotation

        GUILayout.BeginArea(errorRect.getRect());
        scroll_position = GUILayout.BeginScrollView(scroll_position, GUILayout.Width(errorRect.w), GUILayout.Height(errorRect.h));
        //GUIStyle style = GUI.skin.box;

        string pattern       = @"^(.+) class (.+) is public, should be declared in a file named (.+)";
        string current_error = ide.getCurrentError();

        if (!Regex.IsMatch(current_error, pattern))
        {
            //GUILayout.TextArea(current_error, style);
            GUILayout.Box(/*errorRect.getRect(),*/ current_error, style);
        }
        else
        {
            //GUILayout.TextArea("------------", style);
            GUILayout.Box(/*errorRect.getRect(),*/ "------------", style);
        }
        GUILayout.EndScrollView();
        GUILayout.EndArea();
    }
All Usage Examples Of Rectangle::getRect