mirror of
https://github.com/huderlem/porymap.git
synced 2026-06-14 11:51:14 -05:00
18 lines
430 B
C++
18 lines
430 B
C++
#include "movablerect.h"
|
|
|
|
MovableRect::MovableRect(bool *enabled, int width, int height, QRgb color)
|
|
{
|
|
this->enabled = enabled;
|
|
this->width = width;
|
|
this->height = height;
|
|
this->color = color;
|
|
this->setVisible(*enabled);
|
|
}
|
|
|
|
void MovableRect::updateLocation(int x, int y)
|
|
{
|
|
this->setX((x * 16) - this->width / 2 + 8);
|
|
this->setY((y * 16) - this->height / 2 + 8);
|
|
this->setVisible(*this->enabled);
|
|
}
|