|
@@ -168,19 +168,26 @@ Widget *ModuleWidget::onMouseMove(Vec pos, Vec mouseRel) { |
|
|
Widget *ModuleWidget::onHoverKey(Vec pos, int key) { |
|
|
Widget *ModuleWidget::onHoverKey(Vec pos, int key) { |
|
|
switch (key) { |
|
|
switch (key) { |
|
|
case GLFW_KEY_I: |
|
|
case GLFW_KEY_I: |
|
|
if (guiIsModPressed() && !guiIsShiftPressed()) |
|
|
|
|
|
|
|
|
if (guiIsModPressed() && !guiIsShiftPressed()) { |
|
|
initialize(); |
|
|
initialize(); |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
break; |
|
|
break; |
|
|
case GLFW_KEY_R: |
|
|
case GLFW_KEY_R: |
|
|
if (guiIsModPressed() && !guiIsShiftPressed()) |
|
|
|
|
|
|
|
|
if (guiIsModPressed() && !guiIsShiftPressed()) { |
|
|
randomize(); |
|
|
randomize(); |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
break; |
|
|
break; |
|
|
case GLFW_KEY_D: |
|
|
case GLFW_KEY_D: |
|
|
if (guiIsModPressed() && !guiIsShiftPressed()) |
|
|
|
|
|
|
|
|
if (guiIsModPressed() && !guiIsShiftPressed()) { |
|
|
gRackWidget->cloneModule(this); |
|
|
gRackWidget->cloneModule(this); |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
return this; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return Widget::onHoverKey(pos, key); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void ModuleWidget::onDragStart() { |
|
|
void ModuleWidget::onDragStart() { |
|
|