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

Method draw

src/ui/Tooltip.cpp:26–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26void Tooltip::draw(const DrawArgs& args) {
27 bndTooltipBackground(args.vg, 0.0, 0.0, box.size.x, box.size.y);
28 nvgTextLineHeight(args.vg, 1.2);
29
30 // Because there is no bndThemeLabel() function, temporarily replace the menu text color with tooltip text color and draw a menu label
31 BNDtheme* theme = (BNDtheme*) bndGetTheme();
32 NVGcolor menuTextColor = theme->menuTheme.textColor;
33 theme->menuTheme.textColor = theme->tooltipTheme.textColor;
34 bndMenuLabel(args.vg, 0.0, 0.0, INFINITY, box.size.y, -1, text.c_str());
35 theme->menuTheme.textColor = menuTextColor;
36
37 Widget::draw(args);
38}
39
40
41} // namespace ui

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected