| 489 | } |
| 490 | |
| 491 | void ScriptModule::DrawTimer(int lineNum, double startTime, double endTime, ofColor color, bool filled) |
| 492 | { |
| 493 | ofVec2f linePos = mCodeEntry->GetLinePos(lineNum, false); |
| 494 | linePos.x += 11; |
| 495 | linePos.y += 10; |
| 496 | float t = (gTime - startTime) / (endTime - startTime); |
| 497 | if (t > 0 && t < 1) |
| 498 | { |
| 499 | const float kRadius = 5; |
| 500 | ofPushStyle(); |
| 501 | if (filled) |
| 502 | ofSetColor(color); |
| 503 | else |
| 504 | ofSetColor(color * .5f); |
| 505 | ofNoFill(); |
| 506 | ofCircle(linePos.x, linePos.y, kRadius); |
| 507 | if (filled) |
| 508 | ofFill(); |
| 509 | ofCircle(linePos.x + sin(t * TWO_PI) * kRadius, linePos.y - cos(t * TWO_PI) * kRadius, 2); |
| 510 | ofPopStyle(); |
| 511 | } |
| 512 | } |
| 513 | |
| 514 | void ScriptModule::Poll() |
| 515 | { |
nothing calls this directly
no test coverage detected