Support multi-block painting

This commit is contained in:
Marcus Huderle
2018-03-05 14:47:46 -08:00
parent 6cb394ebde
commit 940fb1b65c
4 changed files with 57 additions and 21 deletions

View File

@@ -454,10 +454,12 @@ void Map::drawSelection(int i, int w, QPainter *painter) {
int y = i / w;
painter->save();
painter->setPen(QColor(0xff, 0xff, 0xff));
painter->drawRect(x * 16, y * 16, 15, 15);
int rectWidth = paint_tile_width * 16;
int rectHeight = paint_tile_height * 16;
painter->drawRect(x * 16, y * 16, rectWidth - 1, rectHeight -1);
painter->setPen(QColor(0, 0, 0));
painter->drawRect(x * 16 - 1, y * 16 - 1, 17, 17);
painter->drawRect(x * 16 + 1, y * 16 + 1, 13, 13);
painter->drawRect(x * 16 - 1, y * 16 - 1, rectWidth + 1, rectHeight + 1);
painter->drawRect(x * 16 + 1, y * 16 + 1, rectWidth - 3, rectHeight - 3);
painter->restore();
}