mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 15:43:50 +02:00
toggle overlay with mouse middle click, controller 'right click'
This commit is contained in:
parent
2bdebb6def
commit
b2e18b529b
1 changed files with 8 additions and 3 deletions
|
@ -1707,10 +1707,15 @@ void Application::mousePressEvent(QMouseEvent* event, unsigned int deviceID) {
|
|||
sendEvent(this, &actionEvent);
|
||||
|
||||
} else if (event->button() == Qt::RightButton) {
|
||||
// right click items here
|
||||
// "right click" on controllers to toggle the overlay
|
||||
if (deviceID > 0) {
|
||||
_overlayConductor.setEnabled(!_overlayConductor.getEnabled());
|
||||
}
|
||||
} else if (event->button() == Qt::MiddleButton) {
|
||||
// toggle the overlay
|
||||
_overlayConductor.setEnabled(!_overlayConductor.getEnabled());
|
||||
// mouse middle click to toggle the overlay
|
||||
if (deviceID == 0) {
|
||||
_overlayConductor.setEnabled(!_overlayConductor.getEnabled());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue