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

Method configSwitch

include/engine/Module.hpp:153–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151 */
152 template <class TSwitchQuantity = SwitchQuantity>
153 TSwitchQuantity* configSwitch(int paramId, float minValue, float maxValue, float defaultValue, std::string name = "", std::vector<std::string> labels = {}) {
154 TSwitchQuantity* sq = configParam<TSwitchQuantity>(paramId, minValue, maxValue, defaultValue, name);
155 sq->ParamQuantity::snapEnabled = true;
156 sq->ParamQuantity::smoothEnabled = false;
157 sq->SwitchQuantity::labels = labels;
158 return sq;
159 }
160
161 /** Helper for creating a SwitchQuantity with no label.
162 Should only be called from a Module subclass's constructor.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected