| @@ -355,7 +355,12 @@ void ModuleWidget::drawShadow(const DrawArgs& args) { | |||||
| } | } | ||||
| void ModuleWidget::onButton(const event::Button& e) { | void ModuleWidget::onButton(const event::Button& e) { | ||||
| OpaqueWidget::onButton(e); | |||||
| // Don't consume left button if `lockModules` is enabled. | |||||
| if (settings::lockModules) | |||||
| Widget::onButton(e); | |||||
| else | |||||
| OpaqueWidget::onButton(e); | |||||
| if (e.isConsumed()) | if (e.isConsumed()) | ||||
| return; | return; | ||||
| @@ -75,7 +75,6 @@ void RackScrollWidget::step() { | |||||
| oldOffset = offset; | oldOffset = offset; | ||||
| } | } | ||||
| void RackScrollWidget::draw(const DrawArgs& args) { | void RackScrollWidget::draw(const DrawArgs& args) { | ||||
| // Hide scrollbars if full screen | // Hide scrollbars if full screen | ||||
| bool fullscreen = APP->window->isFullScreen(); | bool fullscreen = APP->window->isFullScreen(); | ||||
| @@ -528,16 +528,19 @@ long Engine::getFrame() { | |||||
| long Engine::getStepFrame() { | long Engine::getStepFrame() { | ||||
| // No lock, for performance | |||||
| return internal->stepFrame; | return internal->stepFrame; | ||||
| } | } | ||||
| long Engine::getStepTime() { | long Engine::getStepTime() { | ||||
| // No lock, for performance | |||||
| return internal->stepTime; | return internal->stepTime; | ||||
| } | } | ||||
| int Engine::getStepFrames() { | int Engine::getStepFrames() { | ||||
| // No lock, for performance | |||||
| return internal->stepFrames; | return internal->stepFrames; | ||||
| } | } | ||||
| @@ -64,7 +64,7 @@ void ScrollWidget::step() { | |||||
| } | } | ||||
| void ScrollWidget::onButton(const event::Button& e) { | void ScrollWidget::onButton(const event::Button& e) { | ||||
| Widget::onButton(e); | |||||
| OpaqueWidget::onButton(e); | |||||
| if (e.isConsumed()) | if (e.isConsumed()) | ||||
| return; | return; | ||||
| @@ -78,7 +78,7 @@ void ScrollWidget::onButton(const event::Button& e) { | |||||
| } | } | ||||
| void ScrollWidget::onDragStart(const event::DragStart& e) { | void ScrollWidget::onDragStart(const event::DragStart& e) { | ||||
| if (e.button == GLFW_MOUSE_BUTTON_MIDDLE) { | |||||
| if (e.button == GLFW_MOUSE_BUTTON_LEFT || e.button == GLFW_MOUSE_BUTTON_MIDDLE) { | |||||
| e.consume(this); | e.consume(this); | ||||
| } | } | ||||
| } | } | ||||