summaryrefslogtreecommitdiff
path: root/src/testApp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/testApp.cpp')
-rwxr-xr-xsrc/testApp.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/testApp.cpp b/src/testApp.cpp
index bc2fe0e..c7bf35a 100755
--- a/src/testApp.cpp
+++ b/src/testApp.cpp
@@ -11,6 +11,9 @@ void previewWindow::draw(){
for (auto i:parent->viewports) i.draw(parent->brightSlider);
}
+void previewWindow::dragEvent(ofDragInfo dragInfo, ofxFenster* win){
+ parent->dragEvent(dragInfo);
+}
//--------------------------------------------------------------
guiWindow::~guiWindow(){
cout << "gui window destroyed" << endl;
@@ -24,6 +27,9 @@ void guiWindow::draw(){
parent->gui.draw();
}
+void guiWindow::dragEvent(ofDragInfo dragInfo, ofxFenster* win){
+ parent->dragEvent(dragInfo);
+}
//--------------------------------------------------------------
void testApp::create1port(bool & pressed){
if (!pressed) return;
@@ -220,6 +226,18 @@ void testApp::gotMessage(ofMessage msg){
}
//--------------------------------------------------------------
+void testApp::dragEvent(ofDragInfo dragInfo, ofxFenster* win){
+ dragEvent(dragInfo);
+}
+void testApp::dragEvent(ofDragInfo dragInfo){
+ printf("got draginfo: %s\n",dragInfo.files[0].c_str());
+ int sta=dragInfo.files[0].find_last_of("\\/")+1;
+ int len=(dragInfo.files[0].find_last_of(".")+4)-sta;
+ string filename=dragInfo.files[0].substr(sta,len);
+ printf("loading %s\n",filename.c_str());
+
+ if (filename.length()) control.loadpalette(filename);
+}
void testApp::mousePressedEvent(ofMouseEventArgs &args) {