| 1845 | |
| 1846 | static void LoadLevelScreen_UploadCallback(const cc_string* path) { Map_LoadFrom(path); } |
| 1847 | static void LoadLevelScreen_ActionFunc(void* s, void* w) { |
| 1848 | static const char* const filters[] = { |
| 1849 | ".cw", ".dat", ".lvl", ".mine", ".fcm", ".mclevel", NULL |
| 1850 | }; /* TODO not hardcode list */ |
| 1851 | static struct OpenFileDialogArgs args = { |
| 1852 | "Classic map files", filters, |
| 1853 | LoadLevelScreen_UploadCallback, |
| 1854 | OFD_UPLOAD_DELETE, "tmp" |
| 1855 | }; |
| 1856 | |
| 1857 | cc_result res = Window_OpenFileDialog(&args); |
| 1858 | if (res) Logger_SimpleWarn(res, "showing open file dialog"); |
| 1859 | } |
| 1860 | |
| 1861 | void LoadLevelScreen_Show(void) { |
| 1862 | struct ListScreen* s = &ListScreen; |
nothing calls this directly
no test coverage detected