public Image GetImage(string filename, Rect <float> source, Action <Image> loadedCB = null) { Texture2D t2d = game.Content.Load <Texture2D> (filename); ImageImpl img = new ImageImpl(t2d, source); if (loadedCB != null) { loadedCB(img); } return(img); }
public Image GetImage(string filename, Action <Image> loadedCB = null) { Texture2D t2d = game.Content.Load <Texture2D> (filename); ImageImpl img = new ImageImpl(t2d, new Rect <float>(0, 0, t2d.Width, t2d.Height)); if (loadedCB != null) { loadedCB(img); } return(img); }