| 1429 | } |
| 1430 | |
| 1431 | bool MidiController::MouseMoved(float x, float y) |
| 1432 | { |
| 1433 | IDrawableModule::MouseMoved(x, y); |
| 1434 | |
| 1435 | mHoveredLayoutElement = -1; |
| 1436 | |
| 1437 | if (mMappingDisplayMode == kLayout) |
| 1438 | { |
| 1439 | for (int i = 0; i < NUM_LAYOUT_CONTROLS; ++i) |
| 1440 | { |
| 1441 | ControlLayoutElement& control = mLayoutControls[i]; |
| 1442 | if (control.mActive) |
| 1443 | { |
| 1444 | ofRectangle controlRect(control.mPosition.x, control.mPosition.y, control.mDimensions.x, control.mDimensions.y); |
| 1445 | if (controlRect.contains(x, y)) |
| 1446 | { |
| 1447 | mHoveredLayoutElement = i; |
| 1448 | control.mControlCable->SetPatchCableDrawMode(kPatchCableDrawMode_Normal); |
| 1449 | } |
| 1450 | else |
| 1451 | { |
| 1452 | control.mControlCable->SetPatchCableDrawMode(kPatchCableDrawMode_SourceOnHoverOnly); |
| 1453 | } |
| 1454 | } |
| 1455 | } |
| 1456 | |
| 1457 | int i = 0; |
| 1458 | for (auto* grid : mGrids) |
| 1459 | { |
| 1460 | ofRectangle controlRect(grid->mPosition.x - 5, grid->mPosition.y - 5, 10, 10); |
| 1461 | if (controlRect.contains(x, y)) |
| 1462 | mHoveredLayoutElement = i + kHoveredLayoutElement_GridOffset; |
| 1463 | ++i; |
| 1464 | } |
| 1465 | } |
| 1466 | |
| 1467 | return false; |
| 1468 | } |
| 1469 | |
| 1470 | bool MidiController::IsInputConnected(bool immediate) |
| 1471 | { |
nothing calls this directly
no test coverage detected