diff options
Diffstat (limited to 'MapEd/TileSelector.cs')
-rw-r--r-- | MapEd/TileSelector.cs | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/MapEd/TileSelector.cs b/MapEd/TileSelector.cs new file mode 100644 index 0000000..a21561e --- /dev/null +++ b/MapEd/TileSelector.cs @@ -0,0 +1,46 @@ +using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace MapEd
+{
+ public partial class TileSelector : Form
+ {
+ private int selected;
+
+ public TileSelector(TileStrip tiles)
+ {
+ InitializeComponent();
+
+ listView.SmallImageList = new ImageList();
+
+ listView.SmallImageList.Images.AddRange(tiles.Images);
+
+ for(int f = 0 ; f < tiles.Count ; f++)
+ {
+ listView.Items.Add(string.Empty, f);
+ }
+ }
+
+ public int SelectedTile
+ {
+ get
+ {
+ return selected;
+ }
+ }
+
+ private void OnDoubleClick(object sender, EventArgs e)
+ {
+ selected = listView.SelectedIndices[0];
+ DialogResult = DialogResult.OK;
+ Close();
+ }
+ }
+}
|