public override Boolean Action(TileMapEditor Editor, Vector2 ContextMenuTilePosition)
        {
            Editor.MarkedPositions.Clear();
            Editor.SelectedPositions.Clear();

            var TempStart = new Vector2(Mathf.Clamp(0, ContextMenuTilePosition.x, Editor.TileMap.Rows),
                                        Mathf.Clamp(0, ContextMenuTilePosition.y, Editor.TileMap.Columns));
            var CurrentTilePosition = Editor.GetCurrentTilePosition();
            var TempEnd = new Vector2(Mathf.Clamp(0, CurrentTilePosition.x, Editor.TileMap.Rows),
                                      Mathf.Clamp(0, CurrentTilePosition.y, Editor.TileMap.Columns));
            var RectangleStart = new Vector2(Mathf.Min(TempStart.x, TempEnd.x),
                                             Mathf.Min(TempStart.y, TempEnd.y));
            var RectangleEnd = new Vector2(Mathf.Max(TempStart.x, TempEnd.x),
                                           Mathf.Max(TempStart.y, TempEnd.y));

            for (var i = 0; i <= 1; i++)
            {
                for (var j = (Int32) RectangleStart.y; j <= (Int32) RectangleEnd.y; j++)
                {
                    var Column = RectangleStart.x + i*(RectangleEnd.x - RectangleStart.x);
                    var Row = j;
                    var TableTilePosition = new Vector2(Column, Row);
                    if (!Editor.ContainsTile(TableTilePosition))
                        Editor.AddMarkedSelectedPosition(TableTilePosition);
                }
            }

            for (var j = 0; j <= 1; j++)
            {
                for (var i = (Int32) RectangleStart.x; i <= (Int32) RectangleEnd.x; i++)
                {
                    var Column = i;
                    var Row = RectangleStart.y + j*(RectangleEnd.y - RectangleStart.y);
                    var TableTilePosition = new Vector2(Column, Row);
                    if (!Editor.ContainsTile(TableTilePosition))
                        Editor.AddMarkedSelectedPosition(TableTilePosition);
                }
            }

            if (MouseClicked(MouseButton.Left))
            {
                foreach (var SelectedPosition in Editor.SelectedPositions)
                    Editor.Draw(SelectedPosition);

                Editor.MarkedPositions.Clear();
                Editor.SelectedPositions.Clear();

                return true;
            }

            return false;
        }
 public override Boolean Action(TileMapEditor Editor, Vector2 ContextMenuTilePosition)
 {
     for (var Column = 0; Column < Editor.TileMap.Columns; Column++)
     {
         for (var Row = 0; Row < Editor.TileMap.Rows; Row++)
         {
             var TableTilePosition = new Vector2(Column, Row);
             if (!Editor.ContainsTile(TableTilePosition))
                 Editor.Draw(TableTilePosition);
         }
     }
     return true;
 }
    public override Boolean Action(TileMapEditor Editor, Vector2 ContextMenuTilePosition)
    {
        Editor.MarkedPositions.Clear();
        Editor.SelectedPositions.Clear();

        var LineStart = new Vector2(Mathf.Clamp(0, ContextMenuTilePosition.x, Editor.TileMap.Rows),
                                    Mathf.Clamp(0, ContextMenuTilePosition.y, Editor.TileMap.Columns));
        var CurrentTilePosition = Editor.GetCurrentTilePosition();
        var LineEnd = new Vector2(Mathf.Clamp(0, CurrentTilePosition.x, Editor.TileMap.Rows),
                                  Mathf.Clamp(0, CurrentTilePosition.y, Editor.TileMap.Columns));

        var Width = (Int32)(LineEnd.x - LineStart.x);
        var Heigth = (Int32)(LineEnd.y - LineStart.y);
        var Maximum = Mathf.Max(Mathf.Abs(Width), Math.Abs(Heigth));

        if ((Width != 0) || (Heigth != 0))
        {
            var ColumnStep = Width / (Single)Maximum;
            var RowStep = Heigth / (Single)Maximum;
            for (int i = 0; i <= Maximum; i++)
            {
                var Column = Mathf.RoundToInt(LineStart.x + i * ColumnStep);
                var Row = Mathf.RoundToInt(LineStart.y + i * RowStep);
                var TableTilePosition = new Vector2(Column, Row);
                if (!Editor.ContainsTile(TableTilePosition))
                    Editor.AddMarkedSelectedPosition(TableTilePosition);
            }
        }
        else
        {
            if (!Editor.ContainsTile(LineStart))
                Editor.AddMarkedSelectedPosition(LineStart);
        }

        if (MouseClicked(MouseButton.Left))
        {
            foreach (var SelectedPosition in Editor.SelectedPositions)
                Editor.Draw(SelectedPosition);

            Editor.MarkedPositions.Clear();
            Editor.SelectedPositions.Clear();

            return true;
        }

        return false;
    }
    public override Boolean Action(TileMapEditor Editor, Vector2 ContextMenuTilePosition)
    {
        Editor.MarkedPositions.Clear();
        Editor.SelectedPositions.Clear();

        var LineStart = new Vector2(Mathf.Clamp(0, ContextMenuTilePosition.x, Editor.TileMap.Rows),
                                    Mathf.Clamp(0, ContextMenuTilePosition.y, Editor.TileMap.Columns));
        var CurrentTilePosition = Editor.GetCurrentTilePosition();
        var LineEnd = new Vector2(Mathf.Clamp(0, CurrentTilePosition.x, Editor.TileMap.Rows),
                                  Mathf.Clamp(0, CurrentTilePosition.y, Editor.TileMap.Columns));

        var Width = (Int32)(LineEnd.x - LineStart.x);
        var Heigth = (Int32)(LineEnd.y - LineStart.y);

        var RatioDivisor = GreatestCommonDivisor(Mathf.Abs(Width), Mathf.Abs(Heigth));

        if (RatioDivisor != 0)
        {
            for (int i = 0; i <= RatioDivisor; i++)
            {
                var Column = (Int32)(LineStart.x + i*(Width/RatioDivisor));
                var Row = (Int32)(LineStart.y + i*(Heigth/RatioDivisor));
                var TableTilePosition = new Vector2(Column, Row);
                if (!Editor.ContainsTile(TableTilePosition))
                    Editor.AddMarkedSelectedPosition(TableTilePosition);
            }
        }
        else
        {
            if (!Editor.ContainsTile(LineStart))
                Editor.AddMarkedSelectedPosition(LineStart);
        }

        if (MouseClicked(MouseButton.Left))
        {
            foreach (var SelectedPosition in Editor.SelectedPositions)
                Editor.Draw(SelectedPosition);

            Editor.MarkedPositions.Clear();
            Editor.SelectedPositions.Clear();

            return true;
        }

        return false;
    }
 public override Boolean Action(TileMapEditor Editor, Vector2 ContextMenuTilePosition)
 {
     Editor.Draw(ContextMenuTilePosition, SelectedTile);
     return true;
 }