Time for action – tile selection controls
Expand the
Textures
folder in the Level Editor Content project.Click on the
PlatformTiles.png
file. The Properties window below Solution Explorer will update to display the properties of the image file.Change the Copy to Output Directory property to Copy if newer.
Switch back to the Design mode view of the MapEditor form.
Add an ImageList control to the MapEditor form by double-clicking on the control in the Toolbox window. It will show up in the gray area below the form, as it is a non-visible control. Set the following properties on the ImageList:
Name : imgListTiles
ColorDepth : Depth32Bit
ImageSize : 48, 48
Add a ListView control to the MapEditor form, and give it the following properties:
Name : listTiles
HideSelection : False
LargeImageList : imgListTiles
Location : 10, 27
MultiSelect: False
Size : 173, 315
TileSize : 48, 48
View : Tile
Right-click on
MapEditor.cs
in Solution Explorer and select View Code.Add the following helper method to the MapEditor class...