#pragma once #include #include #include #include #include #include #include typedef struct { std::string id; std::string name; std::vector details; } SelectableElement; typedef struct { FILE* fd; u64 fileSize; } RemoteFile; void uiInit(); void uiCleanup(); bool uiSelect(SelectableElement* selected, std::vector elements, std::function &currElements, SelectableElement currElement, bool &elementsDirty, bool &resetCursorIfDirty)> onLoop, std::function onSelect, bool useTopScreen = true, bool alphabetize = true, bool dpadPageScroll = true); bool uiSelectFile(std::string* selectedFile, const std::string rootDirectory, std::vector extensions, std::function onLoop, std::function onSelect, bool useTopScreen = true, bool dpadPageScroll = true); bool uiSelectApp(ctr::app::App* selectedApp, ctr::fs::MediaType mediaType, std::function onLoop, std::function onSelect, bool useTopScreen = true, bool dpadPageScroll = true); void uiDisplayMessage(ctr::gpu::Screen screen, const std::string message); bool uiPrompt(ctr::gpu::Screen screen, const std::string message, bool question); void uiDisplayProgress(ctr::gpu::Screen screen, const std::string operation, const std::string details, bool quickSwap, u32 progress); RemoteFile uiAcceptRemoteFile(ctr::gpu::Screen screen, std::function onWait = [&](std::stringstream& infoStream){});