#######################################################################################################################* *---------------------------------------------------TexturePackScreen-----------------------------------------------------* *#########################################################################################################################*/
| 1575 | *---------------------------------------------------TexturePackScreen-----------------------------------------------------* |
| 1576 | *#########################################################################################################################*/ |
| 1577 | static 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 | |
| 1594 | static void TexturePackScreen_FilterFiles(const cc_string* path, void* obj, int isDirectory) { |
| 1595 | static const cc_string zip = String_FromConst(".zip"); |
nothing calls this directly
no test coverage detected