File tree Expand file tree Collapse file tree 2 files changed +19
-7
lines changed
RetroEDv2/tools/sceneproperties Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -1903,9 +1903,17 @@ void ChunkViewer::mousePressEvent(QMouseEvent *event)
19031903 if (tilePxX < 0 || tilePxY < 0 )
19041904 break ;
19051905
1906- if (tileDrawMode == FORMAT_CHUNK)
1907- index = chunks->chunks [*cSel].tiles [selection.y ][selection.x ].tileIndex ;
1908- else {
1906+ if (tileDrawMode == FORMAT_CHUNK){
1907+ auto &tile = chunks->chunks [*cSel].tiles [selection.y ][selection.x ];
1908+ index = tile.tileIndex ;
1909+ bool fx = keepProps ? ((tile.direction & 1 ) == 1 ) : false ;
1910+ bool fy = keepProps ? ((tile.direction & 2 ) == 2 ) : false ;
1911+
1912+ if (fx)
1913+ tilePxX = 15 - tilePxX;
1914+ if (fy)
1915+ tilePxY = 15 - tilePxY;
1916+ } else {
19091917 int pos = selection.y * rowSize + selection.x ;
19101918 if (pos >= viewerTiles.count ())
19111919 break ;
@@ -2094,8 +2102,10 @@ void ChunkViewer::mouseMoveEvent(QMouseEvent *event)
20942102 break ;
20952103 }
20962104 }
2097- } else if (mouseDownR)
2098- emit setColor (tileImg->pixelIndex (tilePxX, tilePxY));
2105+ } else if (mouseDownR){
2106+ selColor = tileImg->pixelIndex (tilePxX, tilePxY);
2107+ emit setColor (selColor);
2108+ }
20992109 }
21002110 break ;
21012111 }
Original file line number Diff line number Diff line change @@ -1423,8 +1423,10 @@ void TilesetViewer::mouseMoveEvent(QMouseEvent *event)
14231423 break ;
14241424 }
14251425 }
1426- } else if (mouseDownR)
1427- emit setColor (tileImg->pixelIndex (tilePxX, tilePxY));
1426+ } else if (mouseDownR){
1427+ selColor = tileImg->pixelIndex (tilePxX, tilePxY);
1428+ emit setColor (selColor);
1429+ }
14281430 }
14291431 break ;
14301432 }
You can’t perform that action at this time.
0 commit comments