MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / DrawModuleUnclipped

Method DrawModuleUnclipped

Source/TitleBar.cpp:434–521  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

432}
433
434void TitleBar::DrawModuleUnclipped()
435{
436 if (mPluginListWindow != nullptr)
437 {
438 ofPushStyle();
439 ofSetColor(255, 255, 255);
440 float titleBarWidth, titleBarHeight;
441 TheTitleBar->GetDimensions(titleBarWidth, titleBarHeight);
442 float x = 100;
443 float y = 50 + titleBarHeight;
444 gFontBold.DrawString("please close plugin manager to continue", 48, x, y);
445 ofPopStyle();
446 return;
447 }
448
449 float displayMessageCooldown = 1 - ofClamp((gTime - mDisplayMessageTime) / 1000, 0, 1);
450 if (displayMessageCooldown > 0)
451 {
452 ofPushStyle();
453 ofSetColor(255, 255, 255, displayMessageCooldown * 255);
454 float titleBarWidth, titleBarHeight;
455 TheTitleBar->GetDimensions(titleBarWidth, titleBarHeight);
456 float x = 100;
457 float y = 40 + titleBarHeight;
458 gFontBold.DrawString(mDisplayMessage, 48, x, y);
459 ofPopStyle();
460 }
461
462 if (HiddenByZoom())
463 return;
464
465 if (sShowInitialHelpOverlay)
466 {
467 ofPushStyle();
468 ofSetColor(255, 255, 255);
469 std::string text = "click ? to view help and toggle tooltips";
470 float size = 26;
471 float titleBarWidth, titleBarHeight;
472 TheTitleBar->GetDimensions(titleBarWidth, titleBarHeight);
473 ofRectangle helpButtonRect = mDisplayHelpButton->GetRect(true);
474 float x = helpButtonRect.getCenter().x;
475 float y = helpButtonRect.getCenter().y + 15 + titleBarHeight;
476 gFontBold.DrawString(text, size, x - gFontBold.GetStringWidth(text, size) - 15 * GetOwningContainer()->GetDrawScale(), y);
477 ofSetLineWidth(2);
478 float scale = GetOwningContainer()->GetDrawScale();
479 ofLine(x - 10, y - 6 * scale, x, y - 6 * scale);
480 ofLine(x, y - 6 * scale, x, y - 18 * scale);
481 ofLine(x - 3 * scale, y - 15 * scale, x, y - 18 * scale);
482 ofLine(x + 3 * scale, y - 15 * scale, x, y - 18 * scale);
483 ofPopStyle();
484 }
485
486 //midicontroller
487 {
488 const float kDisplayMs = 500;
489 std::string displayString;
490
491 IUIControl* drawControl = nullptr;

Callers

nothing calls this directly

Calls 15

ofPushStyleFunction · 0.85
ofSetColorFunction · 0.85
ofPopStyleFunction · 0.85
ofClampFunction · 0.85
ofSetLineWidthFunction · 0.85
ofLineFunction · 0.85
ofFillFunction · 0.85
ofGetHeightFunction · 0.85
ofRectFunction · 0.85
DrawTextBoldFunction · 0.85
DrawStringMethod · 0.80
getCenterMethod · 0.80

Tested by

no test coverage detected