| 21 | |
| 22 | |
| 23 | void Scrollbar::draw(const DrawArgs& args) { |
| 24 | ScrollWidget* sw = dynamic_cast<ScrollWidget*>(parent); |
| 25 | assert(sw); |
| 26 | |
| 27 | BNDwidgetState state = BND_DEFAULT; |
| 28 | if (APP->event->getHoveredWidget() == this) |
| 29 | state = BND_HOVER; |
| 30 | if (APP->event->getDraggedWidget() == this) |
| 31 | state = BND_ACTIVE; |
| 32 | |
| 33 | float handleOffset = sw->getHandleOffset()[vertical]; |
| 34 | float handleSize = sw->getHandleSize()[vertical]; |
| 35 | nvgAlpha(args.vg, 0.5); |
| 36 | bndScrollBar(args.vg, 0.0, 0.0, box.size.x, box.size.y, state, handleOffset, handleSize); |
| 37 | } |
| 38 | |
| 39 | |
| 40 | void Scrollbar::onButton(const ButtonEvent& e) { |
nothing calls this directly
no test coverage detected