mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 03:48:38 +02:00
Show username when admin (this probably isn't the way to get username
This commit is contained in:
parent
df58065e75
commit
1e608b13b2
8 changed files with 169 additions and 42 deletions
|
@ -736,6 +736,7 @@ Rectangle {
|
||||||
sendMoney.updateConnections(message.connections);
|
sendMoney.updateConnections(message.connections);
|
||||||
break;
|
break;
|
||||||
case 'selectRecipient':
|
case 'selectRecipient':
|
||||||
|
case 'updateSelectedRecipientUsername':
|
||||||
sendMoney.fromScript(message);
|
sendMoney.fromScript(message);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -114,7 +114,7 @@ Item {
|
||||||
width: 110;
|
width: 110;
|
||||||
text: "CHOOSE";
|
text: "CHOOSE";
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var msg = { method: 'chooseConnection', userName: root.userName };
|
var msg = { method: 'chooseConnection', userName: root.userName, profilePicUrl: root.profilePicUrl };
|
||||||
sendToSendMoney(msg);
|
sendToSendMoney(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
import Hifi 1.0 as Hifi
|
import Hifi 1.0 as Hifi
|
||||||
import QtQuick 2.6
|
import QtQuick 2.6
|
||||||
import QtQuick.Controls 2.2
|
import QtQuick.Controls 2.2
|
||||||
|
import QtGraphicalEffects 1.0
|
||||||
import "../../../../styles-uit"
|
import "../../../../styles-uit"
|
||||||
import "../../../../controls-uit" as HifiControlsUit
|
import "../../../../controls-uit" as HifiControlsUit
|
||||||
import "../../../../controls" as HifiControls
|
import "../../../../controls" as HifiControls
|
||||||
|
@ -440,6 +441,7 @@ Item {
|
||||||
sendMoneyStep.selectedRecipientNodeID = '';
|
sendMoneyStep.selectedRecipientNodeID = '';
|
||||||
sendMoneyStep.selectedRecipientDisplayName = msg.userName;
|
sendMoneyStep.selectedRecipientDisplayName = msg.userName;
|
||||||
sendMoneyStep.selectedRecipientUserName = 'connection';
|
sendMoneyStep.selectedRecipientUserName = 'connection';
|
||||||
|
sendMoneyStep.selectedRecipientProfilePic = msg.profilePicUrl;
|
||||||
|
|
||||||
root.nextActiveView = "sendMoneyStep";
|
root.nextActiveView = "sendMoneyStep";
|
||||||
}
|
}
|
||||||
|
@ -561,8 +563,8 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
RalewaySemiBold {
|
RalewaySemiBold {
|
||||||
id: avatarNodeID;
|
id: avatarDisplayName;
|
||||||
text: chooseRecipientNearby.selectedRecipient;
|
text: '"' + AvatarList.getAvatar(chooseRecipientNearby.selectedRecipient).sessionDisplayName + '"';
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors.top: sendToText.bottom;
|
anchors.top: sendToText.bottom;
|
||||||
anchors.topMargin: 60;
|
anchors.topMargin: 60;
|
||||||
|
@ -572,7 +574,43 @@ Item {
|
||||||
anchors.rightMargin: 30;
|
anchors.rightMargin: 30;
|
||||||
height: paintedHeight;
|
height: paintedHeight;
|
||||||
// Text size
|
// Text size
|
||||||
size: 18;
|
size: 22;
|
||||||
|
// Style
|
||||||
|
horizontalAlignment: Text.AlignHCenter;
|
||||||
|
color: hifi.colors.baseGray;
|
||||||
|
}
|
||||||
|
|
||||||
|
RalewaySemiBold {
|
||||||
|
id: avatarNodeID;
|
||||||
|
text: chooseRecipientNearby.selectedRecipient;
|
||||||
|
// Anchors
|
||||||
|
anchors.top: avatarDisplayName.bottom;
|
||||||
|
anchors.topMargin: 6;
|
||||||
|
anchors.left: parent.left;
|
||||||
|
anchors.leftMargin: 30;
|
||||||
|
anchors.right: parent.right;
|
||||||
|
anchors.rightMargin: 30;
|
||||||
|
height: paintedHeight;
|
||||||
|
// Text size
|
||||||
|
size: 14;
|
||||||
|
// Style
|
||||||
|
horizontalAlignment: Text.AlignHCenter;
|
||||||
|
color: hifi.colors.lightGrayText;
|
||||||
|
}
|
||||||
|
|
||||||
|
RalewaySemiBold {
|
||||||
|
id: avatarUserName;
|
||||||
|
text: sendMoneyStep.selectedRecipientUserName;
|
||||||
|
// Anchors
|
||||||
|
anchors.top: avatarNodeID.bottom;
|
||||||
|
anchors.topMargin: 12;
|
||||||
|
anchors.left: parent.left;
|
||||||
|
anchors.leftMargin: 30;
|
||||||
|
anchors.right: parent.right;
|
||||||
|
anchors.rightMargin: 30;
|
||||||
|
height: paintedHeight;
|
||||||
|
// Text size
|
||||||
|
size: 22;
|
||||||
// Style
|
// Style
|
||||||
horizontalAlignment: Text.AlignHCenter;
|
horizontalAlignment: Text.AlignHCenter;
|
||||||
color: hifi.colors.baseGray;
|
color: hifi.colors.baseGray;
|
||||||
|
@ -632,8 +670,6 @@ Item {
|
||||||
onClicked: {
|
onClicked: {
|
||||||
sendMoneyStep.referrer = "nearby";
|
sendMoneyStep.referrer = "nearby";
|
||||||
sendMoneyStep.selectedRecipientNodeID = chooseRecipientNearby.selectedRecipient;
|
sendMoneyStep.selectedRecipientNodeID = chooseRecipientNearby.selectedRecipient;
|
||||||
sendMoneyStep.selectedRecipientDisplayName = '"ZRF Changeme"';
|
|
||||||
sendMoneyStep.selectedRecipientUserName = 'unknown username';
|
|
||||||
chooseRecipientNearby.selectedRecipient = "";
|
chooseRecipientNearby.selectedRecipient = "";
|
||||||
|
|
||||||
root.nextActiveView = "sendMoneyStep";
|
root.nextActiveView = "sendMoneyStep";
|
||||||
|
@ -652,6 +688,7 @@ Item {
|
||||||
property string selectedRecipientNodeID;
|
property string selectedRecipientNodeID;
|
||||||
property string selectedRecipientDisplayName;
|
property string selectedRecipientDisplayName;
|
||||||
property string selectedRecipientUserName;
|
property string selectedRecipientUserName;
|
||||||
|
property string selectedRecipientProfilePic;
|
||||||
|
|
||||||
visible: root.currentActiveView === "sendMoneyStep";
|
visible: root.currentActiveView === "sendMoneyStep";
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
|
@ -703,37 +740,94 @@ Item {
|
||||||
verticalAlignment: Text.AlignVCenter;
|
verticalAlignment: Text.AlignVCenter;
|
||||||
}
|
}
|
||||||
|
|
||||||
RalewaySemiBold {
|
Item {
|
||||||
id: recipientDisplayName;
|
id: recipientIsNearby;
|
||||||
text: sendMoneyStep.selectedRecipientDisplayName;
|
visible: sendMoneyStep.referrer === "nearby";
|
||||||
// Anchors
|
|
||||||
anchors.top: parent.top;
|
anchors.top: parent.top;
|
||||||
anchors.left: sendToText_sendMoneyStep.right;
|
anchors.left: sendToText_sendMoneyStep.right;
|
||||||
anchors.right: changeButton.left;
|
anchors.right: changeButton.left;
|
||||||
anchors.rightMargin: 12;
|
anchors.rightMargin: 12;
|
||||||
height: parent.height/2;
|
height: parent.height;
|
||||||
// Text size
|
|
||||||
size: 18;
|
RalewaySemiBold {
|
||||||
// Style
|
id: recipientDisplayName;
|
||||||
color: hifi.colors.baseGray;
|
text: sendMoneyStep.selectedRecipientDisplayName;
|
||||||
verticalAlignment: Text.AlignBottom;
|
// Anchors
|
||||||
|
anchors.top: parent.top;
|
||||||
|
anchors.left: parent.left;
|
||||||
|
anchors.right: parent.right;
|
||||||
|
anchors.rightMargin: 12;
|
||||||
|
height: parent.height/2;
|
||||||
|
// Text size
|
||||||
|
size: 18;
|
||||||
|
// Style
|
||||||
|
color: hifi.colors.baseGray;
|
||||||
|
verticalAlignment: Text.AlignBottom;
|
||||||
|
}
|
||||||
|
|
||||||
|
RalewaySemiBold {
|
||||||
|
text: sendMoneyStep.selectedRecipientUserName;
|
||||||
|
// Anchors
|
||||||
|
anchors.bottom: parent.bottom;
|
||||||
|
anchors.left: recipientDisplayName.anchors.left;
|
||||||
|
anchors.leftMargin: recipientDisplayName.anchors.leftMargin;
|
||||||
|
anchors.right: recipientDisplayName.anchors.right;
|
||||||
|
anchors.rightMargin: recipientDisplayName.anchors.rightMargin;
|
||||||
|
height: parent.height/2;
|
||||||
|
// Text size
|
||||||
|
size: 16;
|
||||||
|
// Style
|
||||||
|
color: hifi.colors.baseGray;
|
||||||
|
verticalAlignment: Text.AlignTop;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RalewaySemiBold {
|
Item {
|
||||||
id: recipientUsername;
|
id: recipientIsConnection;
|
||||||
text: sendMoneyStep.selectedRecipientUserName;
|
visible: sendMoneyStep.referrer === "connections";
|
||||||
// Anchors
|
anchors.top: parent.top;
|
||||||
anchors.bottom: parent.bottom;
|
anchors.left: sendToText_sendMoneyStep.right;
|
||||||
anchors.left: recipientDisplayName.anchors.left;
|
anchors.right: changeButton.left;
|
||||||
anchors.leftMargin: recipientDisplayName.anchors.leftMargin;
|
anchors.rightMargin: 12;
|
||||||
anchors.right: recipientDisplayName.anchors.right;
|
height: parent.height;
|
||||||
anchors.rightMargin: recipientDisplayName.anchors.rightMargin;
|
|
||||||
height: parent.height/2;
|
Image {
|
||||||
// Text size
|
id: userImage;
|
||||||
size: 16;
|
source: sendMoneyStep.selectedRecipientProfilePic !== "" ? ((0 === sendMoneyStep.selectedRecipientProfilePic.indexOf("http")) ?
|
||||||
// Style
|
sendMoneyStep.selectedRecipientProfilePic : (Account.metaverseServerURL + sendMoneyStep.selectedRecipientProfilePic)) : "";
|
||||||
color: hifi.colors.baseGray;
|
mipmap: true;
|
||||||
verticalAlignment: Text.AlignTop;
|
// Anchors
|
||||||
|
anchors.left: parent.left;
|
||||||
|
anchors.verticalCenter: parent.verticalCenter;
|
||||||
|
height: parent.height - 4;
|
||||||
|
layer.enabled: true;
|
||||||
|
layer.effect: OpacityMask {
|
||||||
|
maskSource: Item {
|
||||||
|
width: userImage.width;
|
||||||
|
height: userImage.height;
|
||||||
|
Rectangle {
|
||||||
|
anchors.centerIn: parent;
|
||||||
|
width: userImage.width; // This works because userImage is square
|
||||||
|
height: width;
|
||||||
|
radius: width;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RalewaySemiBold {
|
||||||
|
text: sendMoneyStep.selectedRecipientUserName;
|
||||||
|
// Anchors
|
||||||
|
anchors.left: userImage.right;
|
||||||
|
anchors.leftMargin: 8;
|
||||||
|
anchors.verticalCenter: parent.verticalCenter;
|
||||||
|
height: parent.height - 4;
|
||||||
|
// Text size
|
||||||
|
size: 16;
|
||||||
|
// Style
|
||||||
|
color: hifi.colors.baseGray;
|
||||||
|
verticalAlignment: Text.AlignVCenter;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// "CHANGE" button
|
// "CHANGE" button
|
||||||
|
@ -1472,6 +1566,7 @@ Item {
|
||||||
sendMoneyStep.selectedRecipientNodeID = "";
|
sendMoneyStep.selectedRecipientNodeID = "";
|
||||||
sendMoneyStep.selectedRecipientDisplayName = "";
|
sendMoneyStep.selectedRecipientDisplayName = "";
|
||||||
sendMoneyStep.selectedRecipientUserName = "";
|
sendMoneyStep.selectedRecipientUserName = "";
|
||||||
|
sendMoneyStep.selectedRecipientProfilePic = "";
|
||||||
amountTextField.text = "";
|
amountTextField.text = "";
|
||||||
optionalMessage.text = "";
|
optionalMessage.text = "";
|
||||||
}
|
}
|
||||||
|
@ -1494,10 +1589,17 @@ Item {
|
||||||
case 'selectRecipient':
|
case 'selectRecipient':
|
||||||
if (message.isSelected) {
|
if (message.isSelected) {
|
||||||
chooseRecipientNearby.selectedRecipient = message.id[0];
|
chooseRecipientNearby.selectedRecipient = message.id[0];
|
||||||
|
sendMoneyStep.selectedRecipientDisplayName = message.displayName;
|
||||||
|
sendMoneyStep.selectedRecipientUserName = message.userName;
|
||||||
} else {
|
} else {
|
||||||
chooseRecipientNearby.selectedRecipient = "";
|
chooseRecipientNearby.selectedRecipient = "";
|
||||||
|
sendMoneyStep.selectedRecipientDisplayName = '';
|
||||||
|
sendMoneyStep.selectedRecipientUserName = '';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'updateSelectedRecipientUsername':
|
||||||
|
sendMoneyStep.selectedRecipientUserName = message.userName;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
console.log('SendMoney: Unrecognized message from wallet.js:', JSON.stringify(message));
|
console.log('SendMoney: Unrecognized message from wallet.js:', JSON.stringify(message));
|
||||||
}
|
}
|
||||||
|
|
|
@ -358,7 +358,7 @@ class AvatarData : public QObject, public SpatiallyNestable {
|
||||||
Q_PROPERTY(QString displayName READ getDisplayName WRITE setDisplayName NOTIFY displayNameChanged)
|
Q_PROPERTY(QString displayName READ getDisplayName WRITE setDisplayName NOTIFY displayNameChanged)
|
||||||
// sessionDisplayName is sanitized, defaulted version displayName that is defined by the AvatarMixer rather than by Interface clients.
|
// sessionDisplayName is sanitized, defaulted version displayName that is defined by the AvatarMixer rather than by Interface clients.
|
||||||
// The result is unique among all avatars present at the time.
|
// The result is unique among all avatars present at the time.
|
||||||
Q_PROPERTY(QString sessionDisplayName READ getSessionDisplayName WRITE setSessionDisplayName)
|
Q_PROPERTY(QString sessionDisplayName READ getSessionDisplayName WRITE setSessionDisplayName NOTIFY sessionDisplayNameChanged)
|
||||||
Q_PROPERTY(bool lookAtSnappingEnabled MEMBER _lookAtSnappingEnabled NOTIFY lookAtSnappingChanged)
|
Q_PROPERTY(bool lookAtSnappingEnabled MEMBER _lookAtSnappingEnabled NOTIFY lookAtSnappingChanged)
|
||||||
Q_PROPERTY(QString skeletonModelURL READ getSkeletonModelURLFromScript WRITE setSkeletonModelURLFromScript)
|
Q_PROPERTY(QString skeletonModelURL READ getSkeletonModelURLFromScript WRITE setSkeletonModelURLFromScript)
|
||||||
Q_PROPERTY(QVector<AttachmentData> attachmentData READ getAttachmentData WRITE setAttachmentData)
|
Q_PROPERTY(QVector<AttachmentData> attachmentData READ getAttachmentData WRITE setAttachmentData)
|
||||||
|
@ -685,6 +685,7 @@ public:
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void displayNameChanged();
|
void displayNameChanged();
|
||||||
|
void sessionDisplayNameChanged();
|
||||||
void lookAtSnappingChanged(bool enabled);
|
void lookAtSnappingChanged(bool enabled);
|
||||||
void sessionUUIDChanged();
|
void sessionUUIDChanged();
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ ScriptAvatarData::ScriptAvatarData(AvatarSharedPointer avatarData) :
|
||||||
_avatarData(avatarData)
|
_avatarData(avatarData)
|
||||||
{
|
{
|
||||||
QObject::connect(avatarData.get(), &AvatarData::displayNameChanged, this, &ScriptAvatarData::displayNameChanged);
|
QObject::connect(avatarData.get(), &AvatarData::displayNameChanged, this, &ScriptAvatarData::displayNameChanged);
|
||||||
|
QObject::connect(avatarData.get(), &AvatarData::sessionDisplayNameChanged, this, &ScriptAvatarData::sessionDisplayNameChanged);
|
||||||
QObject::connect(avatarData.get(), &AvatarData::lookAtSnappingChanged, this, &ScriptAvatarData::lookAtSnappingChanged);
|
QObject::connect(avatarData.get(), &AvatarData::lookAtSnappingChanged, this, &ScriptAvatarData::lookAtSnappingChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ class ScriptAvatarData : public QObject {
|
||||||
//
|
//
|
||||||
Q_PROPERTY(QUuid sessionUUID READ getSessionUUID)
|
Q_PROPERTY(QUuid sessionUUID READ getSessionUUID)
|
||||||
Q_PROPERTY(QString displayName READ getDisplayName NOTIFY displayNameChanged)
|
Q_PROPERTY(QString displayName READ getDisplayName NOTIFY displayNameChanged)
|
||||||
Q_PROPERTY(QString sessionDisplayName READ getSessionDisplayName)
|
Q_PROPERTY(QString sessionDisplayName READ getSessionDisplayName NOTIFY sessionDisplayNameChanged)
|
||||||
Q_PROPERTY(bool isReplicated READ getIsReplicated)
|
Q_PROPERTY(bool isReplicated READ getIsReplicated)
|
||||||
Q_PROPERTY(bool lookAtSnappingEnabled READ getLookAtSnappingEnabled NOTIFY lookAtSnappingChanged)
|
Q_PROPERTY(bool lookAtSnappingEnabled READ getLookAtSnappingEnabled NOTIFY lookAtSnappingChanged)
|
||||||
|
|
||||||
|
@ -131,6 +131,7 @@ public:
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void displayNameChanged();
|
void displayNameChanged();
|
||||||
|
void sessionDisplayNameChanged();
|
||||||
void lookAtSnappingChanged(bool enabled);
|
void lookAtSnappingChanged(bool enabled);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
|
@ -390,13 +390,32 @@
|
||||||
//
|
//
|
||||||
// Clicks.
|
// Clicks.
|
||||||
//
|
//
|
||||||
|
function usernameFromIDReply(id, username, machineFingerprint, isAdmin) {
|
||||||
|
if (selectedIds[0] === id) {
|
||||||
|
var message = {
|
||||||
|
method: 'updateSelectedRecipientUsername',
|
||||||
|
userName: username === "" ? "unknown username" : username
|
||||||
|
};
|
||||||
|
sendToQml(message);
|
||||||
|
}
|
||||||
|
}
|
||||||
function handleClick(pickRay) {
|
function handleClick(pickRay) {
|
||||||
ExtendedOverlay.applyPickRay(pickRay, function (overlay) {
|
ExtendedOverlay.applyPickRay(pickRay, function (overlay) {
|
||||||
var nextSelectedStatus = !overlay.selected;
|
var nextSelectedStatus = !overlay.selected;
|
||||||
var message = { method: 'selectRecipient', id: [overlay.key], isSelected: nextSelectedStatus };
|
var avatarId = overlay.key;
|
||||||
|
selectedIds = nextSelectedStatus ? [avatarId] : [];
|
||||||
|
if (nextSelectedStatus) {
|
||||||
|
Users.requestUsernameFromID(avatarId);
|
||||||
|
}
|
||||||
|
var message = {
|
||||||
|
method: 'selectRecipient',
|
||||||
|
id: [avatarId],
|
||||||
|
isSelected: nextSelectedStatus,
|
||||||
|
displayName: '"' + AvatarList.getAvatar(avatarId).sessionDisplayName + '"',
|
||||||
|
userName: ''
|
||||||
|
};
|
||||||
sendToQml(message);
|
sendToQml(message);
|
||||||
|
|
||||||
selectedIds = nextSelectedStatus ? [overlay.key] : [];
|
|
||||||
ExtendedOverlay.some(function (overlay) {
|
ExtendedOverlay.some(function (overlay) {
|
||||||
var id = overlay.key;
|
var id = overlay.key;
|
||||||
var selected = ExtendedOverlay.isSelected(id);
|
var selected = ExtendedOverlay.isSelected(id);
|
||||||
|
@ -625,6 +644,11 @@
|
||||||
|
|
||||||
if (onWalletScreen) {
|
if (onWalletScreen) {
|
||||||
isWired = true;
|
isWired = true;
|
||||||
|
Users.usernameFromIDReply.connect(usernameFromIDReply);
|
||||||
|
Controller.mousePressEvent.connect(handleMouseEvent);
|
||||||
|
Controller.mouseMoveEvent.connect(handleMouseMoveEvent);
|
||||||
|
triggerMapping.enable();
|
||||||
|
triggerPressMapping.enable();
|
||||||
} else {
|
} else {
|
||||||
off();
|
off();
|
||||||
}
|
}
|
||||||
|
@ -648,15 +672,12 @@
|
||||||
});
|
});
|
||||||
button.clicked.connect(onButtonClicked);
|
button.clicked.connect(onButtonClicked);
|
||||||
tablet.screenChanged.connect(onTabletScreenChanged);
|
tablet.screenChanged.connect(onTabletScreenChanged);
|
||||||
Controller.mousePressEvent.connect(handleMouseEvent);
|
|
||||||
Controller.mouseMoveEvent.connect(handleMouseMoveEvent);
|
|
||||||
triggerMapping.enable();
|
|
||||||
triggerPressMapping.enable();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var isWired = false;
|
var isWired = false;
|
||||||
function off() {
|
function off() {
|
||||||
if (isWired) { // It is not ok to disconnect these twice, hence guard.
|
if (isWired) { // It is not ok to disconnect these twice, hence guard.
|
||||||
|
Users.usernameFromIDReply.disconnect(usernameFromIDReply);
|
||||||
Script.update.disconnect(updateOverlays);
|
Script.update.disconnect(updateOverlays);
|
||||||
Controller.mousePressEvent.disconnect(handleMouseEvent);
|
Controller.mousePressEvent.disconnect(handleMouseEvent);
|
||||||
Controller.mouseMoveEvent.disconnect(handleMouseMoveEvent);
|
Controller.mouseMoveEvent.disconnect(handleMouseMoveEvent);
|
||||||
|
|
|
@ -685,7 +685,6 @@ function startup() {
|
||||||
});
|
});
|
||||||
button.clicked.connect(onTabletButtonClicked);
|
button.clicked.connect(onTabletButtonClicked);
|
||||||
tablet.screenChanged.connect(onTabletScreenChanged);
|
tablet.screenChanged.connect(onTabletScreenChanged);
|
||||||
Users.usernameFromIDReply.connect(usernameFromIDReply);
|
|
||||||
Window.domainChanged.connect(clearLocalQMLDataAndClosePAL);
|
Window.domainChanged.connect(clearLocalQMLDataAndClosePAL);
|
||||||
Window.domainConnectionRefused.connect(clearLocalQMLDataAndClosePAL);
|
Window.domainConnectionRefused.connect(clearLocalQMLDataAndClosePAL);
|
||||||
Messages.subscribe(CHANNEL);
|
Messages.subscribe(CHANNEL);
|
||||||
|
@ -708,6 +707,7 @@ function off() {
|
||||||
Controller.mousePressEvent.disconnect(handleMouseEvent);
|
Controller.mousePressEvent.disconnect(handleMouseEvent);
|
||||||
Controller.mouseMoveEvent.disconnect(handleMouseMoveEvent);
|
Controller.mouseMoveEvent.disconnect(handleMouseMoveEvent);
|
||||||
tablet.tabletShownChanged.disconnect(tabletVisibilityChanged);
|
tablet.tabletShownChanged.disconnect(tabletVisibilityChanged);
|
||||||
|
Users.usernameFromIDReply.disconnect(usernameFromIDReply);
|
||||||
isWired = false;
|
isWired = false;
|
||||||
ContextOverlay.enabled = true
|
ContextOverlay.enabled = true
|
||||||
}
|
}
|
||||||
|
@ -744,6 +744,7 @@ function onTabletButtonClicked() {
|
||||||
Script.update.connect(updateOverlays);
|
Script.update.connect(updateOverlays);
|
||||||
Controller.mousePressEvent.connect(handleMouseEvent);
|
Controller.mousePressEvent.connect(handleMouseEvent);
|
||||||
Controller.mouseMoveEvent.connect(handleMouseMoveEvent);
|
Controller.mouseMoveEvent.connect(handleMouseMoveEvent);
|
||||||
|
Users.usernameFromIDReply.connect(usernameFromIDReply);
|
||||||
triggerMapping.enable();
|
triggerMapping.enable();
|
||||||
triggerPressMapping.enable();
|
triggerPressMapping.enable();
|
||||||
audioTimer = createAudioInterval(conserveResources ? AUDIO_LEVEL_CONSERVED_UPDATE_INTERVAL_MS : AUDIO_LEVEL_UPDATE_INTERVAL_MS);
|
audioTimer = createAudioInterval(conserveResources ? AUDIO_LEVEL_CONSERVED_UPDATE_INTERVAL_MS : AUDIO_LEVEL_UPDATE_INTERVAL_MS);
|
||||||
|
@ -890,7 +891,6 @@ function shutdown() {
|
||||||
button.clicked.disconnect(onTabletButtonClicked);
|
button.clicked.disconnect(onTabletButtonClicked);
|
||||||
tablet.removeButton(button);
|
tablet.removeButton(button);
|
||||||
tablet.screenChanged.disconnect(onTabletScreenChanged);
|
tablet.screenChanged.disconnect(onTabletScreenChanged);
|
||||||
Users.usernameFromIDReply.disconnect(usernameFromIDReply);
|
|
||||||
Window.domainChanged.disconnect(clearLocalQMLDataAndClosePAL);
|
Window.domainChanged.disconnect(clearLocalQMLDataAndClosePAL);
|
||||||
Window.domainConnectionRefused.disconnect(clearLocalQMLDataAndClosePAL);
|
Window.domainConnectionRefused.disconnect(clearLocalQMLDataAndClosePAL);
|
||||||
Messages.subscribe(CHANNEL);
|
Messages.subscribe(CHANNEL);
|
||||||
|
|
Loading…
Reference in a new issue