MCPcopy Create free account
hub / github.com/VCVRack/Rack / createLightCentered

Function createLightCentered

include/helpers.hpp:154–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152
153template <class TModuleLightWidget>
154TModuleLightWidget* createLightCentered(math::Vec pos, engine::Module* module, int firstLightId) {
155 TModuleLightWidget* o = createLight<TModuleLightWidget>(pos, module, firstLightId);
156 o->box.pos = o->box.pos.minus(o->box.size.div(2));
157 return o;
158}
159
160
161/** Creates a param with a light and calls setFirstLightId() on it.

Callers

nothing calls this directly

Calls 2

minusMethod · 0.80
divMethod · 0.80

Tested by

no test coverage detected