MCPcopy Create free account
hub / github.com/VCVRack/Rack / draw

Method draw

src/ui/OptionButton.cpp:8–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6
7
8void OptionButton::draw(const DrawArgs& args) {
9 BNDwidgetState state = BND_DEFAULT;
10 if (quantity) {
11 if (quantity->isMax())
12 state = BND_ACTIVE;
13 }
14
15 std::string text = this->text;
16 if (text.empty() && quantity)
17 text = quantity->getLabel();
18 bndOptionButton(args.vg, 0.0, 0.0, INFINITY, box.size.y, state, text.c_str());
19}
20
21
22} // namespace ui

Callers

nothing calls this directly

Calls 3

isMaxMethod · 0.80
emptyMethod · 0.45
getLabelMethod · 0.45

Tested by

no test coverage detected