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.

23 lines
418B

  1. #pragma once
  2. #include "ui/common.hpp"
  3. namespace rack {
  4. struct WindowWidget : OpaqueWidget {
  5. std::string title;
  6. void draw(NVGcontext *vg) override {
  7. bndNodeBackground(vg, 0.0, 0.0, box.size.x, box.size.y, BND_DEFAULT, -1, title.c_str(), bndGetTheme()->backgroundColor);
  8. Widget::draw(vg);
  9. }
  10. void onDragMove(event::DragMove &e) override {
  11. box.pos = box.pos.plus(e.mouseDelta);
  12. }
  13. };
  14. } // namespace rack