public Embedded.C2DScriptRectangle GUIRectangle(Rectangle rect, Color color, bool active = true, int order = 1)
 {
     Embedded.C2DScriptRectangle elt = new Embedded.C2DScriptRectangle(rect, null, color, null, active, order);
     Display2D.C2DEffect.ScriptableRectangle.Add(elt);
     Display2D.C2DEffect.ScriptableRectangle = Display2D.C2DEffect.ScriptableRectangle.OrderBy(ord => ord.drawOrder).ToList();
     return(elt);
 }
        public Embedded.C2DScriptRectangle GUIImage(Rectangle rect, Texture2D texture, Rectangle?sourceRect = null, Color?color = null, bool active = true, int order = 1)
        {
            if (sourceRect == Rectangle.Empty)
            {
                sourceRect = null;
            }

            Embedded.C2DScriptRectangle elt = new Embedded.C2DScriptRectangle(rect, sourceRect, color, texture, active, order);
            Display2D.C2DEffect.ScriptableRectangle.Add(elt);
            Display2D.C2DEffect.ScriptableRectangle = Display2D.C2DEffect.ScriptableRectangle.OrderBy(ord => ord.drawOrder).ToList();
            return(elt);
        }