Ejemplo n.º 1
0
        private void tileSelection_MouseUp(object sender, MouseEventArgs e)
        {
            dragging = false;
            resizing = false;

            if (selectedSize.Width != 1 || selectedSize.Height != -1)
            {
                Tilemapper.SelectTile(tm.id, selected.X * tm.tilesize, selected.Y * tm.tilesize, selectedSize.Width * tm.tilesize, selectedSize.Height * tm.tilesize);
            }
        }
Ejemplo n.º 2
0
        private void SelectTile(object sender, MouseEventArgs e)
        {
            if (e.Button != MouseButtons.Left || selected == GetCursorTile())
            {
                return;
            }

            try
            {
                selected = GetCursorTile();

                Tilemapper.SelectTile(tm.id, selected.X * tm.tilesize, selected.Y * tm.tilesize, selectedSize.Width * tm.tilesize, selectedSize.Width * tm.tilesize);
            }
            catch (Exception exc)
            {
                Feed.GiveException("Tile Selection", exc);
            }
        }