mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 09:33:45 +02:00
Formatting changes and teleport on click
This commit is contained in:
parent
de26dc9c49
commit
6b14a64c8c
2 changed files with 13 additions and 6 deletions
|
@ -33,10 +33,10 @@ Hifi.Tooltip {
|
|||
Text {
|
||||
id: textPlace
|
||||
color: "#ffffff"
|
||||
width: border.implicitWidth
|
||||
implicitWidth: 322
|
||||
//anchors.fill: parent
|
||||
anchors.margins: 5
|
||||
font.pixelSize: hifi.fonts.pixelSize / 2
|
||||
font.pixelSize: hifi.fonts.pixelSize * 1.5
|
||||
text: root.text
|
||||
wrapMode: Original.Text.WrapAnywhere
|
||||
}
|
||||
|
@ -46,17 +46,15 @@ Hifi.Tooltip {
|
|||
source: "../images/NoPictureProvided.svg"
|
||||
//anchors.fill: parent
|
||||
anchors.margins: 5
|
||||
verticalAlignment: Original.Image.AlignVCenter
|
||||
//horizontalAlignment: Image.AlignHCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
id: textDescription
|
||||
color: "#ffffff"
|
||||
width: border.implicitWidth
|
||||
implicitWidth: 322
|
||||
//anchors.fill: parent
|
||||
anchors.margins: 5
|
||||
font.pixelSize: hifi.fonts.pixelSize / 2
|
||||
font.pixelSize: hifi.fonts.pixelSize
|
||||
text: root.text
|
||||
wrapMode: Original.Text.WrapAnywhere
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include "RenderableLineEntityItem.h"
|
||||
#include "RenderablePolyVoxEntityItem.h"
|
||||
#include "EntitiesRendererLogging.h"
|
||||
#include "AddressManager.h"
|
||||
|
||||
EntityTreeRenderer::EntityTreeRenderer(bool wantScripts, AbstractViewStateInterface* viewState,
|
||||
AbstractScriptingServicesInterface* scriptingServices) :
|
||||
|
@ -836,6 +837,14 @@ void EntityTreeRenderer::mousePressEvent(QMouseEvent* event, unsigned int device
|
|||
RayToEntityIntersectionResult rayPickResult = findRayIntersectionWorker(ray, Octree::Lock, precisionPicking);
|
||||
if (rayPickResult.intersects) {
|
||||
//qCDebug(entitiesrenderer) << "mousePressEvent over entity:" << rayPickResult.entityID;
|
||||
|
||||
QString urlString = rayPickResult.properties.getHref();
|
||||
QUrl url = QUrl(urlString, QUrl::StrictMode);
|
||||
if (url.isValid() && !url.isEmpty()){
|
||||
DependencyManager::get<AddressManager>()->handleLookupString(urlString);
|
||||
|
||||
}
|
||||
|
||||
emit mousePressOnEntity(rayPickResult, event, deviceID);
|
||||
|
||||
QScriptValueList entityScriptArgs = createMouseEventArgs(rayPickResult.entityID, event, deviceID);
|
||||
|
|
Loading…
Reference in a new issue