| 114 | } |
| 115 | |
| 116 | void GridControllerMidi::OnInput(int control, float velocity) |
| 117 | { |
| 118 | int x = 0; |
| 119 | int y = 0; |
| 120 | bool found = false; |
| 121 | for (x = 0; x < mCols; ++x) |
| 122 | { |
| 123 | for (y = 0; y < mRows; ++y) |
| 124 | { |
| 125 | if (mControls[x][y] == control) |
| 126 | { |
| 127 | found = true; |
| 128 | break; |
| 129 | } |
| 130 | } |
| 131 | if (found) |
| 132 | break; |
| 133 | } |
| 134 | |
| 135 | if (found) |
| 136 | { |
| 137 | mInput[x][y] = velocity; |
| 138 | |
| 139 | if (mOwner) |
| 140 | mOwner->OnGridButton(x, y, velocity, this); |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | bool GridControllerMidi::HasInput() const |
| 145 | { |
no test coverage detected