Permalink
Browse files

wrapped draw with push/pop style

  • Loading branch information...
1 parent a582538 commit 0469a759c8d4f45571b14a5333cd8abc338a4191 @kylemcdonald committed Aug 10, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/ofxAutoControlPanel.h
@@ -56,6 +56,7 @@ class ofxAutoControlPanel : public ofxControlPanel {
}
void draw(ofEventArgs& event) {
if(!hidden) {
+ ofPushStyle();
ofPushMatrix();
ofTranslate(.5, .5);
ofxControlPanel::draw();
@@ -69,11 +70,12 @@ class ofxAutoControlPanel : public ofxControlPanel {
ofDrawBitmapString(msg, 10, ofGetHeight() - 10);
}
- glColor4f(1, 1, 1, 1);
+ ofSetColor(255);
ofFill();
ofRect(ofGetWidth() - 45, ofGetHeight() - 25, 40, 20);
- glColor4f(0, 0, 0, 1);
+ ofSetColor(0);
ofDrawBitmapString(ofToString((int) ofGetFrameRate()), ofGetWidth() - 40, ofGetHeight() - 10);
+ ofPopStyle();
}
}
using ofxControlPanel::hasValueChanged;

0 comments on commit 0469a75

Please sign in to comment.