From a98b8949623f16c009919669aec9246d6cdf9807 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Sat, 2 Sep 2023 13:28:48 -0400 Subject: [PATCH] Add dark panels for Push, RandomValues, Rescale, and SHASR. --- res/Push-dark.svg | 55 +++++++++++++++++++ res/RandomValues-dark.svg | 46 ++++++++++++++++ res/Rescale-dark.svg | 74 +++++++++++++++++++++++++ res/SHASR-dark.svg | 110 ++++++++++++++++++++++++++++++++++++++ src/Push.cpp | 18 +++---- src/RandomValues.cpp | 26 ++++----- src/Rescale.cpp | 14 ++--- src/SHASR.cpp | 60 ++++++++++----------- 8 files changed, 344 insertions(+), 59 deletions(-) create mode 100644 res/Push-dark.svg create mode 100644 res/RandomValues-dark.svg create mode 100644 res/Rescale-dark.svg create mode 100644 res/SHASR-dark.svg diff --git a/res/Push-dark.svg b/res/Push-dark.svg new file mode 100644 index 0000000..2ab3085 --- /dev/null +++ b/res/Push-dark.svg @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/res/RandomValues-dark.svg b/res/RandomValues-dark.svg new file mode 100644 index 0000000..ec723c1 --- /dev/null +++ b/res/RandomValues-dark.svg @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/res/Rescale-dark.svg b/res/Rescale-dark.svg new file mode 100644 index 0000000..e67f7f1 --- /dev/null +++ b/res/Rescale-dark.svg @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/res/SHASR-dark.svg b/res/SHASR-dark.svg new file mode 100644 index 0000000..4685706 --- /dev/null +++ b/res/SHASR-dark.svg @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Push.cpp b/src/Push.cpp index aefb35e..e7da049 100644 --- a/src/Push.cpp +++ b/src/Push.cpp @@ -91,21 +91,21 @@ struct Push : Module { struct PushWidget : ModuleWidget { PushWidget(Push* module) { setModule(module); - setPanel(createPanel(asset::plugin(pluginInstance, "res/Push.svg"))); + setPanel(createPanel(asset::plugin(pluginInstance, "res/Push.svg"), asset::plugin(pluginInstance, "res/Push-dark.svg"))); - addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); - addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); - addChild(createWidget(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); + addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); + addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); + addChild(createWidget(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); + addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); addParam(createLightParamCentered>>(mm2px(Vec(7.62, 24.723)), module, Push::PUSH_PARAM, Push::PUSH_LIGHT)); addParam(createLightParamCentered>(mm2px(Vec(7.617, 48.074)), module, Push::HOLD_PARAM, Push::HOLD_LIGHT)); - addInput(createInputCentered(mm2px(Vec(7.612, 64.344)), module, Push::HOLD_INPUT)); - addInput(createInputCentered(mm2px(Vec(7.612, 80.597)), module, Push::PUSH_INPUT)); + addInput(createInputCentered(mm2px(Vec(7.612, 64.344)), module, Push::HOLD_INPUT)); + addInput(createInputCentered(mm2px(Vec(7.612, 80.597)), module, Push::PUSH_INPUT)); - addOutput(createOutputCentered(mm2px(Vec(7.62, 96.864)), module, Push::TRIG_OUTPUT)); - addOutput(createOutputCentered(mm2px(Vec(7.62, 113.115)), module, Push::GATE_OUTPUT)); + addOutput(createOutputCentered(mm2px(Vec(7.62, 96.864)), module, Push::TRIG_OUTPUT)); + addOutput(createOutputCentered(mm2px(Vec(7.62, 113.115)), module, Push::GATE_OUTPUT)); } }; diff --git a/src/RandomValues.cpp b/src/RandomValues.cpp index 9828744..2cae4a2 100644 --- a/src/RandomValues.cpp +++ b/src/RandomValues.cpp @@ -102,24 +102,24 @@ struct RandomValues : Module { struct RandomValuesWidget : ModuleWidget { RandomValuesWidget(RandomValues* module) { setModule(module); - setPanel(createPanel(asset::plugin(pluginInstance, "res/RandomValues.svg"))); + setPanel(createPanel(asset::plugin(pluginInstance, "res/RandomValues.svg"), asset::plugin(pluginInstance, "res/RandomValues-dark.svg"))); - addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); - addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); - addChild(createWidget(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); + addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); + addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); + addChild(createWidget(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); + addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); addParam(createLightParamCentered>(mm2px(Vec(7.62, 21.968)), module, RandomValues::PUSH_PARAM, RandomValues::PUSH_LIGHT)); - addInput(createInputCentered(mm2px(Vec(7.622, 38.225)), module, RandomValues::TRIG_INPUT)); + addInput(createInputCentered(mm2px(Vec(7.622, 38.225)), module, RandomValues::TRIG_INPUT)); - addOutput(createOutputCentered(mm2px(Vec(7.622, 52.35)), module, RandomValues::RND_OUTPUTS + 0)); - addOutput(createOutputCentered(mm2px(Vec(7.622, 62.477)), module, RandomValues::RND_OUTPUTS + 1)); - addOutput(createOutputCentered(mm2px(Vec(7.622, 72.605)), module, RandomValues::RND_OUTPUTS + 2)); - addOutput(createOutputCentered(mm2px(Vec(7.622, 82.732)), module, RandomValues::RND_OUTPUTS + 3)); - addOutput(createOutputCentered(mm2px(Vec(7.622, 92.86)), module, RandomValues::RND_OUTPUTS + 4)); - addOutput(createOutputCentered(mm2px(Vec(7.622, 102.987)), module, RandomValues::RND_OUTPUTS + 5)); - addOutput(createOutputCentered(mm2px(Vec(7.622, 113.013)), module, RandomValues::RND_OUTPUTS + 6)); + addOutput(createOutputCentered(mm2px(Vec(7.622, 52.35)), module, RandomValues::RND_OUTPUTS + 0)); + addOutput(createOutputCentered(mm2px(Vec(7.622, 62.477)), module, RandomValues::RND_OUTPUTS + 1)); + addOutput(createOutputCentered(mm2px(Vec(7.622, 72.605)), module, RandomValues::RND_OUTPUTS + 2)); + addOutput(createOutputCentered(mm2px(Vec(7.622, 82.732)), module, RandomValues::RND_OUTPUTS + 3)); + addOutput(createOutputCentered(mm2px(Vec(7.622, 92.86)), module, RandomValues::RND_OUTPUTS + 4)); + addOutput(createOutputCentered(mm2px(Vec(7.622, 102.987)), module, RandomValues::RND_OUTPUTS + 5)); + addOutput(createOutputCentered(mm2px(Vec(7.622, 113.013)), module, RandomValues::RND_OUTPUTS + 6)); } void appendContextMenu(Menu* menu) override { diff --git a/src/Rescale.cpp b/src/Rescale.cpp index e2b7842..c0a4823 100644 --- a/src/Rescale.cpp +++ b/src/Rescale.cpp @@ -129,21 +129,21 @@ struct Rescale : Module { struct RescaleWidget : ModuleWidget { RescaleWidget(Rescale* module) { setModule(module); - setPanel(createPanel(asset::plugin(pluginInstance, "res/Rescale.svg"))); + setPanel(createPanel(asset::plugin(pluginInstance, "res/Rescale.svg"), asset::plugin(pluginInstance, "res/Rescale-dark.svg"))); - addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); - addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); - addChild(createWidget(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); + addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); + addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); + addChild(createWidget(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); + addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); addParam(createParamCentered(mm2px(Vec(7.62, 24.723)), module, Rescale::GAIN_PARAM)); addParam(createParamCentered(mm2px(Vec(7.617, 43.031)), module, Rescale::OFFSET_PARAM)); addParam(createParamCentered(mm2px(Vec(7.612, 64.344)), module, Rescale::MAX_PARAM)); addParam(createParamCentered(mm2px(Vec(7.612, 80.597)), module, Rescale::MIN_PARAM)); - addInput(createInputCentered(mm2px(Vec(7.62, 96.859)), module, Rescale::IN_INPUT)); + addInput(createInputCentered(mm2px(Vec(7.62, 96.859)), module, Rescale::IN_INPUT)); - addOutput(createOutputCentered(mm2px(Vec(7.62, 113.115)), module, Rescale::OUT_OUTPUT)); + addOutput(createOutputCentered(mm2px(Vec(7.62, 113.115)), module, Rescale::OUT_OUTPUT)); } void appendContextMenu(Menu* menu) override { diff --git a/src/SHASR.cpp b/src/SHASR.cpp index 9965864..6e004ea 100644 --- a/src/SHASR.cpp +++ b/src/SHASR.cpp @@ -79,42 +79,42 @@ struct SHASR : Module { struct SHASRWidget : ModuleWidget { SHASRWidget(SHASR* module) { setModule(module); - setPanel(createPanel(asset::plugin(pluginInstance, "res/SHASR.svg"))); + setPanel(createPanel(asset::plugin(pluginInstance, "res/SHASR.svg"), asset::plugin(pluginInstance, "res/SHASR-dark.svg"))); - addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); - addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); - addChild(createWidget(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); + addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); + addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); + addChild(createWidget(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); + addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); addParam(createParamCentered(mm2px(Vec(6.96, 21.852)), module, SHASR::RND_PARAM)); addParam(createParamCentered(mm2px(Vec(17.788, 21.852)), module, SHASR::PUSH_PARAM)); addParam(createParamCentered(mm2px(Vec(28.6, 21.852)), module, SHASR::CLEAR_PARAM)); - addInput(createInputCentered(mm2px(Vec(6.96, 42.113)), module, SHASR::IN_INPUTS + 0)); - addInput(createInputCentered(mm2px(Vec(17.788, 42.055)), module, SHASR::TRIG_INPUTS + 0)); - addInput(createInputCentered(mm2px(Vec(6.96, 52.241)), module, SHASR::IN_INPUTS + 1)); - addInput(createInputCentered(mm2px(Vec(17.788, 52.241)), module, SHASR::TRIG_INPUTS + 1)); - addInput(createInputCentered(mm2px(Vec(6.96, 62.368)), module, SHASR::IN_INPUTS + 2)); - addInput(createInputCentered(mm2px(Vec(17.788, 62.368)), module, SHASR::TRIG_INPUTS + 2)); - addInput(createInputCentered(mm2px(Vec(6.96, 72.496)), module, SHASR::IN_INPUTS + 3)); - addInput(createInputCentered(mm2px(Vec(17.788, 72.496)), module, SHASR::TRIG_INPUTS + 3)); - addInput(createInputCentered(mm2px(Vec(6.96, 82.623)), module, SHASR::IN_INPUTS + 4)); - addInput(createInputCentered(mm2px(Vec(17.788, 82.623)), module, SHASR::TRIG_INPUTS + 4)); - addInput(createInputCentered(mm2px(Vec(6.96, 92.75)), module, SHASR::IN_INPUTS + 5)); - addInput(createInputCentered(mm2px(Vec(17.788, 92.75)), module, SHASR::TRIG_INPUTS + 5)); - addInput(createInputCentered(mm2px(Vec(6.96, 102.878)), module, SHASR::IN_INPUTS + 6)); - addInput(createInputCentered(mm2px(Vec(17.788, 102.878)), module, SHASR::TRIG_INPUTS + 6)); - addInput(createInputCentered(mm2px(Vec(6.96, 113.005)), module, SHASR::IN_INPUTS + 7)); - addInput(createInputCentered(mm2px(Vec(17.788, 113.005)), module, SHASR::TRIG_INPUTS + 7)); - - addOutput(createOutputCentered(mm2px(Vec(28.6, 42.113)), module, SHASR::SH_OUTPUTS + 0)); - addOutput(createOutputCentered(mm2px(Vec(28.6, 52.241)), module, SHASR::SH_OUTPUTS + 1)); - addOutput(createOutputCentered(mm2px(Vec(28.6, 62.368)), module, SHASR::SH_OUTPUTS + 2)); - addOutput(createOutputCentered(mm2px(Vec(28.6, 72.496)), module, SHASR::SH_OUTPUTS + 3)); - addOutput(createOutputCentered(mm2px(Vec(28.6, 82.623)), module, SHASR::SH_OUTPUTS + 4)); - addOutput(createOutputCentered(mm2px(Vec(28.6, 92.75)), module, SHASR::SH_OUTPUTS + 5)); - addOutput(createOutputCentered(mm2px(Vec(28.6, 102.878)), module, SHASR::SH_OUTPUTS + 6)); - addOutput(createOutputCentered(mm2px(Vec(28.6, 113.005)), module, SHASR::SH_OUTPUTS + 7)); + addInput(createInputCentered(mm2px(Vec(6.96, 42.113)), module, SHASR::IN_INPUTS + 0)); + addInput(createInputCentered(mm2px(Vec(17.788, 42.055)), module, SHASR::TRIG_INPUTS + 0)); + addInput(createInputCentered(mm2px(Vec(6.96, 52.241)), module, SHASR::IN_INPUTS + 1)); + addInput(createInputCentered(mm2px(Vec(17.788, 52.241)), module, SHASR::TRIG_INPUTS + 1)); + addInput(createInputCentered(mm2px(Vec(6.96, 62.368)), module, SHASR::IN_INPUTS + 2)); + addInput(createInputCentered(mm2px(Vec(17.788, 62.368)), module, SHASR::TRIG_INPUTS + 2)); + addInput(createInputCentered(mm2px(Vec(6.96, 72.496)), module, SHASR::IN_INPUTS + 3)); + addInput(createInputCentered(mm2px(Vec(17.788, 72.496)), module, SHASR::TRIG_INPUTS + 3)); + addInput(createInputCentered(mm2px(Vec(6.96, 82.623)), module, SHASR::IN_INPUTS + 4)); + addInput(createInputCentered(mm2px(Vec(17.788, 82.623)), module, SHASR::TRIG_INPUTS + 4)); + addInput(createInputCentered(mm2px(Vec(6.96, 92.75)), module, SHASR::IN_INPUTS + 5)); + addInput(createInputCentered(mm2px(Vec(17.788, 92.75)), module, SHASR::TRIG_INPUTS + 5)); + addInput(createInputCentered(mm2px(Vec(6.96, 102.878)), module, SHASR::IN_INPUTS + 6)); + addInput(createInputCentered(mm2px(Vec(17.788, 102.878)), module, SHASR::TRIG_INPUTS + 6)); + addInput(createInputCentered(mm2px(Vec(6.96, 113.005)), module, SHASR::IN_INPUTS + 7)); + addInput(createInputCentered(mm2px(Vec(17.788, 113.005)), module, SHASR::TRIG_INPUTS + 7)); + + addOutput(createOutputCentered(mm2px(Vec(28.6, 42.113)), module, SHASR::SH_OUTPUTS + 0)); + addOutput(createOutputCentered(mm2px(Vec(28.6, 52.241)), module, SHASR::SH_OUTPUTS + 1)); + addOutput(createOutputCentered(mm2px(Vec(28.6, 62.368)), module, SHASR::SH_OUTPUTS + 2)); + addOutput(createOutputCentered(mm2px(Vec(28.6, 72.496)), module, SHASR::SH_OUTPUTS + 3)); + addOutput(createOutputCentered(mm2px(Vec(28.6, 82.623)), module, SHASR::SH_OUTPUTS + 4)); + addOutput(createOutputCentered(mm2px(Vec(28.6, 92.75)), module, SHASR::SH_OUTPUTS + 5)); + addOutput(createOutputCentered(mm2px(Vec(28.6, 102.878)), module, SHASR::SH_OUTPUTS + 6)); + addOutput(createOutputCentered(mm2px(Vec(28.6, 113.005)), module, SHASR::SH_OUTPUTS + 7)); } };