| 107 | } |
| 108 | |
| 109 | void Open(vector2i_t pos) final { |
| 110 | for(auto& p : path){ |
| 111 | char* execPath = new char[p.length() + strlen(args[0])]; |
| 112 | strcpy(execPath, p.c_str()); |
| 113 | strcat(execPath, args[0]); |
| 114 | |
| 115 | struct stat st; |
| 116 | int ret = stat(execPath, &st); |
| 117 | if(!ret){ |
| 118 | lemon_spawn(execPath, args.size(), args.data()); |
| 119 | |
| 120 | showMenu = false; |
| 121 | menuWindow->Minimize(); |
| 122 | } |
| 123 | |
| 124 | delete[] execPath; |
| 125 | } |
| 126 | } |
| 127 | }; |
| 128 | |
| 129 | std::map<uint16_t, MenuItem> items; |