History

Snapshot button plus script

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.

David Kelly committed 10 years ago

Commit 1d7cdff1 parent 17a5fa07 files · +196 −11Browse files

Showing the changes to interface/src/Application.cpp (1 of 7 files). Show all

Unified · Split

interface/src/Application.cpp+3−3
@@ -2281,7 +2281,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 2280 unmodified lines
22812281 } else if (isOption && !isShifted && !isMeta) {
22822282 Menu::getInstance()->triggerOption(MenuOption::ScriptEditor);
22832283 } else if (!isOption && !isShifted && isMeta) {
2284− takeSnapshot();
2284+ takeSnapshot(true);
22852285 }
22862286 break;
22872287
@@ -5070,7 +5070,7 @@ void Application::toggleLogDialog() { · 2782 unmodified lines
50705070 }
50715071 }
50725072
5073−void Application::takeSnapshot() {
5073+void Application::takeSnapshot(bool notify) {
50745074 QMediaPlayer* player = new QMediaPlayer();
50755075 QFileInfo inf = QFileInfo(PathUtils::resourcesPath() + "sounds/snap.wav");
50765076 player->setMedia(QUrl::fromLocalFile(inf.absoluteFilePath()));
@@ -5078,7 +5078,7 @@ void Application::takeSnapshot() { · 1 unmodified line
50785078
50795079 QString path = Snapshot::saveSnapshot(getActiveDisplayPlugin()->getScreenshot());
50805080
5081− emit DependencyManager::get<WindowScriptingInterface>()->snapshotTaken(path);
5081+ emit DependencyManager::get<WindowScriptingInterface>()->snapshotTaken(path, notify);
50825082 }
50835083
50845084 float Application::getRenderResolutionScale() const {