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

Method createChildMenu

src/app/PortWidget.cpp:140–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138 }
139
140 ui::Menu* createChildMenu() override {
141 ui::Menu* menu = new ui::Menu;
142
143 // menu->addChild(createMenuLabel(string::f(string::translate("PortWidget.cableId"), cw->cable->id)));
144
145 for (NVGcolor color : settings::cableColors) {
146 // Include extra leading spaces for the color circle
147 CableColorItem* item = createMenuItem<CableColorItem>(string::translate("PortWidget.setColor"));
148 item->disabled = color::isEqual(color, cw->color);
149 item->cw = cw;
150 item->color = color;
151 menu->addChild(item);
152 }
153
154 return menu;
155 }
156};
157
158

Callers

nothing calls this directly

Calls 3

translateFunction · 0.85
isEqualFunction · 0.85
addChildMethod · 0.80

Tested by

no test coverage detected