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.

22 lines
464B

  1. #include <ui/ChoiceButton.hpp>
  2. #include <context.hpp>
  3. #include <event.hpp>
  4. namespace rack {
  5. namespace ui {
  6. void ChoiceButton::draw(const DrawArgs& args) {
  7. BNDwidgetState state = BND_DEFAULT;
  8. if (APP->event->hoveredWidget == this)
  9. state = BND_HOVER;
  10. if (APP->event->draggedWidget == this)
  11. state = BND_ACTIVE;
  12. bndChoiceButton(args.vg, 0.0, 0.0, box.size.x, box.size.y, BND_CORNER_NONE, state, -1, text.c_str());
  13. }
  14. } // namespace ui
  15. } // namespace rack