MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / GetUserPickedReadPath

Function GetUserPickedReadPath

Source/Scripting/angelscript/asfuncs.cpp:4813–4826  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4811}
4812
4813std::string GetUserPickedReadPath(const std::string& suffix, const std::string& default_path) {
4814 Input::Instance()->ignore_mouse_frame = true;
4815 const int BUF_SIZE = 512;
4816 char buffer[BUF_SIZE];
4817 Dialog::DialogErr err = Dialog::readFile(suffix.c_str(), 1, default_path.c_str(), buffer, BUF_SIZE);
4818
4819 if (err != Dialog::NO_ERR) {
4820 LOGE << Dialog::DialogErrString(err) << std::endl;
4821 return std::string("");
4822 } else {
4823 std::string shortened = FindShortestPath(std::string(buffer));
4824 return shortened;
4825 }
4826}
4827
4828std::string AS_FindShortestPath(const std::string& path) {
4829 return FindShortestPath2(path).GetOriginalPathStr();

Callers

nothing calls this directly

Calls 4

readFileFunction · 0.85
DialogErrStringFunction · 0.85
FindShortestPathFunction · 0.85
c_strMethod · 0.45

Tested by

no test coverage detected