Edit tool works with events
This commit is contained in:
parent
32b84d0813
commit
783f645699
10 changed files with 187 additions and 98 deletions
|
|
@ -60,11 +60,7 @@ bool ImageEditTool::edit_gui(CanvasComponentContainer::ObjInfo* comp) {
|
|||
);
|
||||
#endif
|
||||
t.open_file_selector("Download File", {{"Any File", "*"}}, [resourceData](const std::filesystem::path& p, const auto& e) {
|
||||
std::ofstream f(p, std::ios::binary);
|
||||
if(f.is_open()) {
|
||||
f << *resourceData->data;
|
||||
f.close();
|
||||
}
|
||||
SDL_SaveFile(p.c_str(), resourceData->data->c_str(), resourceData->data->size());
|
||||
}, resourceData->name, true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue