mirror of
https://github.com/lubosz/overte.git
synced 2025-04-18 04:18:17 +02:00
Merge pull request #12499 from gcalero/android_bubble_fix
Set bubble default state off for android.
This commit is contained in:
commit
36d02389d9
11 changed files with 27 additions and 129 deletions
|
@ -44,7 +44,6 @@
|
|||
android:label="@string/app_name"
|
||||
android:screenOrientation="landscape"
|
||||
android:launchMode="singleTop"
|
||||
android:enableVrMode="com.google.vr.vrcore/com.google.vr.vrcore.common.VrCoreListenerService"
|
||||
>
|
||||
|
||||
<intent-filter>
|
||||
|
|
|
@ -256,7 +256,7 @@ Item {
|
|||
id: octreeCol
|
||||
spacing: 4; x: 4; y: 4;
|
||||
StatText {
|
||||
text: "Engine: " + root.engineFrameTime.toFixed(1) + " ms"
|
||||
text: "Render Engine: " + root.engineFrameTime.toFixed(1) + " ms"
|
||||
}
|
||||
StatText {
|
||||
text: "Batch: " + root.batchFrameTime.toFixed(1) + " ms"
|
||||
|
|
|
@ -44,7 +44,7 @@ Item {
|
|||
id: debugZ
|
||||
visible: DebugQML
|
||||
color: "red"
|
||||
text: (window ? "Z: " + window.z : "") + DebugQMLFile
|
||||
text: (window ? "Z: " + window.z : "")
|
||||
y: window ? window.height + 4 : 0
|
||||
}
|
||||
|
||||
|
|
|
@ -23,10 +23,7 @@ static AvatarInputs* INSTANCE{ nullptr };
|
|||
Setting::Handle<bool> showAudioToolsSetting { QStringList { "AvatarInputs", "showAudioTools" }, false };
|
||||
|
||||
AvatarInputs* AvatarInputs::getInstance() {
|
||||
if (!INSTANCE) {
|
||||
AvatarInputs::registerType();
|
||||
Q_ASSERT(INSTANCE);
|
||||
}
|
||||
Q_ASSERT(INSTANCE);
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
|
|
|
@ -46,10 +46,7 @@ static Stats* INSTANCE{ nullptr };
|
|||
QString getTextureMemoryPressureModeString();
|
||||
#endif
|
||||
Stats* Stats::getInstance() {
|
||||
if (!INSTANCE) {
|
||||
Stats::registerType();
|
||||
Q_ASSERT(INSTANCE);
|
||||
}
|
||||
Q_ASSERT(INSTANCE);
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
|
|
|
@ -176,7 +176,11 @@ private:
|
|||
tbb::concurrent_unordered_map<QUuid, float, UUIDHasher> _avatarGainMap;
|
||||
|
||||
void sendIgnoreRadiusStateToNode(const SharedNodePointer& destinationNode);
|
||||
#if defined(Q_OS_ANDROID)
|
||||
Setting::Handle<bool> _ignoreRadiusEnabled { "IgnoreRadiusEnabled", false };
|
||||
#else
|
||||
Setting::Handle<bool> _ignoreRadiusEnabled { "IgnoreRadiusEnabled", true };
|
||||
#endif
|
||||
|
||||
#if (PR_BUILD || DEV_BUILD)
|
||||
bool _shouldSendNewerVersion { false };
|
||||
|
|
|
@ -183,10 +183,18 @@ bool OffscreenSurface::eventFilter(QObject* originalDestination, QEvent* event)
|
|||
}
|
||||
case QEvent::InputMethod:
|
||||
case QEvent::InputMethodQuery: {
|
||||
if (_sharedObject->getWindow() && _sharedObject->getWindow()->activeFocusItem()) {
|
||||
auto window = getWindow();
|
||||
if (window && window->activeFocusItem()) {
|
||||
event->ignore();
|
||||
if (QCoreApplication::sendEvent(_sharedObject->getWindow()->activeFocusItem(), event)) {
|
||||
return event->isAccepted();
|
||||
if (QCoreApplication::sendEvent(window->activeFocusItem(), event)) {
|
||||
bool eventAccepted = event->isAccepted();
|
||||
QInputMethodQueryEvent* imqEvent = static_cast<QInputMethodQueryEvent*>(event);
|
||||
// this block disables the selection cursor in android which appears in
|
||||
// the top-left corner of the screen
|
||||
if (imqEvent->queries() & Qt::ImEnabled) {
|
||||
imqEvent->setValue(Qt::ImEnabled, QVariant(false));
|
||||
}
|
||||
return eventAccepted;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ class QQmlContext;
|
|||
private: \
|
||||
static const QString NAME; \
|
||||
static const QUrl QML; \
|
||||
static bool registered; \
|
||||
public: \
|
||||
static void registerType(); \
|
||||
static void show(std::function<void(QQmlContext*, QObject*)> f = [](QQmlContext*, QObject*) {}); \
|
||||
|
@ -45,6 +46,7 @@ private:
|
|||
#define HIFI_QML_DEF(x) \
|
||||
const QUrl x::QML = PathUtils::qmlUrl(#x ".qml"); \
|
||||
const QString x::NAME = #x; \
|
||||
bool x::registered = false; \
|
||||
\
|
||||
void x::registerType() { \
|
||||
qmlRegisterType<x>("Hifi", 1, 0, NAME.toLocal8Bit().constData()); \
|
||||
|
@ -52,6 +54,9 @@ private:
|
|||
\
|
||||
void x::show(std::function<void(QQmlContext*, QObject*)> f) { \
|
||||
auto offscreenUi = DependencyManager::get<OffscreenUi>(); \
|
||||
if (!registered) { \
|
||||
x::registerType(); \
|
||||
} \
|
||||
offscreenUi->show(QML, NAME, f); \
|
||||
} \
|
||||
\
|
||||
|
|
|
@ -225,7 +225,7 @@ void AudioHandler::run() {
|
|||
|
||||
void OffscreenQmlSurface::initializeEngine(QQmlEngine* engine) {
|
||||
Parent::initializeEngine(engine);
|
||||
|
||||
new QQmlFileSelector(engine);
|
||||
static std::once_flag once;
|
||||
std::call_once(once, [] {
|
||||
qRegisterMetaType<TabletProxy*>();
|
||||
|
|
|
@ -132,6 +132,8 @@ function setupBottomBar() {
|
|||
text: "BUBBLE"
|
||||
});
|
||||
|
||||
bubbleBtn.editProperties({isActive: Users.getIgnoreRadiusEnabled()});
|
||||
|
||||
bubbleBtn.clicked.connect(function() {
|
||||
Users.toggleIgnoreRadius();
|
||||
bubbleBtn.editProperties({isActive: Users.getIgnoreRadiusEnabled()});
|
||||
|
|
|
@ -921,7 +921,6 @@ function saveAvatarData(QUuid) {
|
|||
if (avatarsData[QUuid] != undefined) {
|
||||
avatarsData[QUuid].position = avat.position;
|
||||
} else {
|
||||
<<<<<<< HEAD
|
||||
var avatarIcon = Overlays.addOverlay("circle3d", {
|
||||
color: uniqueColor.convertHexToRGB(uniqueColor.getColor(QUuid)),
|
||||
dimensions: ICON_ENTITY_DEFAULT_DIMENSIONS,
|
||||
|
@ -930,20 +929,6 @@ function saveAvatarData(QUuid) {
|
|||
outerRadius: 2,
|
||||
isSolid: true,
|
||||
visible: false
|
||||
=======
|
||||
var avatarIcon = Overlays.addOverlay("image3d", {
|
||||
subImage : {
|
||||
x : 0,
|
||||
y : 0,
|
||||
width : 150,
|
||||
height : 142
|
||||
},
|
||||
url : getAvatarIconForUser(QUuid),
|
||||
dimensions : ICON_ENTITY_DEFAULT_DIMENSIONS,
|
||||
visible : false,
|
||||
ignoreRayIntersection : false,
|
||||
orientation : Quat.fromPitchYawRollDegrees(-90, 0, 0)
|
||||
>>>>>>> upstream/master
|
||||
});
|
||||
|
||||
var needRefresh = !avat || !avat.displayName;
|
||||
|
@ -951,7 +936,6 @@ function saveAvatarData(QUuid) {
|
|||
: "Unknown";
|
||||
var textWidth = displayName.length * AVATAR_DISPLAY_NAME_CHAR_WIDTH;
|
||||
var avatarName = Overlays.addOverlay("text", {
|
||||
<<<<<<< HEAD
|
||||
width: textWidth,
|
||||
height: AVATAR_DISPLAY_NAME_HEIGHT,
|
||||
color: { red: 255, green: 255, blue: 255},
|
||||
|
@ -961,28 +945,6 @@ function saveAvatarData(QUuid) {
|
|||
visible: false,
|
||||
text: displayName,
|
||||
textAlignCenter: true
|
||||
=======
|
||||
width : textWidth,
|
||||
height : AVATAR_DISPLAY_NAME_HEIGHT,
|
||||
color : {
|
||||
red : 255,
|
||||
green : 255,
|
||||
blue : 255
|
||||
},
|
||||
backgroundAlpha : 0.0,
|
||||
textRaiseColor : {
|
||||
red : 0,
|
||||
green : 0,
|
||||
blue : 0
|
||||
},
|
||||
font : {
|
||||
size : 68,
|
||||
bold : true
|
||||
},
|
||||
visible : false,
|
||||
text : displayName,
|
||||
textAlignCenter : true
|
||||
>>>>>>> upstream/master
|
||||
});
|
||||
avatarsIcons.push(avatarIcon);
|
||||
avatarsNames.push(avatarName);
|
||||
|
@ -1050,7 +1012,6 @@ function distanceForCameraHeight(h) {
|
|||
return 5;
|
||||
}
|
||||
function renderMyAvatarIcon() {
|
||||
<<<<<<< HEAD
|
||||
var commonY = Camera.position.y - distanceForCameraHeight(Camera.position.y);
|
||||
var iconPos = findLineToHeightIntersectionCoords( MyAvatar.position.x,
|
||||
MyAvatar.position.y + RADAR_ICONS_APPARENT_DISTANCE_TO_AVATAR_BASE,
|
||||
|
@ -1058,17 +1019,6 @@ function renderMyAvatarIcon() {
|
|||
Camera.position.x, Camera.position.y, Camera.position.z,
|
||||
commonY);
|
||||
if (!iconPos) { printd("avatarmy icon pos null"); return;}
|
||||
=======
|
||||
var iconPos = findLineToHeightIntersectionCoords(MyAvatar.position.x,
|
||||
MyAvatar.position.y + RADAR_ICONS_APPARENT_DISTANCE_TO_AVATAR_BASE,
|
||||
MyAvatar.position.z, Camera.position.x, Camera.position.y,
|
||||
Camera.position.z, Camera.position.y
|
||||
- RADAR_CAMERA_DISTANCE_TO_ICONS);
|
||||
if (!iconPos) {
|
||||
printd("avatarmy icon pos null");
|
||||
return;
|
||||
}
|
||||
>>>>>>> upstream/master
|
||||
var iconDimensions = avatarIconPlaneDimensions();
|
||||
|
||||
var avatarPos = MyAvatar.position;
|
||||
|
@ -1084,7 +1034,6 @@ function renderMyAvatarIcon() {
|
|||
var y = (p1.z - borderPoints[0].z) * (Window.innerHeight)
|
||||
/ (borderPoints[1].z - borderPoints[0].z);
|
||||
|
||||
<<<<<<< HEAD
|
||||
if (!myAvatarIcon && MyAvatar.SELF_ID) {
|
||||
myAvatarIcon = Overlays.addOverlay("circle3d", {
|
||||
color: uniqueColor.convertHexToRGB(uniqueColor.getColor(MyAvatar.SELF_ID)),
|
||||
|
@ -1094,27 +1043,11 @@ function renderMyAvatarIcon() {
|
|||
outerRadius: 2,
|
||||
isSolid: true,
|
||||
visible: false
|
||||
=======
|
||||
if (!myAvatarIcon && MyAvatar.sessionUUID) {
|
||||
myAvatarIcon = Overlays.addOverlay("image3d", {
|
||||
subImage : {
|
||||
x : 0,
|
||||
y : 0,
|
||||
width : 150,
|
||||
height : 142
|
||||
},
|
||||
url : getAvatarIconForUser(MyAvatar.sessionUUID),
|
||||
dimensions : ICON_ENTITY_DEFAULT_DIMENSIONS,
|
||||
visible : false,
|
||||
ignoreRayIntersection : false,
|
||||
orientation : Quat.fromPitchYawRollDegrees(-90, 0, 0)
|
||||
>>>>>>> upstream/master
|
||||
});
|
||||
}
|
||||
|
||||
if (!myAvatarName) {
|
||||
myAvatarName = Overlays.addOverlay("text", {
|
||||
<<<<<<< HEAD
|
||||
width: 100,
|
||||
height: AVATAR_DISPLAY_NAME_HEIGHT,
|
||||
textAlignCenter: true,
|
||||
|
@ -1125,29 +1058,6 @@ function renderMyAvatarIcon() {
|
|||
visible: false,
|
||||
text: "Me"
|
||||
});
|
||||
=======
|
||||
width : 40,
|
||||
height : AVATAR_DISPLAY_NAME_HEIGHT,
|
||||
textAlignCenter : true,
|
||||
color : {
|
||||
red : 255,
|
||||
green : 255,
|
||||
blue : 255
|
||||
},
|
||||
backgroundAlpha : 0.0,
|
||||
font : {
|
||||
size : 68,
|
||||
bold : true
|
||||
},
|
||||
textRaiseColor : {
|
||||
red : 0,
|
||||
green : 0,
|
||||
blue : 0
|
||||
},
|
||||
visible : false,
|
||||
text : "Me"
|
||||
});
|
||||
>>>>>>> upstream/master
|
||||
}
|
||||
|
||||
if (myAvatarIcon) {
|
||||
|
@ -1209,7 +1119,6 @@ function renderAllOthersAvatarIcons() {
|
|||
avatarPos = AvatarList.getAvatar(QUuid).position;
|
||||
|
||||
var cameraPos = Camera.position;
|
||||
<<<<<<< HEAD
|
||||
var p1 = findLineToHeightIntersectionCoords(avatarPos.x, avatarPos.y, avatarPos.z,
|
||||
cameraPos.x, cameraPos.y, cameraPos.z,
|
||||
commonY);
|
||||
|
@ -1222,29 +1131,6 @@ function renderAllOthersAvatarIcons() {
|
|||
Camera.position.x, Camera.position.y, Camera.position.z,
|
||||
commonY);
|
||||
if (!iconPos) { print ("avatar icon pos bad for " + QUuid); continue; }
|
||||
=======
|
||||
var p1 = findLineToHeightIntersectionCoords(avatarPos.x,
|
||||
avatarPos.y, avatarPos.z, cameraPos.x, cameraPos.y,
|
||||
cameraPos.z, commonY);
|
||||
|
||||
var x = (p1.x - borderPoints[0].x) * (Window.innerWidth)
|
||||
/ (borderPoints[1].x - borderPoints[0].x);
|
||||
var y = (p1.z - borderPoints[0].z) * (Window.innerHeight)
|
||||
/ (borderPoints[1].z - borderPoints[0].z);
|
||||
|
||||
if (avatarsData[QUuid].icon != undefined) {
|
||||
var iconPos = findLineToHeightIntersectionCoords(
|
||||
avatarPos.x,
|
||||
avatarPos.y
|
||||
+ RADAR_ICONS_APPARENT_DISTANCE_TO_AVATAR_BASE,
|
||||
avatarPos.z, Camera.position.x, Camera.position.y,
|
||||
Camera.position.z, Camera.position.y
|
||||
- RADAR_CAMERA_DISTANCE_TO_ICONS);
|
||||
if (!iconPos) {
|
||||
print("avatar icon pos bad for " + QUuid);
|
||||
continue;
|
||||
}
|
||||
>>>>>>> upstream/master
|
||||
if (avatarsData[QUuid].needRefresh) {
|
||||
var avat = AvatarList.getAvatar(QUuid);
|
||||
if (avat && avat.displayName) {
|
||||
|
|
Loading…
Reference in a new issue