mirror of
https://github.com/overte-org/overte.git
synced 2025-04-24 03:33:35 +02:00
add click support to color swatchs in editVoxels.js
This commit is contained in:
parent
cbacf5f328
commit
546ab51ed5
1 changed files with 16 additions and 4 deletions
|
@ -506,11 +506,23 @@ function mousePressEvent(event) {
|
|||
if (!editToolsOn) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.isRightButton) {
|
||||
// debugging of right button click on mac...
|
||||
print(">>>> RIGHT BUTTON <<<<<");
|
||||
|
||||
var clickedOnSwatch = false;
|
||||
var clickedOverlay = Overlays.getOverlayAtPoint({x: event.x, y: event.y});
|
||||
|
||||
// if the user clicked on one of the color swatches, update the selectedSwatch
|
||||
for (s = 0; s < numColors; s++) {
|
||||
if (clickedOverlay == swatches[s]) {
|
||||
whichColor = s;
|
||||
moveTools();
|
||||
clickedOnSwatch = true;
|
||||
}
|
||||
}
|
||||
if (clickedOnSwatch) {
|
||||
return; // no further processing
|
||||
}
|
||||
|
||||
|
||||
trackMouseEvent(event); // used by preview support
|
||||
mouseX = event.x;
|
||||
mouseY = event.y;
|
||||
|
|
Loading…
Reference in a new issue