Exemplo n.º 1
0
 private void InsertTileItem_Click(object sender, EventArgs e)
 {
     InsertTile(Selection);
     if (ParentMap != null)
     {
         ParentMap.DoAllLayerAdjustment(Selection, 1);
     }
     Selection = Selection;
     Refresh();
 }
Exemplo n.º 2
0
        private void DuplicateTile_Click(object sender, EventArgs e)
        {
            Tile NewTile = tiles[Selection].Clone();

            if (Selection < tiles.Count)
            {
                InsertTile(Selection + 1);
            }
            else
            {
                AddTile();
            }
            tiles[Selection + 1] = NewTile;
            ParentMap.DoAllLayerAdjustment(Selection, 1);
            Refresh();
        }
Exemplo n.º 3
0
        private void DeleteTileMenuItem_Click(object sender, EventArgs e)
        {
            DeleteTile(Selection);
            if (ParentMap != null)
            {
                ParentMap.DoAllLayerAdjustment(Selection, -1);
            }
            if (Sprite != null)
            {
                Sprite.RemoveBadReference(Selection);
            }

            if (Selection == tiles.Count)
            {
                Selection--;
            }
            else
            {
                Selection = Selection;  // this is just to refresh the on_selection event.
            }
            Refresh();
        }