Don't show cursor tile outline in event or connection editing tabs
This commit is contained in:
parent
16bbfcb654
commit
a3ecbecd20
3 changed files with 13 additions and 1 deletions
|
@ -57,8 +57,10 @@ public:
|
|||
void setNormalPathMode();
|
||||
void updateLocation(int x, int y);
|
||||
void updateSelectionSize(int width, int height);
|
||||
void setVisibility(bool visible);
|
||||
bool *enabled;
|
||||
private:
|
||||
bool visible;
|
||||
int width;
|
||||
int height;
|
||||
bool anchored;
|
||||
|
|
|
@ -76,6 +76,7 @@ void Editor::setEditingMap() {
|
|||
setBorderItemsVisible(ui->checkBox_ToggleBorder->isChecked());
|
||||
setConnectionItemsVisible(false);
|
||||
this->cursorMapTileRect->stopSingleTileMode();
|
||||
this->cursorMapTileRect->setVisibility(true);
|
||||
}
|
||||
|
||||
void Editor::setEditingCollision() {
|
||||
|
@ -96,6 +97,7 @@ void Editor::setEditingCollision() {
|
|||
setBorderItemsVisible(ui->checkBox_ToggleBorder->isChecked());
|
||||
setConnectionItemsVisible(false);
|
||||
this->cursorMapTileRect->setSingleTileMode();
|
||||
this->cursorMapTileRect->setVisibility(true);
|
||||
}
|
||||
|
||||
void Editor::setEditingObjects() {
|
||||
|
@ -114,6 +116,7 @@ void Editor::setEditingObjects() {
|
|||
setBorderItemsVisible(ui->checkBox_ToggleBorder->isChecked());
|
||||
setConnectionItemsVisible(false);
|
||||
this->cursorMapTileRect->setSingleTileMode();
|
||||
this->cursorMapTileRect->setVisibility(false);
|
||||
}
|
||||
|
||||
void Editor::setEditingConnections() {
|
||||
|
@ -143,6 +146,7 @@ void Editor::setEditingConnections() {
|
|||
setBorderItemsVisible(true, 0.4);
|
||||
setConnectionItemsVisible(true);
|
||||
this->cursorMapTileRect->setSingleTileMode();
|
||||
this->cursorMapTileRect->setVisibility(false);
|
||||
}
|
||||
|
||||
void Editor::setDiveEmergeControls() {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
CursorTileRect::CursorTileRect(bool *enabled, QRgb color)
|
||||
{
|
||||
this->enabled = enabled;
|
||||
this->visible = true;
|
||||
this->color = color;
|
||||
this->width = 16;
|
||||
this->height = 16;
|
||||
|
@ -17,6 +18,11 @@ CursorTileRect::CursorTileRect(bool *enabled, QRgb color)
|
|||
this->selectionHeight = 1;
|
||||
}
|
||||
|
||||
void CursorTileRect::setVisibility(bool visible)
|
||||
{
|
||||
this->visible = visible;
|
||||
}
|
||||
|
||||
void CursorTileRect::initAnchor(int coordX, int coordY)
|
||||
{
|
||||
this->anchorCoordX = coordX;
|
||||
|
@ -96,5 +102,5 @@ void CursorTileRect::updateLocation(int coordX, int coordY)
|
|||
|
||||
this->setX(coordX * 16);
|
||||
this->setY(coordY * 16);
|
||||
this->setVisible(*this->enabled);
|
||||
this->setVisible(*this->enabled && this->visible);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue