Mouse press event. This UI will change color when clicked. */
| 186 | This UI will change color when clicked. |
| 187 | */ |
| 188 | bool onMouse(const MouseEvent& ev) override |
| 189 | { |
| 190 | // Test for left-clicked + pressed first. |
| 191 | if (ev.button != 1 || ! ev.press) |
| 192 | return false; |
| 193 | |
| 194 | const int newColor(fColorValue == 0 ? 1 : 0); |
| 195 | updateColor(newColor); |
| 196 | setParameterValue(0, newColor); |
| 197 | |
| 198 | return true; |
| 199 | } |
| 200 | |
| 201 | // ------------------------------------------------------------------------------------------------------- |
| 202 |
nothing calls this directly
no test coverage detected