| 435 | LedDisplaySeparator* separators[MAX_CHANNELS]; |
| 436 | |
| 437 | void setModule(MIDIMap* module) { |
| 438 | this->module = module; |
| 439 | |
| 440 | scroll = new ScrollWidget; |
| 441 | scroll->box.pos = channelChoice->box.getBottomLeft(); |
| 442 | scroll->box.size.x = box.size.x; |
| 443 | scroll->box.size.y = box.size.y - scroll->box.pos.y; |
| 444 | addChild(scroll); |
| 445 | |
| 446 | LedDisplaySeparator* separator = createWidget<LedDisplaySeparator>(scroll->box.pos); |
| 447 | separator->box.size.x = box.size.x; |
| 448 | addChild(separator); |
| 449 | separators[0] = separator; |
| 450 | |
| 451 | Vec pos; |
| 452 | for (int id = 0; id < MAX_CHANNELS; id++) { |
| 453 | if (id > 0) { |
| 454 | LedDisplaySeparator* separator = createWidget<LedDisplaySeparator>(pos); |
| 455 | separator->box.size.x = box.size.x; |
| 456 | scroll->container->addChild(separator); |
| 457 | separators[id] = separator; |
| 458 | } |
| 459 | |
| 460 | MIDIMapChoice* choice = createWidget<MIDIMapChoice>(pos); |
| 461 | choice->box.size.x = box.size.x; |
| 462 | choice->id = id; |
| 463 | choice->setModule(module); |
| 464 | scroll->container->addChild(choice); |
| 465 | choices[id] = choice; |
| 466 | |
| 467 | pos = choice->box.getBottomLeft(); |
| 468 | } |
| 469 | } |
| 470 | |
| 471 | void step() override { |
| 472 | if (module) { |
nothing calls this directly
no test coverage detected