| 526 | } |
| 527 | |
| 528 | void CodeEntry::DrawSyntaxHighlight(std::string input, ofColor color, std::vector<int> mapping, int filter1, int filter2) |
| 529 | { |
| 530 | std::string filtered = FilterText(input, mapping, filter1, filter2); |
| 531 | ofSetColor(color, gModuleDrawAlpha); |
| 532 | |
| 533 | float shake = (1 - ofClamp((gTime - mLastPublishTime) / 150, 0, 1)) * 3.0f; |
| 534 | if (TheSynth->IsAudioPaused()) |
| 535 | shake = 0; |
| 536 | float offsetX = ofRandom(-shake, shake); |
| 537 | float offsetY = ofRandom(-shake, shake); |
| 538 | |
| 539 | gFontFixedWidth.DrawString(filtered, mFontSize, mX + 2 - mScroll.x + offsetX, mY + mCharHeight - mScroll.y + offsetY); |
| 540 | } |
| 541 | |
| 542 | std::string CodeEntry::FilterText(std::string input, std::vector<int> mapping, int filter1, int filter2) |
| 543 | { |
nothing calls this directly
no test coverage detected