mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Load avatar browser dialog such that JavaScript EventBridge works
This commit is contained in:
parent
d0900ec75e
commit
552f276a06
2 changed files with 5 additions and 10 deletions
|
@ -40,13 +40,13 @@
|
||||||
|
|
||||||
if (keyboardRaised !== isKeyboardRaised || numericKeyboard !== isNumericKeyboard) {
|
if (keyboardRaised !== isKeyboardRaised || numericKeyboard !== isNumericKeyboard) {
|
||||||
|
|
||||||
if (typeof EventBridge !== "undefined") {
|
if (typeof EventBridge !== "undefined" && EventBridge !== null) {
|
||||||
EventBridge.emitWebEvent(
|
EventBridge.emitWebEvent(
|
||||||
keyboardRaised ? ("_RAISE_KEYBOARD" + (numericKeyboard ? "_NUMERIC" : "")) : "_LOWER_KEYBOARD"
|
keyboardRaised ? ("_RAISE_KEYBOARD" + (numericKeyboard ? "_NUMERIC" : "")) : "_LOWER_KEYBOARD"
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
if (numWarnings < MAX_WARNINGS) {
|
if (numWarnings < MAX_WARNINGS) {
|
||||||
console.log("WARNING: no global EventBridge object found");
|
console.log("WARNING: No global EventBridge object found");
|
||||||
numWarnings++;
|
numWarnings++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,11 +74,6 @@ Preference {
|
||||||
colorScheme: hifi.colorSchemes.dark
|
colorScheme: hifi.colorSchemes.dark
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
|
||||||
id: avatarBrowserBuilder;
|
|
||||||
AvatarBrowser { }
|
|
||||||
}
|
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
id: button
|
id: button
|
||||||
text: "Browse"
|
text: "Browse"
|
||||||
|
@ -87,12 +82,12 @@ Preference {
|
||||||
verticalCenter: dataTextField.verticalCenter
|
verticalCenter: dataTextField.verticalCenter
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.browser = avatarBrowserBuilder.createObject(desktop);
|
// Load dialog via OffscreenUi so that JavaScript EventBridge is available.
|
||||||
|
root.browser = OffscreenUi.load("dialogs/preferences/AvatarBrowser.qml");
|
||||||
root.browser.windowDestroyed.connect(function(){
|
root.browser.windowDestroyed.connect(function(){
|
||||||
root.browser = null;
|
root.browser = null;
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue