public void Apply_Texture() { clsMouseOver.clsOverTerrain mouseOverTerrain = this.GetMouseOverTerrain(); if (mouseOverTerrain != null) { clsMap.clsApplyTexture tool = new clsMap.clsApplyTexture { Map = this.Map, TextureNum = modProgram.SelectedTextureNum, SetTexture = modMain.frmMainInstance.chkSetTexture.Checked, Orientation = modProgram.TextureOrientation, RandomOrientation = modMain.frmMainInstance.chkTextureOrientationRandomize.Checked, SetOrientation = modMain.frmMainInstance.chkSetTextureOrientation.Checked, TerrainAction = modMain.frmMainInstance.TextureTerrainAction }; modProgram.TextureBrush.PerformActionMapTiles(tool, mouseOverTerrain.Tile); this.Map.Update(); this.MapView.DrawViewLater(); } }
public void Apply_Texture() { clsMouseOver.clsOverTerrain MouseOverTerrain = GetMouseOverTerrain(); if ( MouseOverTerrain == null ) { return; } clsMap.clsApplyTexture ApplyTexture = new clsMap.clsApplyTexture(); ApplyTexture.Map = Map; ApplyTexture.TextureNum = App.SelectedTextureNum; ApplyTexture.SetTexture = Program.frmMainInstance.chkSetTexture.Checked; ApplyTexture.Orientation = App.TextureOrientation; ApplyTexture.RandomOrientation = Program.frmMainInstance.chkTextureOrientationRandomize.Checked; ApplyTexture.SetOrientation = Program.frmMainInstance.chkSetTextureOrientation.Checked; ApplyTexture.TerrainAction = Program.frmMainInstance.TextureTerrainAction; App.TextureBrush.PerformActionMapTiles(ApplyTexture, MouseOverTerrain.Tile); Map.Update(); MapViewControl.DrawViewLater(); }