add file dropping support

This commit is contained in:
2023-10-18 14:23:27 +02:00
parent b9d4f594ce
commit 2a5937652e
3 changed files with 14 additions and 0 deletions

View File

@ -67,6 +67,12 @@ MainScreen::~MainScreen(void) {
}
bool MainScreen::handleEvent(SDL_Event& e) {
if (e.type == SDL_EVENT_DROP_FILE) {
std::cout << "DROP FILE: " << e.drop.file << "\n";
cg.sendFilePath(e.drop.file);
return true; // TODO: forward return succ from sendFilePath()
}
return false;
}