mirror of
https://github.com/huderlem/porymap.git
synced 2026-09-29 19:36:48 -05:00
Align border blocks
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user