MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / LoadLevelScreen_ActionFunc

Function LoadLevelScreen_ActionFunc

src/Menus.c:1847–1859  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1845
1846static void LoadLevelScreen_UploadCallback(const cc_string* path) { Map_LoadFrom(path); }
1847static 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
1861void LoadLevelScreen_Show(void) {
1862 struct ListScreen* s = &ListScreen;

Callers

nothing calls this directly

Calls 2

Logger_SimpleWarnFunction · 0.85
Window_OpenFileDialogFunction · 0.70

Tested by

no test coverage detected