Align border blocks

This commit is contained in:
GriffinR
2020-04-03 16:29:40 -04:00
parent c28730e834
commit e4a41cf201
3 changed files with 20 additions and 16 deletions

View File

@@ -263,23 +263,23 @@ QPixmap Map::renderConnection(MapConnection connection, MapLayout * fromLayout)
int x, y, w, h;
if (connection.direction == "up") {
x = 0;
y = getHeight() - BORDER_DISTANCE;
y = getHeight() - (getBorderHeight() * NUM_BORDER_BLOCKS);
w = getWidth();
h = BORDER_DISTANCE;
h = getBorderHeight() * NUM_BORDER_BLOCKS;
} else if (connection.direction == "down") {
x = 0;
y = 0;
w = getWidth();
h = BORDER_DISTANCE;
h = getBorderHeight() * NUM_BORDER_BLOCKS;
} else if (connection.direction == "left") {
x = getWidth() - BORDER_DISTANCE;
x = getWidth() - (getBorderWidth() * NUM_BORDER_BLOCKS);
y = 0;
w = BORDER_DISTANCE;
w = getBorderWidth() * NUM_BORDER_BLOCKS;
h = getHeight();
} else if (connection.direction == "right") {
x = 0;
y = 0;
w = BORDER_DISTANCE;
w = getBorderWidth() * NUM_BORDER_BLOCKS;
h = getHeight();
} else {
// this should not happen