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 Blank09.cpp
  4. //!
  5. //! \brief Blank 9 is a simple do nothing 9-hole high quality blank.
  6. //!
  7. //============================================================================================================
  8. #include "Gratrix.hpp"
  9. namespace rack_plugin_Gratrix {
  10. //============================================================================================================
  11. //! \brief The module.
  12. struct GtxModule_Blank_09 : Module
  13. {
  14. GtxModule_Blank_09() : Module(0, 0, 0) {}
  15. };
  16. //============================================================================================================
  17. //! \brief The widget.
  18. struct GtxWidget_Blank_09 : ModuleWidget
  19. {
  20. GtxWidget_Blank_09(GtxModule_Blank_09 *module) : ModuleWidget(module)
  21. {
  22. GTX__WIDGET();
  23. box.size = Vec(9*15, 380);
  24. #if GTX__SAVE_SVG
  25. {
  26. PanelGen pg(assetPlugin(plugin, "build/res/Blank09.svg"), box.size);
  27. }
  28. #endif
  29. setPanel(SVG::load(assetPlugin(plugin, "res/Blank09.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_09) {
  39. Model *model = Model::create<GtxModule_Blank_09, GtxWidget_Blank_09>("Gratrix", "Blank9", "Blank 9", BLANK_TAG);
  40. return model;
  41. }