|| this.SketchTools.getCurrentTool() == SketchTools.DRAW_TOOL
|| this.SketchTools.getCurrentTool() == SketchTools.SELECT_TOOL
&& !GLOBAL.gui.overComponent()
&& !GLOBAL.sketchChairs.getCurChair().overSelectPoint(
GLOBAL.uiTools.mouseX, GLOBAL.uiTools.mouseY)) {
Vec2D mousePos = this.getPointTranslated(new Vec2D(this.mouseX,
this.mouseY));
GLOBAL.jBullet.mouseDragged(mousePos.x, mousePos.y);
}
if ((GLOBAL.uiTools.getCurrentTool() == UITools.SCALE_TOOL)
&& !GLOBAL.gui.overComponent()) {
//GLOBAL.person.dragScale(mouseX,mouseX);
}
// middle click
if (mouseButton == UITools.MOUSE_RIGHT
|| this.getCurrentTool() == UITools.MOVE_CAM_TOOL) {
if (SETTINGS.render_chairs
&& GLOBAL.uiTools.currentView == UITools.VIEW_CHAIR_EDIT) {
if(this.prevMouseWasMove){
moveView((UI.mouseX - UI.pmouseX)
* (float)(1 / GLOBAL.ZOOM),
(UI.mouseY - UI.pmouseY)
* (float)(1 / GLOBAL.ZOOM));
}else{
this.prevMouseWasMove = true;
}
}
if (GLOBAL.uiTools.currentView == UITools.VIEW_SHAPE_PACK) {
GLOBAL.shapePack.CAM_OFFSET_X += (UI.mouseX - UI.pmouseX)
* (1 / GLOBAL.shapePack.ZOOM);
GLOBAL.shapePack.CAM_OFFSET_Y += (UI.mouseY - UI.pmouseY)
* (1 / GLOBAL.shapePack.ZOOM);
}
}
if (!GLOBAL.gui.overComponent()) {
if (this.getCurrentTool() == UITools.ZOOM_CAM_TOOL) {
if (SETTINGS.render_chairs
&& GLOBAL.uiTools.currentView == UITools.VIEW_CHAIR_EDIT){
this.zoomView(((UI.mouseY - UI.pmouseY) * .01f));
}
if (SETTINGS.render_chairs
&& GLOBAL.uiTools.currentView == UITools.VIEW_SHAPE_PACK) {
GLOBAL.shapePack.zoomView((UI.mouseY - UI.pmouseY) * .01f, this.mouseX, this.mouseY) ;
}
}
if (this.getCurrentTool() == UITools.ROTATE_CAM_TOOL
|| mouseButton == UITools.MOUSE_MIDDLE) {
if (SETTINGS.render_chairs
&& GLOBAL.uiTools.currentView == UITools.VIEW_CHAIR_EDIT) {
GLOBAL.rotateModelsY -= (UI.pmouseX - UI.mouseX) / 90f;
GLOBAL.rotateModelsX += (UI.pmouseY - UI.mouseY) / 90f;
}
}
if (this.getCurrentTool() == UITools.SELECT_TOOL
&& GLOBAL.uiTools.currentView == UITools.VIEW_CHAIR_EDIT) {
updateVecMove();
}
}
if (this.getCurrentTool() != UITools.ROTATE_CAM_TOOL && GLOBAL.uiTools.currentView == UITools.VIEW_CHAIR_EDIT)
GLOBAL.person.mouseDown(mouseX, mouseY);
Vec2D mousePos = this.getPointTranslated(new Vec2D(this.mouseX,
this.mouseY));
GLOBAL.measuretTool.mousePressed(mousePos.x, mousePos.y);