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

Function TexturePackScreen_EntryClick

src/Menus.c:1577–1592  ·  view source on GitHub ↗

#######################################################################################################################* *---------------------------------------------------TexturePackScreen-----------------------------------------------------* *#########################################################################################################################*/

Source from the content-addressed store, hash-verified

1575*---------------------------------------------------TexturePackScreen-----------------------------------------------------*
1576*#########################################################################################################################*/
1577static void TexturePackScreen_EntryClick(void* screen, void* widget) {
1578 struct ListScreen* s = (struct ListScreen*)screen;
1579 cc_string file = ListScreen_UNSAFE_GetCur(s, widget);
1580 cc_result res;
1581
1582 TexturePack_SetDefault(&file);
1583 TexturePack_Url.length = 0;
1584 res = TexturePack_ExtractCurrent(true);
1585
1586 CPE_SendNotifyAction(NOTIFY_ACTION_TEXTURE_PACK_CHANGED, 0);
1587
1588 /* FileNotFound error may be because user deleted .zips from disc */
1589 if (res != ReturnCode_FileNotFound) return;
1590 Chat_AddRaw("&eReloading texture pack list as it may be out of date");
1591 ListScreen_Reload(s);
1592}
1593
1594static void TexturePackScreen_FilterFiles(const cc_string* path, void* obj, int isDirectory) {
1595 static const cc_string zip = String_FromConst(".zip");

Callers

nothing calls this directly

Calls 6

ListScreen_UNSAFE_GetCurFunction · 0.85
TexturePack_SetDefaultFunction · 0.85
CPE_SendNotifyActionFunction · 0.85
Chat_AddRawFunction · 0.85
ListScreen_ReloadFunction · 0.85

Tested by

no test coverage detected