| 638 | } |
| 639 | |
| 640 | void setModule(HostMIDIMap* const module) |
| 641 | { |
| 642 | this->module = module; |
| 643 | |
| 644 | scroll = new ScrollWidget; |
| 645 | scroll->box.size = box.size; |
| 646 | addChild(scroll); |
| 647 | |
| 648 | float posY = 0.0f; |
| 649 | for (int id = 0; id < MAX_MIDI_CONTROL; ++id) |
| 650 | { |
| 651 | if (id != 0) |
| 652 | { |
| 653 | LedDisplaySeparator* separator = createWidget<LedDisplaySeparator>(Vec(0.0f, posY)); |
| 654 | separator->box.size = Vec(box.size.x, 1.0f); |
| 655 | separator->visible = false; |
| 656 | scroll->container->addChild(separator); |
| 657 | separators[id] = separator; |
| 658 | } |
| 659 | |
| 660 | CardinalMIDIMapChoice* const choice = new CardinalMIDIMapChoice(module, id); |
| 661 | choice->box.pos = Vec(0.0f, posY); |
| 662 | choice->box.size = Vec(box.size.x, 20.0f); |
| 663 | choice->visible = id == 0; |
| 664 | scroll->container->addChild(choice); |
| 665 | choices[id] = choice; |
| 666 | |
| 667 | posY += choice->box.size.y; |
| 668 | } |
| 669 | } |
| 670 | |
| 671 | void step() override |
| 672 | { |
no test coverage detected