22 ImGui::ComboAutoSelectData data;
23 ImGui::ComboAutoSelectData pathData;
25 std::string mapToLoad;
27 std::vector<std::string> fileNames;
28 std::vector<std::string> pollingFileNames;
29 std::vector<std::string> pathsFileNames;
30 std::string pathLoading;
32 bool filesLoaded =
false;
35 bool startingNew =
false;
37 bool loadingPath =
false;
38 bool goingBack =
false;
40 void setPathLoading(
bool loading)
42 loadingPath = loading;
49 void setNewMap(
bool m_startingNew)
51 startingNew = m_startingNew;
54 void setLoading(
bool m_loading)
79 std::string getPathLoading() {
83 void SetGoingBack(
bool m_goingBack) {
84 goingBack = m_goingBack;
87 void updateFileNamesInAssets() {
89 const std::string path =
"assets/Maps";
90 for (
const auto& entry : fs::directory_iterator(path)) {
91 if (entry.is_regular_file()) {
92 fileNames.push_back(entry.path().filename().string());
97 void updatePollingFileNamesInAssets() {
98 pollingFileNames.clear();
99 const std::string path =
"assets/Maps/Polling";
100 for (
const auto& entry : fs::directory_iterator(path)) {
101 if (entry.is_regular_file()) {
102 pollingFileNames.push_back(entry.path().filename().string());
107 void updatePathFileNamesInAssets() {
108 pathsFileNames.clear();
109 const std::string path =
"assets/Paths";
110 for (
const auto& entry : fs::directory_iterator(path)) {
111 if (entry.is_regular_file()) {
112 pathsFileNames.push_back(entry.path().filename().string());
115 pathsFileNames.push_back(
">Reset");
118 void ReloadAccessibleFiles() {
120 updateFileNamesInAssets();
121 updatePollingFileNamesInAssets();
122 updatePathFileNamesInAssets();