History

Merge branch 'master' of https://github.com/highfidelity/hifi into orange

samcake committed 9 years ago

Commit ebc47452 parents df340a5 7b23699116 files · +1400 −4569Browse files

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

Unified · Split

interface/src/Application.cpp+51−76
@@ -150,11 +150,11 @@ · 149 unmodified lines
150#include "InterfaceLogging.h"150#include "InterfaceLogging.h"
151#include "LODManager.h"151#include "LODManager.h"
152#include "ModelPackager.h"152#include "ModelPackager.h"
153#include "scripting/Audio.h"
153#include "networking/CloseEventSender.h"154#include "networking/CloseEventSender.h"
154#include "scripting/TestScriptingInterface.h"155#include "scripting/TestScriptingInterface.h"
155#include "scripting/AccountScriptingInterface.h"156#include "scripting/AccountScriptingInterface.h"
156#include "scripting/AssetMappingsScriptingInterface.h"157#include "scripting/AssetMappingsScriptingInterface.h"
157#include "scripting/AudioDeviceScriptingInterface.h"
158#include "scripting/ClipboardScriptingInterface.h"158#include "scripting/ClipboardScriptingInterface.h"
159#include "scripting/DesktopScriptingInterface.h"159#include "scripting/DesktopScriptingInterface.h"
160#include "scripting/GlobalServicesScriptingInterface.h"160#include "scripting/GlobalServicesScriptingInterface.h"
@@ -251,6 +251,8 @@ static const QString MARKETPLACE_CDN_HOSTNAME = "mpassets.highfidelity.com"; · 90 unmodified lines
251static const int INTERVAL_TO_CHECK_HMD_WORN_STATUS = 500; // milliseconds251static const int INTERVAL_TO_CHECK_HMD_WORN_STATUS = 500; // milliseconds
252static const QString DESKTOP_DISPLAY_PLUGIN_NAME = "Desktop";252static const QString DESKTOP_DISPLAY_PLUGIN_NAME = "Desktop";
253 253
254static const QString SYSTEM_TABLET = "com.highfidelity.interface.tablet.system";
255
254const QHash<QString, Application::AcceptURLMethod> Application::_acceptedExtensions {256const QHash<QString, Application::AcceptURLMethod> Application::_acceptedExtensions {
255 { SVO_EXTENSION, &Application::importSVOFromURL },257 { SVO_EXTENSION, &Application::importSVOFromURL },
256 { SVO_JSON_EXTENSION, &Application::importSVOFromURL },258 { SVO_JSON_EXTENSION, &Application::importSVOFromURL },
@@ -711,9 +713,9 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 454 unmodified lines
711 recorder->recordFrame(AUDIO_FRAME_TYPE, audio);713 recorder->recordFrame(AUDIO_FRAME_TYPE, audio);
712 }714 }
713 });715 });
716 audioIO->startThread();
714 717
715 auto audioScriptingInterface = DependencyManager::set<AudioScriptingInterface>();718 auto audioScriptingInterface = DependencyManager::set<AudioScriptingInterface, scripting::Audio>();
716 connect(audioIO.data(), &AudioClient::muteToggled, this, &Application::audioMuteToggled);
717 connect(audioIO.data(), &AudioClient::mutedByMixer, audioScriptingInterface.data(), &AudioScriptingInterface::mutedByMixer);719 connect(audioIO.data(), &AudioClient::mutedByMixer, audioScriptingInterface.data(), &AudioScriptingInterface::mutedByMixer);
718 connect(audioIO.data(), &AudioClient::receivedFirstPacket, audioScriptingInterface.data(), &AudioScriptingInterface::receivedFirstPacket);720 connect(audioIO.data(), &AudioClient::receivedFirstPacket, audioScriptingInterface.data(), &AudioScriptingInterface::receivedFirstPacket);
719 connect(audioIO.data(), &AudioClient::disconnected, audioScriptingInterface.data(), &AudioScriptingInterface::disconnected);721 connect(audioIO.data(), &AudioClient::disconnected, audioScriptingInterface.data(), &AudioScriptingInterface::disconnected);
@@ -729,8 +731,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 9 unmodified lines
729 audioScriptingInterface->environmentMuted();731 audioScriptingInterface->environmentMuted();
730 }732 }
731 });733 });
732 734 connect(this, &Application::activeDisplayPluginChanged,
733 audioIO->startThread();735 reinterpret_cast<scripting::Audio*>(audioScriptingInterface.data()), &scripting::Audio::onContextChanged);
734 736
735 ResourceManager::init();737 ResourceManager::init();
736 // Make sure we don't time out during slow operations at startup738 // Make sure we don't time out during slow operations at startup
@@ -953,7 +955,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 216 unmodified lines
953 // Make sure we don't time out during slow operations at startup955 // Make sure we don't time out during slow operations at startup
954 updateHeartbeat();956 updateHeartbeat();
955 957
956 connect(this, SIGNAL(aboutToQuit()), this, SLOT(aboutToQuit()));958 connect(this, SIGNAL(aboutToQuit()), this, SLOT(onAboutToQuit()));
957 959
958 // hook up bandwidth estimator960 // hook up bandwidth estimator
959 QSharedPointer<BandwidthRecorder> bandwidthRecorder = DependencyManager::get<BandwidthRecorder>();961 QSharedPointer<BandwidthRecorder> bandwidthRecorder = DependencyManager::get<BandwidthRecorder>();
@@ -1447,7 +1449,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 487 unmodified lines
1447 });1449 });
1448 sendStatsTimer->start();1450 sendStatsTimer->start();
1449 1451
1450
1451 // Periodically check for count of nearby avatars1452 // Periodically check for count of nearby avatars
1452 static int lastCountOfNearbyAvatars = -1;1453 static int lastCountOfNearbyAvatars = -1;
1453 QTimer* checkNearbyAvatarsTimer = new QTimer(this);1454 QTimer* checkNearbyAvatarsTimer = new QTimer(this);
@@ -1605,12 +1606,12 @@ QString Application::getUserAgent() { · 151 unmodified lines
1605 return userAgent;1606 return userAgent;
1606}1607}
1607 1608
1608void Application::toggleTabletUI() const {1609void Application::toggleTabletUI(bool shouldOpen) const {
1609 auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();1610 auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
1610 auto hmd = DependencyManager::get<HMDScriptingInterface>();1611 auto hmd = DependencyManager::get<HMDScriptingInterface>();
1611 TabletProxy* tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system"));1612 TabletProxy* tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet(SYSTEM_TABLET));
1612 bool messageOpen = tablet->isMessageDialogOpen();1613 bool messageOpen = tablet->isMessageDialogOpen();
1613 if (!messageOpen || (messageOpen && !hmd->getShouldShowTablet())) {1614 if ((!messageOpen || (messageOpen && !hmd->getShouldShowTablet())) && !(shouldOpen && hmd->getShouldShowTablet())) {
1614 auto HMD = DependencyManager::get<HMDScriptingInterface>();1615 auto HMD = DependencyManager::get<HMDScriptingInterface>();
1615 HMD->toggleShouldShowTablet();1616 HMD->toggleShouldShowTablet();
1616 }1617 }
@@ -1642,7 +1643,7 @@ void Application::updateHeartbeat() const { · 25 unmodified lines
1642 static_cast<DeadlockWatchdogThread*>(_deadlockWatchdogThread)->updateHeartbeat();1643 static_cast<DeadlockWatchdogThread*>(_deadlockWatchdogThread)->updateHeartbeat();
1643}1644}
1644 1645
1645void Application::aboutToQuit() {1646void Application::onAboutToQuit() {
1646 emit beforeAboutToQuit();1647 emit beforeAboutToQuit();
1647 1648
1648 foreach(auto inputPlugin, PluginManager::getInstance()->getInputPlugins()) {1649 foreach(auto inputPlugin, PluginManager::getInstance()->getInputPlugins()) {
@@ -1721,6 +1722,10 @@ void Application::cleanupBeforeQuit() { · 72 unmodified lines
1721 1722
1722 // Cleanup all overlays after the scripts, as scripts might add more1723 // Cleanup all overlays after the scripts, as scripts might add more
1723 _overlays.cleanupAllOverlays();1724 _overlays.cleanupAllOverlays();
1725 // The cleanup process enqueues the transactions but does not process them. Calling this here will force the actual
1726 // removal of the items.
1727 // See https://highfidelity.fogbugz.com/f/cases/5328
1728 _main3DScene->processTransactionQueue();
1724 1729
1725 // first stop all timers directly or by invokeMethod1730 // first stop all timers directly or by invokeMethod
1726 // depending on what thread they run in1731 // depending on what thread they run in
@@ -1983,7 +1988,6 @@ void Application::initializeUi() { · 256 unmodified lines
1983 surfaceContext->setContextProperty("Stats", Stats::getInstance());1988 surfaceContext->setContextProperty("Stats", Stats::getInstance());
1984 surfaceContext->setContextProperty("Settings", SettingsScriptingInterface::getInstance());1989 surfaceContext->setContextProperty("Settings", SettingsScriptingInterface::getInstance());
1985 surfaceContext->setContextProperty("ScriptDiscoveryService", DependencyManager::get<ScriptEngines>().data());1990 surfaceContext->setContextProperty("ScriptDiscoveryService", DependencyManager::get<ScriptEngines>().data());
1986 surfaceContext->setContextProperty("AudioDevice", AudioDeviceScriptingInterface::getInstance());
1987 surfaceContext->setContextProperty("AvatarBookmarks", DependencyManager::get<AvatarBookmarks>().data());1991 surfaceContext->setContextProperty("AvatarBookmarks", DependencyManager::get<AvatarBookmarks>().data());
1988 surfaceContext->setContextProperty("LocationBookmarks", DependencyManager::get<LocationBookmarks>().data());1992 surfaceContext->setContextProperty("LocationBookmarks", DependencyManager::get<LocationBookmarks>().data());
1989 1993
@@ -2312,12 +2316,6 @@ void Application::runTests() { · 322 unmodified lines
2312 runUnitTests();2316 runUnitTests();
2313}2317}
2314 2318
2315void Application::audioMuteToggled() const {
2316 QAction* muteAction = Menu::getInstance()->getActionForOption(MenuOption::MuteAudio);
2317 Q_CHECK_PTR(muteAction);
2318 muteAction->setChecked(DependencyManager::get<AudioClient>()->isMuted());
2319}
2320
2321void Application::faceTrackerMuteToggled() {2319void Application::faceTrackerMuteToggled() {
2322 2320
2323 QAction* muteAction = Menu::getInstance()->getActionForOption(MenuOption::MuteFaceTracking);2321 QAction* muteAction = Menu::getInstance()->getActionForOption(MenuOption::MuteFaceTracking);
@@ -2387,7 +2385,7 @@ void Application::showHelp() { · 63 unmodified lines
2387 queryString.addQueryItem("handControllerName", handControllerName);2385 queryString.addQueryItem("handControllerName", handControllerName);
2388 queryString.addQueryItem("defaultTab", defaultTab);2386 queryString.addQueryItem("defaultTab", defaultTab);
2389 auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();2387 auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
2390 TabletProxy* tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system"));2388 TabletProxy* tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet(SYSTEM_TABLET));
2391 tablet->gotoWebScreen(INFO_HELP_PATH + "?" + queryString.toString());2389 tablet->gotoWebScreen(INFO_HELP_PATH + "?" + queryString.toString());
2392 //InfoView::show(INFO_HELP_PATH, false, queryString.toString());2390 //InfoView::show(INFO_HELP_PATH, false, queryString.toString());
2393}2391}
@@ -2843,7 +2841,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 449 unmodified lines
2843 if (isShifted && isMeta) {2841 if (isShifted && isMeta) {
2844 auto offscreenUi = DependencyManager::get<OffscreenUi>();2842 auto offscreenUi = DependencyManager::get<OffscreenUi>();
2845 offscreenUi->togglePinned();2843 offscreenUi->togglePinned();
2846 //offscreenUi->getRootContext()->engine()->clearComponentCache();2844 //offscreenUi->getSurfaceContext()->engine()->clearComponentCache();
2847 //OffscreenUi::information("Debugging", "Component cache cleared");2845 //OffscreenUi::information("Debugging", "Component cache cleared");
2848 // placeholder for dialogs being converted to QML.2846 // placeholder for dialogs being converted to QML.
2849 }2847 }
@@ -2884,6 +2882,12 @@ void Application::keyPressEvent(QKeyEvent* event) { · 34 unmodified lines
2884 Menu::getInstance()->triggerOption(MenuOption::DefaultSkybox);2882 Menu::getInstance()->triggerOption(MenuOption::DefaultSkybox);
2885 break;2883 break;
2886 2884
2885 case Qt::Key_M:
2886 if (isMeta) {
2887 DependencyManager::get<AudioClient>()->toggleMute();
2888 }
2889 break;
2890
2887 case Qt::Key_N:2891 case Qt::Key_N:
2888 if (!isOption && !isShifted && isMeta) {2892 if (!isOption && !isShifted && isMeta) {
2889 DependencyManager::get<NodeList>()->toggleIgnoreRadius();2893 DependencyManager::get<NodeList>()->toggleIgnoreRadius();
@@ -4468,10 +4472,11 @@ void Application::update(float deltaTime) { · 1578 unmodified lines
4468 } else {4472 } else {
4469 const quint64 MUTE_MICROPHONE_AFTER_USECS = 5000000; //5 secs4473 const quint64 MUTE_MICROPHONE_AFTER_USECS = 5000000; //5 secs
4470 Menu* menu = Menu::getInstance();4474 Menu* menu = Menu::getInstance();
4471 if (menu->isOptionChecked(MenuOption::AutoMuteAudio) && !menu->isOptionChecked(MenuOption::MuteAudio)) {4475 auto audioClient = DependencyManager::get<AudioClient>();
4476 if (menu->isOptionChecked(MenuOption::AutoMuteAudio) && !audioClient->isMuted()) {
4472 if (_lastFaceTrackerUpdate > 04477 if (_lastFaceTrackerUpdate > 0
4473 && ((usecTimestampNow() - _lastFaceTrackerUpdate) > MUTE_MICROPHONE_AFTER_USECS)) {4478 && ((usecTimestampNow() - _lastFaceTrackerUpdate) > MUTE_MICROPHONE_AFTER_USECS)) {
4474 menu->triggerOption(MenuOption::MuteAudio);4479 audioClient->toggleMute();
4475 _lastFaceTrackerUpdate = 0;4480 _lastFaceTrackerUpdate = 0;
4476 }4481 }
4477 } else {4482 } else {
@@ -5289,6 +5294,11 @@ void Application::nodeActivated(SharedNodePointer node) { · 811 unmodified lines
5289 5294
5290 if (node->getType() == NodeType::AvatarMixer) {5295 if (node->getType() == NodeType::AvatarMixer) {
5291 // new avatar mixer, send off our identity packet on next update loop5296 // new avatar mixer, send off our identity packet on next update loop
5297 // Reset skeletonModelUrl if the last server modified our choice.
5298 static const QUrl empty{};
5299 if (getMyAvatar()->getFullAvatarURLFromPreferences() != getMyAvatar()->cannonicalSkeletonModelURL(empty)) {
5300 getMyAvatar()->resetFullAvatarURL();
5301 }
5292 getMyAvatar()->markIdentityDataChanged();5302 getMyAvatar()->markIdentityDataChanged();
5293 getMyAvatar()->resetLastSent();5303 getMyAvatar()->resetLastSent();
5294 }5304 }
@@ -5509,7 +5519,6 @@ void Application::registerScriptEngineWithApplicationServices(ScriptEngine* scri · 214 unmodified lines
5509 scriptEngine->registerGlobalObject("Stats", Stats::getInstance());5519 scriptEngine->registerGlobalObject("Stats", Stats::getInstance());
5510 scriptEngine->registerGlobalObject("Settings", SettingsScriptingInterface::getInstance());5520 scriptEngine->registerGlobalObject("Settings", SettingsScriptingInterface::getInstance());
5511 scriptEngine->registerGlobalObject("Snapshot", DependencyManager::get<Snapshot>().data());5521 scriptEngine->registerGlobalObject("Snapshot", DependencyManager::get<Snapshot>().data());
5512 scriptEngine->registerGlobalObject("AudioDevice", AudioDeviceScriptingInterface::getInstance());
5513 scriptEngine->registerGlobalObject("AudioStats", DependencyManager::get<AudioClient>()->getStats().data());5522 scriptEngine->registerGlobalObject("AudioStats", DependencyManager::get<AudioClient>()->getStats().data());
5514 scriptEngine->registerGlobalObject("AudioScope", DependencyManager::get<AudioScope>().data());5523 scriptEngine->registerGlobalObject("AudioScope", DependencyManager::get<AudioScope>().data());
5515 scriptEngine->registerGlobalObject("AvatarBookmarks", DependencyManager::get<AvatarBookmarks>().data());5524 scriptEngine->registerGlobalObject("AvatarBookmarks", DependencyManager::get<AvatarBookmarks>().data());
@@ -5788,38 +5797,24 @@ bool Application::displayAvatarAttachmentConfirmationDialog(const QString& name) · 272 unmodified lines
5788 }5797 }
5789}5798}
5790 5799
5791void Application::toggleRunningScriptsWidget() const { 5800void Application::showDialog(const QUrl& widgetUrl, const QUrl& tabletUrl, const QString& name) const {
5792 auto scriptEngines = DependencyManager::get<ScriptEngines>();5801 auto tablet = DependencyManager::get<TabletScriptingInterface>()->getTablet(SYSTEM_TABLET);
5793 bool scriptsRunning = !scriptEngines->getRunningScripts().isEmpty();5802 auto hmd = DependencyManager::get<HMDScriptingInterface>();
5794 auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();5803 bool onTablet = false;
5795 auto tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system"));
5796 5804
5797 if (tablet->getToolbarMode() || false == scriptsRunning) {5805 if (!tablet->getToolbarMode()) {
5798 static const QUrl url("hifi/dialogs/RunningScripts.qml");5806 onTablet = tablet->pushOntoStack(tabletUrl);
5799 DependencyManager::get<OffscreenUi>()->show(url, "RunningScripts");5807 if (onTablet) {
5800 } else {5808 toggleTabletUI(true);
5801 auto hmd = DependencyManager::get<HMDScriptingInterface>();
5802 if (!hmd->getShouldShowTablet() && !isHMDMode()) {
5803 static const QUrl url("hifi/dialogs/RunningScripts.qml");
5804 DependencyManager::get<OffscreenUi>()->show(url, "RunningScripts");
5805 } else {
5806 static const QUrl url("../../hifi/dialogs/TabletRunningScripts.qml");
5807 tablet->pushOntoStack(url);
5808 }5809 }
5809 }5810 }
5810 //DependencyManager::get<OffscreenUi>()->show(url, "RunningScripts");5811
5811 //if (_runningScriptsWidget->isVisible()) {5812 if (!onTablet) {
5812 // if (_runningScriptsWidget->hasFocus()) {5813 DependencyManager::get<OffscreenUi>()->show(widgetUrl, name);
5813 // _runningScriptsWidget->hide();5814 }
5814 // } else {5815 if (tablet->getToolbarMode()) {
5815 // _runningScriptsWidget->raise();5816 DependencyManager::get<OffscreenUi>()->show(widgetUrl, name);
5816 // setActiveWindow(_runningScriptsWidget);5817 }
5817 // _runningScriptsWidget->setFocus();
5818 // }
5819 //} else {
5820 // _runningScriptsWidget->show();
5821 // _runningScriptsWidget->setFocus();
5822 //}
5823}5818}
5824 5819
5825void Application::showScriptLogs() {5820void Application::showScriptLogs() {
@@ -5841,7 +5836,7 @@ void Application::showAssetServerWidget(QString filePath) { · 15 unmodified lines
5841 }5836 }
5842 };5837 };
5843 auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();5838 auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
5844 auto tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system"));5839 auto tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet(SYSTEM_TABLET));
5845 auto hmd = DependencyManager::get<HMDScriptingInterface>();5840 auto hmd = DependencyManager::get<HMDScriptingInterface>();
5846 if (tablet->getToolbarMode()) {5841 if (tablet->getToolbarMode()) {
5847 DependencyManager::get<OffscreenUi>()->show(url, "AssetServer", startUpload);5842 DependencyManager::get<OffscreenUi>()->show(url, "AssetServer", startUpload);
@@ -5876,21 +5871,6 @@ void Application::addAssetToWorldFromURL(QString url) { · 28 unmodified lines
5876 request->send();5871 request->send();
5877}5872}
5878 5873
5879void Application::showDialog(const QString& desktopURL, const QString& tabletURL, const QString& name) const {
5880 auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
5881 auto tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system"));
5882 auto hmd = DependencyManager::get<HMDScriptingInterface>();
5883 if (tablet->getToolbarMode()) {
5884 DependencyManager::get<OffscreenUi>()->show(desktopURL, name);
5885 } else {
5886 tablet->pushOntoStack(tabletURL);
5887 if (!hmd->getShouldShowTablet() && !isHMDMode()) {
5888 hmd->openTablet();
5889 }
5890
5891 }
5892}
5893
5894void Application::addAssetToWorldFromURLRequestFinished() {5874void Application::addAssetToWorldFromURLRequestFinished() {
5895 auto request = qobject_cast<ResourceRequest*>(sender());5875 auto request = qobject_cast<ResourceRequest*>(sender());
5896 auto url = request->getUrl().toString();5876 auto url = request->getUrl().toString();
@@ -6374,7 +6354,7 @@ void Application::loadScriptURLDialog() const { · 477 unmodified lines
6374 6354
6375void Application::loadLODToolsDialog() {6355void Application::loadLODToolsDialog() {
6376 auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();6356 auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
6377 auto tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system"));6357 auto tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet(SYSTEM_TABLET));
6378 if (tablet->getToolbarMode() || (!tablet->getTabletRoot() && !isHMDMode())) {6358 if (tablet->getToolbarMode() || (!tablet->getTabletRoot() && !isHMDMode())) {
6379 auto dialogsManager = DependencyManager::get<DialogsManager>();6359 auto dialogsManager = DependencyManager::get<DialogsManager>();
6380 dialogsManager->lodTools();6360 dialogsManager->lodTools();
@@ -6386,7 +6366,7 @@ void Application::loadLODToolsDialog() { · 5 unmodified lines
6386 6366
6387void Application::loadEntityStatisticsDialog() {6367void Application::loadEntityStatisticsDialog() {
6388 auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();6368 auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
6389 auto tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system"));6369 auto tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet(SYSTEM_TABLET));
6390 if (tablet->getToolbarMode() || (!tablet->getTabletRoot() && !isHMDMode())) {6370 if (tablet->getToolbarMode() || (!tablet->getTabletRoot() && !isHMDMode())) {
6391 auto dialogsManager = DependencyManager::get<DialogsManager>();6371 auto dialogsManager = DependencyManager::get<DialogsManager>();
6392 dialogsManager->octreeStatsDetails();6372 dialogsManager->octreeStatsDetails();
@@ -6397,7 +6377,7 @@ void Application::loadEntityStatisticsDialog() { · 4 unmodified lines
6397 6377
6398void Application::loadDomainConnectionDialog() {6378void Application::loadDomainConnectionDialog() {
6399 auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();6379 auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
6400 auto tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system"));6380 auto tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet(SYSTEM_TABLET));
6401 if (tablet->getToolbarMode() || (!tablet->getTabletRoot() && !isHMDMode())) {6381 if (tablet->getToolbarMode() || (!tablet->getTabletRoot() && !isHMDMode())) {
6402 auto dialogsManager = DependencyManager::get<DialogsManager>();6382 auto dialogsManager = DependencyManager::get<DialogsManager>();
6403 dialogsManager->showDomainConnectionDialog();6383 dialogsManager->showDomainConnectionDialog();
@@ -7054,11 +7034,6 @@ void Application::updateSystemTabletMode() { · 650 unmodified lines
7054 }7034 }
7055}7035}
7056 7036
7057void Application::toggleMuteAudio() {
7058 auto menu = Menu::getInstance();
7059 menu->setIsOptionChecked(MenuOption::MuteAudio, !menu->isOptionChecked(MenuOption::MuteAudio));
7060}
7061
7062OverlayID Application::getTabletScreenID() const {7037OverlayID Application::getTabletScreenID() const {
7063 auto HMD = DependencyManager::get<HMDScriptingInterface>();7038 auto HMD = DependencyManager::get<HMDScriptingInterface>();
7064 return HMD->getCurrentTabletScreenID();7039 return HMD->getCurrentTabletScreenID();

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t