diff options
| author | Tim Redfern <tim@eclectronics.org> | 2014-05-06 00:00:49 +0100 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2014-05-06 00:00:49 +0100 |
| commit | 1abce0ba490896ef94cb6043dddeaf183ecab356 (patch) | |
| tree | 56a7d0a2f8a226330970b4548e1173a46be810b8 /le_new | |
| parent | 9e42612c49059cf014e621e79c28041683430706 (diff) | |
mouse event received from preview window
Diffstat (limited to 'le_new')
| -rw-r--r-- | le_new/src/ofApp.cpp | 7 | ||||
| -rw-r--r-- | le_new/src/ofApp.h | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/le_new/src/ofApp.cpp b/le_new/src/ofApp.cpp index f12380e..d9488ec 100644 --- a/le_new/src/ofApp.cpp +++ b/le_new/src/ofApp.cpp @@ -74,7 +74,7 @@ void previewWindow::setup(){ setWindowShape(600,800); setWindowPosition(260, 0); setWindowTitle("PREVIEW"); - ofRegisterMouseEvents(this); + ofAddListener(onMouseMoved, this, &previewWindow::mousemoved); } void previewWindow::setParent(ofApp *p){ parent=p; @@ -87,6 +87,11 @@ void previewWindow::draw(){ rb->draw(0,0,getWidth(),getHeight()); //why crash? } +void previewWindow::mousemoved(ofMouseEventArgs &arg){ + + printf("moved\n"); + +} //-------------------------------------------------------------- outputWindow::~outputWindow(){ diff --git a/le_new/src/ofApp.h b/le_new/src/ofApp.h index 99cfbdf..8a33b96 100644 --- a/le_new/src/ofApp.h +++ b/le_new/src/ofApp.h @@ -1,6 +1,7 @@ #pragma once #include "ofMain.h" +#include "ofEvents.h" #include "ofxXmlSettings.h" #include "ofxFensterManager.h" @@ -126,6 +127,8 @@ public: void setup(); void setBuffer(ofFbo *buffer); void draw(); + void mousemoved(ofMouseEventArgs &arg); + }; class outputWindow: public ofxFenster{ |
