mirror of
https://github.com/overte-org/overte.git
synced 2025-08-17 04:55:04 +02:00
Merge pull request #9954 from vladest/tablet-ui-reopen-running-scripts
Make runningscripts able to open even if there is no scripts running
This commit is contained in:
commit
78f9655eb1
1 changed files with 6 additions and 4 deletions
|
@ -5821,15 +5821,17 @@ bool Application::displayAvatarAttachmentConfirmationDialog(const QString& name)
|
|||
}
|
||||
}
|
||||
|
||||
void Application::toggleRunningScriptsWidget() const {
|
||||
|
||||
void Application::toggleRunningScriptsWidget() const {
|
||||
auto scriptEngines = DependencyManager::get<ScriptEngines>();
|
||||
bool scriptsRunning = !scriptEngines->getRunningScripts().isEmpty();
|
||||
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
||||
auto tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system"));
|
||||
auto hmd = DependencyManager::get<HMDScriptingInterface>();
|
||||
if (tablet->getToolbarMode()) {
|
||||
|
||||
if (tablet->getToolbarMode() || false == scriptsRunning) {
|
||||
static const QUrl url("hifi/dialogs/RunningScripts.qml");
|
||||
DependencyManager::get<OffscreenUi>()->show(url, "RunningScripts");
|
||||
} else {
|
||||
auto hmd = DependencyManager::get<HMDScriptingInterface>();
|
||||
if (!hmd->getShouldShowTablet() && !isHMDMode()) {
|
||||
static const QUrl url("hifi/dialogs/RunningScripts.qml");
|
||||
DependencyManager::get<OffscreenUi>()->show(url, "RunningScripts");
|
||||
|
|
Loading…
Reference in a new issue