update midnight theme disabled widgets, disable some ui in event tab
This commit is contained in:
parent
fa42beac1d
commit
bf58549666
6 changed files with 26 additions and 4 deletions
|
@ -70,6 +70,7 @@ public:
|
||||||
void setEditingCollision();
|
void setEditingCollision();
|
||||||
void setEditingObjects();
|
void setEditingObjects();
|
||||||
void setEditingConnections();
|
void setEditingConnections();
|
||||||
|
void setMapEditingButtonsVisibile(bool visible);
|
||||||
void clearWildMonTabWidgets();
|
void clearWildMonTabWidgets();
|
||||||
void setCurrentConnectionDirection(QString curDirection);
|
void setCurrentConnectionDirection(QString curDirection);
|
||||||
void updateCurrentConnectionDirection(QString curDirection);
|
void updateCurrentConnectionDirection(QString curDirection);
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
@ -17,7 +17,7 @@ QWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
QWidget::disabled {
|
QWidget::disabled {
|
||||||
background: #272822;
|
background: #31332b;
|
||||||
color: #75715E;
|
color: #75715E;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -99,6 +99,8 @@ void Editor::setEditingMap() {
|
||||||
setConnectionItemsVisible(false);
|
setConnectionItemsVisible(false);
|
||||||
this->cursorMapTileRect->stopSingleTileMode();
|
this->cursorMapTileRect->stopSingleTileMode();
|
||||||
this->cursorMapTileRect->setVisibility(true);
|
this->cursorMapTileRect->setVisibility(true);
|
||||||
|
|
||||||
|
setMapEditingButtonsVisibile(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Editor::setEditingCollision() {
|
void Editor::setEditingCollision() {
|
||||||
|
@ -120,6 +122,8 @@ void Editor::setEditingCollision() {
|
||||||
setConnectionItemsVisible(false);
|
setConnectionItemsVisible(false);
|
||||||
this->cursorMapTileRect->setSingleTileMode();
|
this->cursorMapTileRect->setSingleTileMode();
|
||||||
this->cursorMapTileRect->setVisibility(true);
|
this->cursorMapTileRect->setVisibility(true);
|
||||||
|
|
||||||
|
setMapEditingButtonsVisibile(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Editor::setEditingObjects() {
|
void Editor::setEditingObjects() {
|
||||||
|
@ -139,6 +143,22 @@ void Editor::setEditingObjects() {
|
||||||
setConnectionItemsVisible(false);
|
setConnectionItemsVisible(false);
|
||||||
this->cursorMapTileRect->setSingleTileMode();
|
this->cursorMapTileRect->setSingleTileMode();
|
||||||
this->cursorMapTileRect->setVisibility(false);
|
this->cursorMapTileRect->setVisibility(false);
|
||||||
|
|
||||||
|
setMapEditingButtonsVisibile(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Editor::setMapEditingButtonsVisibile(bool visible) {
|
||||||
|
this->ui->toolButton_Fill->setEnabled(visible);
|
||||||
|
// If the fill button is pressed, unpress it and select the pointer.
|
||||||
|
if (!visible && this->ui->toolButton_Fill->isChecked()) {
|
||||||
|
qDebug() << "deselect flood fill button";
|
||||||
|
this->map_edit_mode = "select";
|
||||||
|
this->settings->mapCursor = QCursor();
|
||||||
|
this->cursorMapTileRect->setSingleTileMode();
|
||||||
|
this->ui->toolButton_Fill->setChecked(false);
|
||||||
|
this->ui->toolButton_Select->setChecked(true);
|
||||||
|
}
|
||||||
|
this->ui->checkBox_smartPaths->setEnabled(visible);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Editor::setEditingConnections() {
|
void Editor::setEditingConnections() {
|
||||||
|
@ -987,6 +1007,7 @@ void Editor::setSmartPathCursorMode(QGraphicsSceneMouseEvent *event)
|
||||||
}
|
}
|
||||||
|
|
||||||
void Editor::mouseEvent_map(QGraphicsSceneMouseEvent *event, MapPixmapItem *item) {
|
void Editor::mouseEvent_map(QGraphicsSceneMouseEvent *event, MapPixmapItem *item) {
|
||||||
|
// TODO: add event tab object painting tool buttons stuff here
|
||||||
if (!item->paintingEnabled) {
|
if (!item->paintingEnabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2054,7 +2054,7 @@ void MainWindow::on_toolButton_Paint_clicked()
|
||||||
void MainWindow::on_toolButton_Select_clicked()
|
void MainWindow::on_toolButton_Select_clicked()
|
||||||
{
|
{
|
||||||
editor->map_edit_mode = "select";
|
editor->map_edit_mode = "select";
|
||||||
editor->settings->mapCursor = QCursor(QPixmap(":/icons/cursor.ico"), 0, 0);
|
editor->settings->mapCursor = QCursor();//QPixmap(":/icons/cursor.ico"), 0, 0);
|
||||||
editor->cursorMapTileRect->setSingleTileMode();
|
editor->cursorMapTileRect->setSingleTileMode();
|
||||||
|
|
||||||
ui->scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
|
ui->scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
|
||||||
|
|
|
@ -558,13 +558,13 @@ void MapPixmapItem::hoverMoveEvent(QGraphicsSceneHoverEvent *event) {
|
||||||
int x = static_cast<int>(event->pos().x()) / 16;
|
int x = static_cast<int>(event->pos().x()) / 16;
|
||||||
int y = static_cast<int>(event->pos().y()) / 16;
|
int y = static_cast<int>(event->pos().y()) / 16;
|
||||||
emit this->hoveredMapMetatileChanged(x, y);
|
emit this->hoveredMapMetatileChanged(x, y);
|
||||||
if (this->settings->betterCursors && this->paintingEnabled) {
|
if (this->settings->betterCursors/* && this->paintingEnabled*/) {
|
||||||
setCursor(this->settings->mapCursor);
|
setCursor(this->settings->mapCursor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void MapPixmapItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *) {
|
void MapPixmapItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *) {
|
||||||
emit this->hoveredMapMetatileCleared();
|
emit this->hoveredMapMetatileCleared();
|
||||||
if (this->settings->betterCursors && this->paintingEnabled) {
|
if (this->settings->betterCursors/* && this->paintingEnabled*/) {
|
||||||
unsetCursor();
|
unsetCursor();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue