mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 08:48:53 +02:00
fiexed putting menu items on the hud when tablet not open when on desktop screen
This commit is contained in:
parent
8490379517
commit
9b3810814e
1 changed files with 6 additions and 6 deletions
|
@ -5793,12 +5793,12 @@ void Application::toggleRunningScriptsWidget() const {
|
||||||
|
|
||||||
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
||||||
auto tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system"));
|
auto tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system"));
|
||||||
|
auto hmd = DependencyManager::get<HMDScriptingInterface>();
|
||||||
if (tablet->getToolbarMode()) {
|
if (tablet->getToolbarMode()) {
|
||||||
static const QUrl url("hifi/dialogs/RunningScripts.qml");
|
static const QUrl url("hifi/dialogs/RunningScripts.qml");
|
||||||
DependencyManager::get<OffscreenUi>()->show(url, "RunningScripts");
|
DependencyManager::get<OffscreenUi>()->show(url, "RunningScripts");
|
||||||
} else {
|
} else {
|
||||||
QQuickItem* tabletRoot = tablet->getTabletRoot();
|
if (!hmd->getShouldShowTablet() && !isHMDMode()) {
|
||||||
if (!tabletRoot && !isHMDMode()) {
|
|
||||||
static const QUrl url("hifi/dialogs/RunningScripts.qml");
|
static const QUrl url("hifi/dialogs/RunningScripts.qml");
|
||||||
DependencyManager::get<OffscreenUi>()->show(url, "RunningScripts");
|
DependencyManager::get<OffscreenUi>()->show(url, "RunningScripts");
|
||||||
} else {
|
} else {
|
||||||
|
@ -5835,12 +5835,11 @@ void Application::showAssetServerWidget(QString filePath) {
|
||||||
};
|
};
|
||||||
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
||||||
auto tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system"));
|
auto tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system"));
|
||||||
|
auto hmd = DependencyManager::get<HMDScriptingInterface>();
|
||||||
if (tablet->getToolbarMode()) {
|
if (tablet->getToolbarMode()) {
|
||||||
DependencyManager::get<OffscreenUi>()->show(url, "AssetServer", startUpload);
|
DependencyManager::get<OffscreenUi>()->show(url, "AssetServer", startUpload);
|
||||||
} else {
|
} else {
|
||||||
QQuickItem* tabletRoot = tablet->getTabletRoot();
|
if (!hmd->getShouldShowTablet() && !isHMDMode()) {
|
||||||
if (!tabletRoot && !isHMDMode()) {
|
|
||||||
DependencyManager::get<OffscreenUi>()->show(url, "AssetServer", startUpload);
|
DependencyManager::get<OffscreenUi>()->show(url, "AssetServer", startUpload);
|
||||||
} else {
|
} else {
|
||||||
static const QUrl url("../../hifi/dialogs/TabletAssetServer.qml");
|
static const QUrl url("../../hifi/dialogs/TabletAssetServer.qml");
|
||||||
|
@ -5873,7 +5872,8 @@ void Application::addAssetToWorldFromURL(QString url) {
|
||||||
void Application::showDialog(const QString& desktopURL, const QString& tabletURL, const QString& name) const {
|
void Application::showDialog(const QString& desktopURL, const QString& tabletURL, const QString& name) const {
|
||||||
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
||||||
auto tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system"));
|
auto tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system"));
|
||||||
if (tablet->getToolbarMode() || (!tablet->getTabletRoot() && !isHMDMode())) {
|
auto hmd = DependencyManager::get<HMDScriptingInterface>();
|
||||||
|
if (tablet->getToolbarMode() || (!hmd->getShouldShowTablet() && !isHMDMode())) {
|
||||||
DependencyManager::get<OffscreenUi>()->show(desktopURL, name);
|
DependencyManager::get<OffscreenUi>()->show(desktopURL, name);
|
||||||
} else {
|
} else {
|
||||||
tablet->loadQMLSource(tabletURL);
|
tablet->loadQMLSource(tabletURL);
|
||||||
|
|
Loading…
Reference in a new issue