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
2281 } else if (isOption && !isShifted && !isMeta) {2281 } else if (isOption && !isShifted && !isMeta) {
2282 Menu::getInstance()->triggerOption(MenuOption::ScriptEditor);2282 Menu::getInstance()->triggerOption(MenuOption::ScriptEditor);
2283 } else if (!isOption && !isShifted && isMeta) {2283 } else if (!isOption && !isShifted && isMeta) {
2284 takeSnapshot();2284 takeSnapshot(true);
2285 }2285 }
2286 break;2286 break;
2287 2287
@@ -5070,7 +5070,7 @@ void Application::toggleLogDialog() { · 2782 unmodified lines
5070 }5070 }
5071}5071}
5072 5072
5073void Application::takeSnapshot() {5073void Application::takeSnapshot(bool notify) {
5074 QMediaPlayer* player = new QMediaPlayer();5074 QMediaPlayer* player = new QMediaPlayer();
5075 QFileInfo inf = QFileInfo(PathUtils::resourcesPath() + "sounds/snap.wav");5075 QFileInfo inf = QFileInfo(PathUtils::resourcesPath() + "sounds/snap.wav");
5076 player->setMedia(QUrl::fromLocalFile(inf.absoluteFilePath()));5076 player->setMedia(QUrl::fromLocalFile(inf.absoluteFilePath()));
@@ -5078,7 +5078,7 @@ void Application::takeSnapshot() { · 1 unmodified line
5078 5078
5079 QString path = Snapshot::saveSnapshot(getActiveDisplayPlugin()->getScreenshot());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
5084float Application::getRenderResolutionScale() const {5084float Application::getRenderResolutionScale() const {