mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 13:38:02 +02:00
separating out bubble icon qml - adding support for transparency
This commit is contained in:
parent
8e6913dde1
commit
d0116abc52
5 changed files with 13 additions and 69 deletions
|
@ -146,7 +146,7 @@ Rectangle {
|
||||||
Item {
|
Item {
|
||||||
id: status;
|
id: status;
|
||||||
|
|
||||||
readonly property string color: AudioScriptingInterface.muted ? colors.muted : colors.unmuted;
|
readonly property string color: muted ? colors.muted : colors.unmuted;
|
||||||
|
|
||||||
visible: (pushToTalk && !pushingToTalk) || (muted && (level >= userSpeakingLevel));
|
visible: (pushToTalk && !pushingToTalk) || (muted && (level >= userSpeakingLevel));
|
||||||
|
|
||||||
|
|
|
@ -55,10 +55,12 @@ Rectangle {
|
||||||
|
|
||||||
onLevelChanged: {
|
onLevelChanged: {
|
||||||
var rectOpacity = muted && (level >= userSpeakingLevel) ? 0.9 : 0.3;
|
var rectOpacity = muted && (level >= userSpeakingLevel) ? 0.9 : 0.3;
|
||||||
if (mouseArea.containsMouse && rectOpacity != 0.9) {
|
if (pushToTalk && !pushingToTalk) {
|
||||||
|
rectOpacity = (level >= userSpeakingLevel) ? 0.9 : 0.7;
|
||||||
|
} else if (mouseArea.containsMouse && rectOpacity != 0.9) {
|
||||||
rectOpacity = 0.5;
|
rectOpacity = 0.5;
|
||||||
}
|
}
|
||||||
opacity = rectOpacity;
|
micBar.opacity = rectOpacity;
|
||||||
}
|
}
|
||||||
|
|
||||||
color: "#00000000";
|
color: "#00000000";
|
||||||
|
|
|
@ -211,7 +211,6 @@
|
||||||
#include "ui/UpdateDialog.h"
|
#include "ui/UpdateDialog.h"
|
||||||
#include "ui/DomainConnectionModel.h"
|
#include "ui/DomainConnectionModel.h"
|
||||||
#include "ui/Keyboard.h"
|
#include "ui/Keyboard.h"
|
||||||
#include "ui/PrivacyShield.h"
|
|
||||||
#include "Util.h"
|
#include "Util.h"
|
||||||
#include "InterfaceParentFinder.h"
|
#include "InterfaceParentFinder.h"
|
||||||
#include "ui/OctreeStatsProvider.h"
|
#include "ui/OctreeStatsProvider.h"
|
||||||
|
@ -932,7 +931,6 @@ bool setupEssentials(int& argc, char** argv, bool runningMarkerExisted) {
|
||||||
DependencyManager::set<KeyboardScriptingInterface>();
|
DependencyManager::set<KeyboardScriptingInterface>();
|
||||||
DependencyManager::set<GrabManager>();
|
DependencyManager::set<GrabManager>();
|
||||||
DependencyManager::set<AvatarPackager>();
|
DependencyManager::set<AvatarPackager>();
|
||||||
DependencyManager::set<PrivacyShield>();
|
|
||||||
|
|
||||||
return previousSessionCrashed;
|
return previousSessionCrashed;
|
||||||
}
|
}
|
||||||
|
@ -2672,9 +2670,6 @@ void Application::cleanupBeforeQuit() {
|
||||||
nodeList->getPacketReceiver().setShouldDropPackets(true);
|
nodeList->getPacketReceiver().setShouldDropPackets(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// destroy privacy shield before entity shutdown.
|
|
||||||
DependencyManager::get<PrivacyShield>()->destroyPrivacyShield();
|
|
||||||
|
|
||||||
getEntities()->shutdown(); // tell the entities system we're shutting down, so it will stop running scripts
|
getEntities()->shutdown(); // tell the entities system we're shutting down, so it will stop running scripts
|
||||||
|
|
||||||
// Clear any queued processing (I/O, FBX/OBJ/Texture parsing)
|
// Clear any queued processing (I/O, FBX/OBJ/Texture parsing)
|
||||||
|
@ -2753,7 +2748,6 @@ void Application::cleanupBeforeQuit() {
|
||||||
DependencyManager::destroy<PickManager>();
|
DependencyManager::destroy<PickManager>();
|
||||||
DependencyManager::destroy<KeyboardScriptingInterface>();
|
DependencyManager::destroy<KeyboardScriptingInterface>();
|
||||||
DependencyManager::destroy<Keyboard>();
|
DependencyManager::destroy<Keyboard>();
|
||||||
DependencyManager::destroy<PrivacyShield>();
|
|
||||||
DependencyManager::destroy<AvatarPackager>();
|
DependencyManager::destroy<AvatarPackager>();
|
||||||
|
|
||||||
qCDebug(interfaceapp) << "Application::cleanupBeforeQuit() complete";
|
qCDebug(interfaceapp) << "Application::cleanupBeforeQuit() complete";
|
||||||
|
@ -5555,8 +5549,6 @@ void Application::resumeAfterLoginDialogActionTaken() {
|
||||||
menu->getMenu("Developer")->setVisible(_developerMenuVisible);
|
menu->getMenu("Developer")->setVisible(_developerMenuVisible);
|
||||||
_myCamera.setMode(_previousCameraMode);
|
_myCamera.setMode(_previousCameraMode);
|
||||||
cameraModeChanged();
|
cameraModeChanged();
|
||||||
|
|
||||||
DependencyManager::get<PrivacyShield>()->createPrivacyShield();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::loadAvatarScripts(const QVector<QString>& urls) {
|
void Application::loadAvatarScripts(const QVector<QString>& urls) {
|
||||||
|
@ -6515,8 +6507,6 @@ void Application::update(float deltaTime) {
|
||||||
updateLoginDialogPosition();
|
updateLoginDialogPosition();
|
||||||
}
|
}
|
||||||
|
|
||||||
DependencyManager::get<PrivacyShield>()->update(deltaTime);
|
|
||||||
|
|
||||||
{
|
{
|
||||||
PROFILE_RANGE_EX(app, "Overlays", 0xffff0000, (uint64_t)getActiveDisplayPlugin()->presentCount());
|
PROFILE_RANGE_EX(app, "Overlays", 0xffff0000, (uint64_t)getActiveDisplayPlugin()->presentCount());
|
||||||
PerformanceTimer perfTimer("overlays");
|
PerformanceTimer perfTimer("overlays");
|
||||||
|
|
|
@ -1,47 +0,0 @@
|
||||||
//
|
|
||||||
// PrivacyShield.h
|
|
||||||
// interface/src/ui
|
|
||||||
//
|
|
||||||
// Created by Wayne Chen on 2/27/19.
|
|
||||||
// Copyright 2019 High Fidelity, Inc.
|
|
||||||
//
|
|
||||||
// Distributed under the Apache License, Version 2.0.
|
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
||||||
//
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <QtCore/QObject>
|
|
||||||
#include <QtCore/QUuid>
|
|
||||||
#include <QtGlobal>
|
|
||||||
|
|
||||||
#include <DependencyManager.h>
|
|
||||||
#include <Sound.h>
|
|
||||||
|
|
||||||
class PrivacyShield : public QObject, public Dependency {
|
|
||||||
Q_OBJECT
|
|
||||||
SINGLETON_DEPENDENCY
|
|
||||||
|
|
||||||
public:
|
|
||||||
PrivacyShield();
|
|
||||||
void createPrivacyShield();
|
|
||||||
void destroyPrivacyShield();
|
|
||||||
|
|
||||||
bool isVisible() const { return _visible; }
|
|
||||||
void update(float deltaTime);
|
|
||||||
|
|
||||||
protected slots:
|
|
||||||
void enteredIgnoreRadius();
|
|
||||||
void onPrivacyShieldToggled(bool enabled, bool doNotLog = false);
|
|
||||||
|
|
||||||
private:
|
|
||||||
void showPrivacyShield();
|
|
||||||
void hidePrivacyShield();
|
|
||||||
|
|
||||||
SharedSoundPointer _bubbleActivateSound;
|
|
||||||
QUuid _localPrivacyShieldID;
|
|
||||||
quint64 _privacyShieldTimestamp;
|
|
||||||
quint64 _lastPrivacyShieldSoundTimestamp;
|
|
||||||
bool _visible { false };
|
|
||||||
bool _updateConnected { false };
|
|
||||||
};
|
|
|
@ -32,8 +32,7 @@ var DEFAULT_SCRIPTS_COMBINED = [
|
||||||
"system/firstPersonHMD.js",
|
"system/firstPersonHMD.js",
|
||||||
"system/tablet-ui/tabletUI.js",
|
"system/tablet-ui/tabletUI.js",
|
||||||
"system/emote.js",
|
"system/emote.js",
|
||||||
"system/miniTablet.js",
|
"system/miniTablet.js"
|
||||||
"system/createAvatarInputsBarEntity.js"
|
|
||||||
];
|
];
|
||||||
var DEFAULT_SCRIPTS_SEPARATE = [
|
var DEFAULT_SCRIPTS_SEPARATE = [
|
||||||
"system/controllers/controllerScripts.js",
|
"system/controllers/controllerScripts.js",
|
||||||
|
|
Loading…
Reference in a new issue