| @@ -1 +1 @@ | |||||
| Subproject commit d6d1d3b55c2737a9a0c13f69ee76238917ad62e3 | |||||
| Subproject commit c2b9c40333a7b5e066dcb8d60fa023373b639324 | |||||
| @@ -1,6 +1,6 @@ | |||||
| /* | /* | ||||
| * DISTRHO Plugin Framework (DPF) | * DISTRHO Plugin Framework (DPF) | ||||
| * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com> | |||||
| * Copyright (C) 2012-2018 Filipe Coelho <falktx@falktx.com> | |||||
| * | * | ||||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | * Permission to use, copy, modify, and/or distribute this software for any purpose with | ||||
| * or without fee is hereby granted, provided that the above copyright notice and this | * or without fee is hereby granted, provided that the above copyright notice and this | ||||
| @@ -28,4 +28,7 @@ | |||||
| #define DISTRHO_PLUGIN_WANT_STATE 1 | #define DISTRHO_PLUGIN_WANT_STATE 1 | ||||
| #define DISTRHO_UI_USE_NANOVG 1 | #define DISTRHO_UI_USE_NANOVG 1 | ||||
| #define METER_COLOR_GREEN 0 | |||||
| #define METER_COLOR_BLUE 1 | |||||
| #endif // DISTRHO_PLUGIN_INFO_H_INCLUDED | #endif // DISTRHO_PLUGIN_INFO_H_INCLUDED | ||||
| @@ -1,6 +1,6 @@ | |||||
| /* | /* | ||||
| * DISTRHO Plugin Framework (DPF) | * DISTRHO Plugin Framework (DPF) | ||||
| * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||||
| * Copyright (C) 2012-2018 Filipe Coelho <falktx@falktx.com> | |||||
| * | * | ||||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | * Permission to use, copy, modify, and/or distribute this software for any purpose with | ||||
| * or without fee is hereby granted, provided that the above copyright notice and this | * or without fee is hereby granted, provided that the above copyright notice and this | ||||
| @@ -123,6 +123,17 @@ protected: | |||||
| parameter.hints = kParameterIsAutomable|kParameterIsInteger; | parameter.hints = kParameterIsAutomable|kParameterIsInteger; | ||||
| parameter.name = "color"; | parameter.name = "color"; | ||||
| parameter.symbol = "color"; | parameter.symbol = "color"; | ||||
| parameter.enumValues.count = 2; | |||||
| parameter.enumValues.restrictedMode = true; | |||||
| { | |||||
| ParameterEnumerationValue* const values = new ParameterEnumerationValue[2]; | |||||
| parameter.enumValues.values = values; | |||||
| values[0].label = "Green"; | |||||
| values[0].value = METER_COLOR_GREEN; | |||||
| values[1].label = "Blue"; | |||||
| values[1].value = METER_COLOR_BLUE; | |||||
| } | |||||
| break; | break; | ||||
| case 1: | case 1: | ||||
| parameter.hints = kParameterIsAutomable|kParameterIsOutput; | parameter.hints = kParameterIsAutomable|kParameterIsOutput; | ||||
| @@ -1,6 +1,6 @@ | |||||
| /* | /* | ||||
| * DISTRHO Plugin Framework (DPF) | * DISTRHO Plugin Framework (DPF) | ||||
| * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com> | |||||
| * Copyright (C) 2012-2018 Filipe Coelho <falktx@falktx.com> | |||||
| * | * | ||||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | * Permission to use, copy, modify, and/or distribute this software for any purpose with | ||||
| * or without fee is hereby granted, provided that the above copyright notice and this | * or without fee is hereby granted, provided that the above copyright notice and this | ||||
| @@ -58,7 +58,7 @@ protected: | |||||
| switch (index) | switch (index) | ||||
| { | { | ||||
| case 0: // color | case 0: // color | ||||
| updateColor(value); | |||||
| updateColor(std::round(value)); | |||||
| break; | break; | ||||
| case 1: // out-left | case 1: // out-left | ||||
| @@ -224,10 +224,10 @@ private: | |||||
| switch (color) | switch (color) | ||||
| { | { | ||||
| case 0: // green | |||||
| case METER_COLOR_GREEN: | |||||
| fColor = Color(93, 231, 61); | fColor = Color(93, 231, 61); | ||||
| break; | break; | ||||
| case 1: // blue | |||||
| case METER_COLOR_BLUE: | |||||
| fColor = Color(82, 238, 248); | fColor = Color(82, 238, 248); | ||||
| break; | break; | ||||
| } | } | ||||