mirror of
https://github.com/JulianGro/overte.git
synced 2025-08-04 15:49:44 +02:00
The tablet UI can be long lived, unlike the previous VRMenu. So instead of using a dynamic mapping that was only enabled when the VRMenu was shown, standard_navigation.json. standard_navigation is always active. Also, standard_navigation.json has been changed. Left and Right click and stick events never become UINav events. Only Dpad A, B, X, Y, LB and RB are mapped to UINav events.
54 lines
1.3 KiB
QML
54 lines
1.3 KiB
QML
import QtQuick 2.0
|
|
import Hifi 1.0
|
|
|
|
Item {
|
|
id: tabletRoot
|
|
objectName: "tabletRoot"
|
|
property var eventBridge;
|
|
|
|
signal showDesktop();
|
|
|
|
function loadSource(url) {
|
|
loader.source = url;
|
|
}
|
|
|
|
function loadWebUrl(url, injectedJavaScriptUrl) {
|
|
loader.item.url = url;
|
|
loader.item.scriptURL = injectedJavaScriptUrl;
|
|
}
|
|
|
|
SoundEffect {
|
|
id: buttonClickSound
|
|
source: "../../../sounds/Gamemaster-Audio-button-click.wav"
|
|
}
|
|
|
|
function playButtonClickSound() {
|
|
buttonClickSound.play(globalPosition);
|
|
}
|
|
|
|
Loader {
|
|
id: loader
|
|
objectName: "loader"
|
|
asynchronous: false
|
|
|
|
width: parent.width
|
|
height: parent.height
|
|
|
|
onLoaded: {
|
|
if (loader.item.hasOwnProperty("eventBridge")) {
|
|
loader.item.eventBridge = eventBridge;
|
|
|
|
// Hook up callback for clara.io download from the marketplace.
|
|
eventBridge.webEventReceived.connect(function (event) {
|
|
if (event.slice(0, 17) === "CLARA.IO DOWNLOAD") {
|
|
ApplicationInterface.addAssetToWorldFromURL(event.slice(18));
|
|
}
|
|
});
|
|
}
|
|
loader.item.forceActiveFocus();
|
|
}
|
|
}
|
|
|
|
width: 480
|
|
height: 720
|
|
}
|