Extend min/max connection offsets to player's view
This commit is contained in:
parent
5aea9e7dd0
commit
16b451ab19
2 changed files with 5 additions and 4 deletions
|
@ -23,6 +23,7 @@ The **"Breaking Changes"** listed below are changes that have been made in the d
|
||||||
- Porymap now saves map and encounter json data in an order consistent with the upstream repos. This will provide more comprehensible diffs when files are saved.
|
- Porymap now saves map and encounter json data in an order consistent with the upstream repos. This will provide more comprehensible diffs when files are saved.
|
||||||
- Update Porymap icon.
|
- Update Porymap icon.
|
||||||
- The "Map" and "Events" tabs now render using the same view, so jumping between them is smooth.
|
- The "Map" and "Events" tabs now render using the same view, so jumping between them is smooth.
|
||||||
|
- Extend connection min and max offsets to player's view boundary, rather than the map's boundary.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Fix bug where pressing TAB key did not navigate through widgets in the wild encounter tables.
|
- Fix bug where pressing TAB key did not navigate through widgets in the wild encounter tables.
|
||||||
|
|
|
@ -15,16 +15,16 @@ void ConnectionPixmapItem::render(qreal opacity) {
|
||||||
|
|
||||||
int ConnectionPixmapItem::getMinOffset() {
|
int ConnectionPixmapItem::getMinOffset() {
|
||||||
if (this->connection->direction == "up" || this->connection->direction == "down")
|
if (this->connection->direction == "up" || this->connection->direction == "down")
|
||||||
return 1 - (this->pixmap().width() / 16);
|
return -(this->pixmap().width() / 16) - 6;
|
||||||
else
|
else
|
||||||
return 1 - (this->pixmap().height() / 16);
|
return -(this->pixmap().height() / 16) - 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ConnectionPixmapItem::getMaxOffset() {
|
int ConnectionPixmapItem::getMaxOffset() {
|
||||||
if (this->connection->direction == "up" || this->connection->direction == "down")
|
if (this->connection->direction == "up" || this->connection->direction == "down")
|
||||||
return this->baseMapWidth - 1;
|
return this->baseMapWidth + 6;
|
||||||
else
|
else
|
||||||
return this->baseMapHeight - 1;
|
return this->baseMapHeight + 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant ConnectionPixmapItem::itemChange(GraphicsItemChange change, const QVariant &value)
|
QVariant ConnectionPixmapItem::itemChange(GraphicsItemChange change, const QVariant &value)
|
||||||
|
|
Loading…
Reference in a new issue