public static ImageFrameLoadDialog Popup(DwarfGUI gui, List <SpriteSheet> sprites) { int w = gui.Graphics.Viewport.Width - 128; int h = gui.Graphics.Viewport.Height - 128; ImageFrameLoadDialog toReturn = new ImageFrameLoadDialog(gui, gui.RootComponent, sprites) { LocalBounds = new Rectangle(gui.Graphics.Viewport.Width / 2 - w / 2, gui.Graphics.Viewport.Height / 2 - h / 2, w, h) }; toReturn.Initialize(ButtonType.Cancel, "Select Image", ""); return(toReturn); }
public static ImageFrameLoadDialog Popup(DwarfGUI gui, List<SpriteSheet> sprites) { int w = gui.Graphics.Viewport.Width - 128; int h = gui.Graphics.Viewport.Height - 128; ImageFrameLoadDialog toReturn = new ImageFrameLoadDialog(gui, gui.RootComponent, sprites) { LocalBounds = new Rectangle(gui.Graphics.Viewport.Width / 2 - w / 2, gui.Graphics.Viewport.Height / 2 - h / 2, w, h) }; toReturn.Initialize(ButtonType.Cancel, "Select Image", ""); return toReturn; }