mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 21:43:13 +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) {
|
if (!editToolsOn) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.isRightButton) {
|
var clickedOnSwatch = false;
|
||||||
// debugging of right button click on mac...
|
var clickedOverlay = Overlays.getOverlayAtPoint({x: event.x, y: event.y});
|
||||||
print(">>>> RIGHT BUTTON <<<<<");
|
|
||||||
|
// 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
|
trackMouseEvent(event); // used by preview support
|
||||||
mouseX = event.x;
|
mouseX = event.x;
|
||||||
mouseY = event.y;
|
mouseY = event.y;
|
||||||
|
|
Loading…
Reference in a new issue