diff options
| author | Tim Redfern <tim@eclectronics.org> | 2013-05-28 16:41:00 +0100 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2013-05-28 16:41:00 +0100 |
| commit | 4aa44a0b9159300c24db4786a3cf2e4198f168f1 (patch) | |
| tree | 7c37a2b0fcbdeb296d7e45b0f213c772bee2991c /src/testApp.cpp | |
| parent | 040eaa3babb648bea889f8c152b522a86e8c39d5 (diff) | |
adding palete manipulation
Diffstat (limited to 'src/testApp.cpp')
| -rwxr-xr-x | src/testApp.cpp | 18 |
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) { |
