| 139 | } |
| 140 | |
| 141 | void BaseManager::makeScreenShot() |
| 142 | { |
| 143 | std::ifstream stream; |
| 144 | std::string file; |
| 145 | do |
| 146 | { |
| 147 | stream.close(); |
| 148 | static size_t num = 0; |
| 149 | const size_t max_shot = 100; |
| 150 | if (num == max_shot) |
| 151 | { |
| 152 | MYGUI_LOG(Info, "The limit of screenshots is exceeded : " << max_shot); |
| 153 | return; |
| 154 | } |
| 155 | file = MyGUI::utility::toString("screenshot_", ++num, ".png"); |
| 156 | stream.open(file.c_str()); |
| 157 | } while (stream.is_open()); |
| 158 | mWindow->writeContentsToFile(file); |
| 159 | } |
| 160 | |
| 161 | void BaseManager::setupResources() |
| 162 | { |