mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-29 22:22:54 +02:00
Disable silence/ban buttons in PAL if avatar is replicated
This commit is contained in:
parent
8ce1474d9a
commit
0e7ddfd29f
5 changed files with 16 additions and 1 deletions
|
@ -43,6 +43,7 @@ Item {
|
||||||
property bool selected: false
|
property bool selected: false
|
||||||
property bool isAdmin: false
|
property bool isAdmin: false
|
||||||
property bool isPresent: true
|
property bool isPresent: true
|
||||||
|
property bool isReplicated: false
|
||||||
property string placeName: ""
|
property string placeName: ""
|
||||||
property string profilePicBorderColor: (connectionStatus == "connection" ? hifi.colors.indigoAccent : (connectionStatus == "friend" ? hifi.colors.greenHighlight : "transparent"))
|
property string profilePicBorderColor: (connectionStatus == "connection" ? hifi.colors.indigoAccent : (connectionStatus == "friend" ? hifi.colors.greenHighlight : "transparent"))
|
||||||
property alias avImage: avatarImage
|
property alias avImage: avatarImage
|
||||||
|
|
|
@ -473,6 +473,7 @@ Rectangle {
|
||||||
visible: !isCheckBox && !isButton && !isAvgAudio;
|
visible: !isCheckBox && !isButton && !isAvgAudio;
|
||||||
uuid: model ? model.sessionId : "";
|
uuid: model ? model.sessionId : "";
|
||||||
selected: styleData.selected;
|
selected: styleData.selected;
|
||||||
|
isReplicated: model.isReplicated;
|
||||||
isAdmin: model && model.admin;
|
isAdmin: model && model.admin;
|
||||||
isPresent: model && model.isPresent;
|
isPresent: model && model.isPresent;
|
||||||
// Size
|
// Size
|
||||||
|
@ -553,6 +554,7 @@ Rectangle {
|
||||||
id: actionButton;
|
id: actionButton;
|
||||||
color: 2; // Red
|
color: 2; // Red
|
||||||
visible: isButton;
|
visible: isButton;
|
||||||
|
enabled: !nameCard.isReplicated;
|
||||||
anchors.centerIn: parent;
|
anchors.centerIn: parent;
|
||||||
width: 32;
|
width: 32;
|
||||||
height: 32;
|
height: 32;
|
||||||
|
|
|
@ -152,6 +152,15 @@ QString ScriptAvatarData::getSessionDisplayName() const {
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ScriptAvatarData::getIsReplicated() const {
|
||||||
|
if (AvatarSharedPointer sharedAvatarData = _avatarData.lock()) {
|
||||||
|
return sharedAvatarData->getIsReplicated();
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// IDENTIFIER PROPERTIES
|
// IDENTIFIER PROPERTIES
|
||||||
// END
|
// END
|
||||||
|
|
|
@ -45,6 +45,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)
|
||||||
|
Q_PROPERTY(bool isReplicated READ getIsReplicated)
|
||||||
|
|
||||||
//
|
//
|
||||||
// ATTACHMENT AND JOINT PROPERTIES
|
// ATTACHMENT AND JOINT PROPERTIES
|
||||||
|
@ -95,6 +96,7 @@ public:
|
||||||
QUuid getSessionUUID() const;
|
QUuid getSessionUUID() const;
|
||||||
QString getDisplayName() const;
|
QString getDisplayName() const;
|
||||||
QString getSessionDisplayName() const;
|
QString getSessionDisplayName() const;
|
||||||
|
bool getIsReplicated() const;
|
||||||
|
|
||||||
//
|
//
|
||||||
// ATTACHMENT AND JOINT PROPERTIES
|
// ATTACHMENT AND JOINT PROPERTIES
|
||||||
|
|
|
@ -479,7 +479,8 @@ function populateNearbyUserList(selectData, oldAudioData) {
|
||||||
admin: false,
|
admin: false,
|
||||||
personalMute: !!id && Users.getPersonalMuteStatus(id), // expects proper boolean, not null
|
personalMute: !!id && Users.getPersonalMuteStatus(id), // expects proper boolean, not null
|
||||||
ignore: !!id && Users.getIgnoreStatus(id), // ditto
|
ignore: !!id && Users.getIgnoreStatus(id), // ditto
|
||||||
isPresent: true
|
isPresent: true,
|
||||||
|
isReplicated: avatar.isReplicated
|
||||||
};
|
};
|
||||||
if (id) {
|
if (id) {
|
||||||
addAvatarNode(id); // No overlay for ourselves
|
addAvatarNode(id); // No overlay for ourselves
|
||||||
|
|
Loading…
Reference in a new issue