You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.5KB

  1. //============================================================================================================
  2. //!
  3. //! \file Blank03.cpp
  4. //!
  5. //! \brief Blank 3 is a simple do nothing 3-hole high quality blank.
  6. //!
  7. //============================================================================================================
  8. #include "Gratrix.hpp"
  9. namespace rack_plugin_Gratrix {
  10. //============================================================================================================
  11. //! \brief The module.
  12. struct GtxModule_Blank_03 : Module
  13. {
  14. GtxModule_Blank_03() : Module(0, 0, 0) {}
  15. };
  16. //============================================================================================================
  17. //! \brief The widget.
  18. struct GtxWidget_Blank_03 : ModuleWidget
  19. {
  20. GtxWidget_Blank_03(GtxModule_Blank_03 *module) : ModuleWidget(module)
  21. {
  22. GTX__WIDGET();
  23. box.size = Vec(3*15, 380);
  24. #if GTX__SAVE_SVG
  25. {
  26. PanelGen pg(assetPlugin(plugin, "build/res/Blank03.svg"), box.size);
  27. }
  28. #endif
  29. setPanel(SVG::load(assetPlugin(plugin, "res/Blank03.svg")));
  30. addChild(Widget::create<ScrewSilver>(Vec(15, 0)));
  31. addChild(Widget::create<ScrewSilver>(Vec(box.size.x-30, 0)));
  32. addChild(Widget::create<ScrewSilver>(Vec(15, 365)));
  33. addChild(Widget::create<ScrewSilver>(Vec(box.size.x-30, 365)));
  34. }
  35. };
  36. } // namespace rack_plugin_Gratrix
  37. using namespace rack_plugin_Gratrix;
  38. RACK_PLUGIN_MODEL_INIT(Gratrix, Blank_03) {
  39. Model *model = Model::create<GtxModule_Blank_03, GtxWidget_Blank_03>("Gratrix", "Blank3", "Blank 3", BLANK_TAG);
  40. return model;
  41. }