protected override void Initialize() { _spriteBatch = new SpriteBatch(GraphicsDevice); _checkerTexture = Texture2D.FromFile(GraphicsDevice, Application.StartupPath + "\\Resources\\checker.png"); _crossTexture = Texture2D.FromFile(GraphicsDevice, Application.StartupPath + "\\Resources\\cross.png"); this.VScroll = true; this.HScroll = true; this.AutoScrollMinSize = new System.Drawing.Size(0, 0); _drawGrid = true; _paintMode = TileGridPaintMode.Brush; _brushStartPoint = new Point(4, 4); _brushSize = new Point(1, 1); _brushSizeExpandOrigin = new Point(-1, -1); _selectedTiles = new List <Point>(); _selectionExpandOrigin = new Point(-1, -1); _isSelectingArea = false; _clipboardTiles = new List <TileCopy>(); _isPastingTiles = false; _drawPosPastingSelection = new Point(0, 0); InitializeTileGrid(); // Hook the idle event to constantly redraw our animation. Application.Idle += delegate { Invalidate(); }; }
protected override void Initialize() { _spriteBatch = new SpriteBatch(GraphicsDevice); _checkerTexture = Texture2D.FromStream(GraphicsDevice, System.IO.File.OpenRead(Application.StartupPath + "\\Resources\\checker.png")); _crossTexture = Texture2D.FromStream(GraphicsDevice, System.IO.File.OpenRead(Application.StartupPath + "\\Resources\\cross.png")); this.VScroll = true; this.HScroll = true; this.AutoScrollMinSize = new System.Drawing.Size(0, 0); _drawGrid = true; _paintMode = TileGridPaintMode.Brush; _brushStartPoint = new Point(4, 4); _brushSize = new Point(1, 1); _brushSizeExpandOrigin = new Point(-1, -1); _selectedTiles = new List <Point>(); _selectionExpandOrigin = new Point(-1, -1); _isSelectingArea = false; _clipboardTiles = new List <TileCopy>(); _isPastingTiles = false; _drawPosPastingSelection = new Point(0, 0); InitializeTileGrid(); }
protected override void Initialize() { _spriteBatch = new SpriteBatch(GraphicsDevice); _checkerTexture = Texture2D.FromStream(GraphicsDevice, System.IO.File.OpenRead(Application.StartupPath + "\\Resources\\checker.png")); _crossTexture = Texture2D.FromStream(GraphicsDevice, System.IO.File.OpenRead(Application.StartupPath + "\\Resources\\cross.png")); this.VScroll = true; this.HScroll = true; this.AutoScrollMinSize = new System.Drawing.Size(0, 0); _drawGrid = true; _paintMode = TileGridPaintMode.Brush; _brushStartPoint = new Point(4, 4); _brushSize = new Point(1, 1); _brushSizeExpandOrigin = new Point(-1, -1); _selectedTiles = new List<Point>(); _selectionExpandOrigin = new Point(-1, -1); _isSelectingArea = false; _clipboardTiles = new List<TileCopy>(); _isPastingTiles = false; _drawPosPastingSelection = new Point(0, 0); InitializeTileGrid(); }
protected override void Initialize() { _spriteBatch = new SpriteBatch(GraphicsDevice); _checkerTexture = Texture2D.FromFile(GraphicsDevice, Application.StartupPath + "\\Resources\\checker.png"); _crossTexture = Texture2D.FromFile(GraphicsDevice, Application.StartupPath + "\\Resources\\cross.png"); this.VScroll = true; this.HScroll = true; this.AutoScrollMinSize = new System.Drawing.Size(0, 0); _drawGrid = true; _paintMode = TileGridPaintMode.Brush; _brushStartPoint = new Point(4, 4); _brushSize = new Point(1, 1); _brushSizeExpandOrigin = new Point(-1, -1); _selectedTiles = new List<Point>(); _selectionExpandOrigin = new Point(-1, -1); _isSelectingArea = false; _clipboardTiles = new List<TileCopy>(); _isPastingTiles = false; _drawPosPastingSelection = new Point(0, 0); InitializeTileGrid(); // Hook the idle event to constantly redraw our animation. Application.Idle += delegate { Invalidate(); }; }