MCPcopy Create free account
hub / github.com/DISTRHO/DPF / updateColor

Function updateColor

examples/Meters/ExampleUIMeters.cpp:219–237  ·  view source on GitHub ↗

Update color if needed. */

Source from the content-addressed store, hash-verified

217 Update color if needed.
218 */
219 void updateColor(const int color)
220 {
221 if (fColorValue == color)
222 return;
223
224 fColorValue = color;
225
226 switch (color)
227 {
228 case METER_COLOR_GREEN:
229 fColor = Color(93, 231, 61);
230 break;
231 case METER_COLOR_BLUE:
232 fColor = Color(82, 238, 248);
233 break;
234 }
235
236 repaint();
237 }
238
239 /**
240 Set our UI class as non-copyable and add a leak detector just in case.

Callers 2

parameterChangedFunction · 0.85
onMouseFunction · 0.85

Calls 1

repaintFunction · 0.50

Tested by

no test coverage detected