mirror of
https://github.com/huderlem/porymap.git
synced 2026-09-17 05:15:45 -05:00
Clean up rotation functions
This commit is contained in:
@@ -179,19 +179,19 @@ void MapView::setVerticalScale(int scale) {
|
||||
this->scene()->update();
|
||||
}
|
||||
|
||||
int MapView::getRotation(int layer) {
|
||||
return this->getOverlay(layer)->getRotation();
|
||||
int MapView::getAngle(int layer) {
|
||||
return this->getOverlay(layer)->getAngle();
|
||||
}
|
||||
|
||||
void MapView::setRotation(int rotation, int layer) {
|
||||
this->getOverlay(layer)->setRotation(rotation);
|
||||
void MapView::setAngle(int angle, int layer) {
|
||||
this->getOverlay(layer)->setAngle(angle);
|
||||
this->scene()->update();
|
||||
}
|
||||
|
||||
// Overload. No layer provided, set rotation of all layers
|
||||
void MapView::setRotation(int rotation) {
|
||||
// Overload. No layer provided, set angle of all layers
|
||||
void MapView::setAngle(int angle) {
|
||||
foreach (Overlay * layer, this->overlayMap)
|
||||
layer->setRotation(rotation);
|
||||
layer->setAngle(angle);
|
||||
this->scene()->update();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user