Minor change to allow snapshots to not notify (though the old way with CTRL+S still does). Added button to do it, saves them to disk. The plan is for us to add UI to share (or not) the snapshot. That's why we are not going through the notifications. Also, the script makes sure to hide/unhide hud and overlays. Next we will upload the pick to AWS via data-web (if you are logged in), and _then_ make the share UI.
Showing the changes to interface/src/Application.cpp (1 of 7 files). Show all
Unified · Split
| @@ -2281,7 +2281,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 2280 unmodified lines | ||
| 2281 | 2281 | } else if (isOption && !isShifted && !isMeta) { |
| 2282 | 2282 | Menu::getInstance()->triggerOption(MenuOption::ScriptEditor); |
| 2283 | 2283 | } else if (!isOption && !isShifted && isMeta) { |
| 2284 | − takeSnapshot(); | |
| 2284 | + takeSnapshot(true); | |
| 2285 | 2285 | } |
| 2286 | 2286 | break; |
| 2287 | 2287 | |
| @@ -5070,7 +5070,7 @@ void Application::toggleLogDialog() { · 2782 unmodified lines | ||
| 5070 | 5070 | } |
| 5071 | 5071 | } |
| 5072 | 5072 | |
| 5073 | −void Application::takeSnapshot() { | |
| 5073 | +void Application::takeSnapshot(bool notify) { | |
| 5074 | 5074 | QMediaPlayer* player = new QMediaPlayer(); |
| 5075 | 5075 | QFileInfo inf = QFileInfo(PathUtils::resourcesPath() + "sounds/snap.wav"); |
| 5076 | 5076 | player->setMedia(QUrl::fromLocalFile(inf.absoluteFilePath())); |
| @@ -5078,7 +5078,7 @@ void Application::takeSnapshot() { · 1 unmodified line | ||
| 5078 | 5078 | |
| 5079 | 5079 | QString path = Snapshot::saveSnapshot(getActiveDisplayPlugin()->getScreenshot()); |
| 5080 | 5080 | |
| 5081 | − emit DependencyManager::get<WindowScriptingInterface>()->snapshotTaken(path); | |
| 5081 | + emit DependencyManager::get<WindowScriptingInterface>()->snapshotTaken(path, notify); | |
| 5082 | 5082 | } |
| 5083 | 5083 | |
| 5084 | 5084 | float Application::getRenderResolutionScale() const { |