select layout via context menu v 1.2.9
| 58 | |
| 59 | // select layout via context menu v 1.2.9 |
| 60 | vector<string> ListLayouts() { |
| 61 | vector<string> layouts; |
| 62 | string path = "meta\\profiles"; |
| 63 | if (!fs::exists(path)) return layouts; |
| 64 | |
| 65 | for (auto& entry : fs::directory_iterator(path)) { |
| 66 | if (entry.is_regular_file()) { |
| 67 | auto ext = entry.path().extension().string(); |
| 68 | if (ext == ".cfg") { |
| 69 | layouts.push_back(entry.path().stem().string()); // ignore file extension |
| 70 | } |
| 71 | } |
| 72 | } |
| 73 | return layouts; |
| 74 | } |
| 75 | |
| 76 | // apply layout (replace config.cfg content) v 1.2.9 |
| 77 | void ApplyLayout(const string& layoutName) { |