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

Method DrawModule

Source/TimerDisplay.cpp:51–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51void TimerDisplay::DrawModule()
52{
53 if (Minimized() || IsVisible() == false)
54 return;
55
56 mResetButton->Draw();
57
58 int secs = (int)((gTime - mStartTime) / 1000);
59 int mins = secs / 60;
60 secs %= 60;
61
62 std::string zeroPadMins = "";
63 if (mins < 10)
64 zeroPadMins = "0";
65
66 std::string zeroPadSecs = "";
67 if (secs < 10)
68 zeroPadSecs = "0";
69
70 ofPushStyle();
71 ofSetColor(255, 255, 255);
72 gFont.DrawString(zeroPadMins + ofToString(mins) + ":" + zeroPadSecs + ofToString(secs), 52, 15, 36);
73 ofPopStyle();
74}

Callers

nothing calls this directly

Calls 6

ofPushStyleFunction · 0.85
ofSetColorFunction · 0.85
ofToStringFunction · 0.85
ofPopStyleFunction · 0.85
DrawStringMethod · 0.80
DrawMethod · 0.45

Tested by

no test coverage detected