Add smart path painting

This commit is contained in:
Marcus Huderle
2018-03-05 16:47:00 -08:00
parent 940fb1b65c
commit e485f23004
4 changed files with 137 additions and 23 deletions

View File

@@ -453,7 +453,9 @@ void Map::drawSelection(int i, int w, QPainter *painter) {
int x = i % w;
int y = i / w;
painter->save();
painter->setPen(QColor(0xff, 0xff, 0xff));
QColor penColor = smart_paths_enabled ? QColor(0xff, 0x0, 0xff) : QColor(0xff, 0xff, 0xff);
painter->setPen(penColor);
int rectWidth = paint_tile_width * 16;
int rectHeight = paint_tile_height * 16;
painter->drawRect(x * 16, y * 16, rectWidth - 1, rectHeight -1);