A few corrections:
-
void Widget::draw(const DrawArgs& args)
is not deprecated. Perhaps you are thinking ofvoid Widget::draw(NVGcontext* vg)
which was deprecated in Rack 1.0. - Layer 2 and 3 are drawn by Rack’s cable container which only contains cable widgets. Rack does not draw these layers for
ModuleWidget
s.
Layers are useful for a custom parent widget to draw its children in multiple passes.
There’s no current standard for choosing layers by plugin developers, but I’d recommend using layer >= 1000
for custom layers to avoid interfering with any Rack-drawn layers in future updates.