| 86 | } |
| 87 | |
| 88 | void PlugWidget::step() { |
| 89 | std::vector<float> values(3); |
| 90 | |
| 91 | PortWidget* pw = internal->cableWidget->getPort(internal->type); |
| 92 | if (pw && internal->plugLight->isVisible()) { |
| 93 | engine::Port* port = pw->getPort(); |
| 94 | if (port) { |
| 95 | for (int i = 0; i < 3; i++) { |
| 96 | values[i] = port->plugLights[i].getBrightness(); |
| 97 | } |
| 98 | } |
| 99 | } |
| 100 | internal->plugLight->setBrightnesses(values); |
| 101 | |
| 102 | Widget::step(); |
| 103 | } |
| 104 | |
| 105 | void PlugWidget::setColor(NVGcolor color) { |
| 106 | if (color::isEqual(color, internal->plugTint->color)) |
nothing calls this directly
no test coverage detected