| 186 | } |
| 187 | |
| 188 | void StepSequencer::UpdateLights(bool force /*=false*/) |
| 189 | { |
| 190 | if (!HasGridController() || mGridControlTarget->GetGridController() == nullptr) |
| 191 | return; |
| 192 | |
| 193 | auto* gridController = mGridControlTarget->GetGridController(); |
| 194 | |
| 195 | for (int x = 0; x < GetGridControllerCols(); ++x) |
| 196 | { |
| 197 | for (int y = 0; y < GetGridControllerRows(); ++y) |
| 198 | { |
| 199 | if (gridController->IsMultisliderGrid()) |
| 200 | { |
| 201 | Vec2i gridPos = ControllerToGrid(Vec2i(x, y)); |
| 202 | gridController->SetLightDirect(x, y, (int)(mGrid->GetVal(gridPos.x, gridPos.y) * 127), force); |
| 203 | } |
| 204 | else |
| 205 | { |
| 206 | GridColor color = GetGridColor(x, y); |
| 207 | gridController->SetLight(x, y, color, force); |
| 208 | } |
| 209 | } |
| 210 | } |
| 211 | } |
| 212 | |
| 213 | GridColor StepSequencer::GetGridColor(int x, int y) |
| 214 | { |
nothing calls this directly
no test coverage detected