diff options
| author | Tim Redfern <redfernt@gmail.com> | 2023-08-18 17:02:19 +0100 |
|---|---|---|
| committer | Tim Redfern <redfernt@gmail.com> | 2023-08-18 17:02:19 +0100 |
| commit | 4d2fda8f0807957b9fbcf77656aa361c5954db9f (patch) | |
| tree | 1e8e16b7a4eeaef5be738eac446db671c200f17e /lasertext/src/ofApp.cpp | |
| parent | 02aa1fbd6e4caf284917c4dcb0be9f3ee6eef776 (diff) | |
override works
Diffstat (limited to 'lasertext/src/ofApp.cpp')
| -rw-r--r-- | lasertext/src/ofApp.cpp | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/lasertext/src/ofApp.cpp b/lasertext/src/ofApp.cpp index e58e361..b0442bb 100644 --- a/lasertext/src/ofApp.cpp +++ b/lasertext/src/ofApp.cpp @@ -28,6 +28,7 @@ void ofApp::setup(){ //banner.init("Everything Is Going To Be Alright"); banner.init("No Pleasure is Too Guilty"); + override_banner.loadFont("fonts/EMSQwandry.svg"); stars1.init("stars 1",990,10); stars2.init("stars 2",990,205); @@ -161,6 +162,7 @@ void ofApp::save_settings(){ //-------------------------------------------------------------- void ofApp::update(){ banner.update(text_speed,true); + override_banner.update(text_speed,true); laser.set_pts(laser_points); laser.set_subdivide(laser_subdivide); @@ -204,7 +206,14 @@ void ofApp::draw(){ ofMatrix4x4 warp =lineTransformer::getPerspectiveTransformMatrix(src,warpframe); - vector<colourPolyline> shapes = banner.getOutlines(0.08f); //*text_scale); //+(0.02f*sin(ofGetElapsedTimef()*.1f))); + vector<colourPolyline> shapes; + + if (override_banner.firstPass()){ + shapes = override_banner.getOutlines(0.08f); //*text_scale); //+(0.02f*sin(ofGetElapsedTimef()*.1f))); + } + else { + shapes = banner.getOutlines(0.08f); //*text_scale); //+(0.02f*sin(ofGetElapsedTimef()*.1f))); + } ofMatrix4x4 rm = ofMatrix4x4::newIdentityMatrix(); rm.translate(laser_pos_x,laser_pos_y,0); @@ -278,7 +287,7 @@ void ofApp::keyPressed(ofKeyEventArgs &args){ //-------------------------------------------------------------- void ofApp::keyReleased(int key){ - +/* if (key>=' '&&key<='~'){ banner.addGlyph(key); } @@ -286,7 +295,7 @@ void ofApp::keyReleased(int key){ banner.removeGlyph(); } ofLog()<<banner.length()<<" "<<key<<" "<<banner.text(); - +*/ switch(key){ case OF_KEY_UP:{ currentFont=(currentFont+1)%fonts.size(); @@ -299,9 +308,11 @@ void ofApp::keyReleased(int key){ banner.loadFont(fonts.getPath(currentFont)); break; } - } - - switch(key){ + case '1':{ + ofLog()<<"sending test phrase 1"; + override_banner.init("This is my new phrase"); + break; + } case 's':{ save_settings(); break; |
