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

Method createTooltip

src/app/Browser.cpp:304–325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

302 }
303
304 ui::Tooltip* createTooltip() {
305 std::string text;
306 text += model->name;
307 text += "\n";
308 text += model->plugin->brand;
309 // Description
310 if (model->description != "") {
311 text += "\n" + model->description;
312 }
313 // Tags
314 text += "\n\n";
315 text += string::translate("Browser.tooltipTags");
316 std::vector<std::string> tags;
317 for (int tagId : model->tagIds) {
318 std::string tag = string::translate("tag." + tag::getTag(tagId));
319 tags.push_back(tag);
320 }
321 text += string::join(tags, ", ");
322 ui::Tooltip* tooltip = new ui::Tooltip;
323 tooltip->text = text;
324 return tooltip;
325 }
326
327 void onEnter(const EnterEvent& e) override {
328 setTooltip(createTooltip());

Callers

nothing calls this directly

Calls 3

translateFunction · 0.85
getTagFunction · 0.85
joinFunction · 0.50

Tested by

no test coverage detected