mirror of
https://github.com/overte-org/overte.git
synced 2025-04-15 22:07:34 +02:00
Merge pull request #14310 from thoys/fix/create/tooltips-refinement
Create APP tooltip / Adressed CR comments / Regression
This commit is contained in:
commit
30ff3f676a
5 changed files with 20 additions and 34 deletions
|
@ -196,12 +196,6 @@
|
|||
"particleRadius": {
|
||||
"tooltip": "The size of each particle."
|
||||
},
|
||||
"radiusStart": {
|
||||
"tooltip": ""
|
||||
},
|
||||
"radiusFinish": {
|
||||
"tooltip": ""
|
||||
},
|
||||
"radiusSpread": {
|
||||
"tooltip": "The spread in size that each particle is given, resulting in a variety of sizes."
|
||||
},
|
||||
|
@ -215,12 +209,6 @@
|
|||
"alpha": {
|
||||
"tooltip": "The alpha of each particle."
|
||||
},
|
||||
"alphaStart": {
|
||||
"tooltip": ""
|
||||
},
|
||||
"alphaFinish": {
|
||||
"tooltip": ""
|
||||
},
|
||||
"alphaSpread": {
|
||||
"tooltip": "The spread in alpha that each particle is given, resulting in a variety of alphas."
|
||||
},
|
||||
|
@ -233,12 +221,6 @@
|
|||
"particleSpin": {
|
||||
"tooltip": "The spin of each particle in the system."
|
||||
},
|
||||
"spinStart": {
|
||||
"tooltip": ""
|
||||
},
|
||||
"spinFinish": {
|
||||
"tooltip": ""
|
||||
},
|
||||
"spinSpread": {
|
||||
"tooltip": "The spread in spin that each particle is given, resulting in a variety of spins."
|
||||
},
|
||||
|
@ -248,15 +230,9 @@
|
|||
"polarStart": {
|
||||
"tooltip": "The angle in deg at which particles are emitted. Starts in the entity's -z direction, and rotates around its y axis."
|
||||
},
|
||||
"polarFinish": {
|
||||
"tooltip": ""
|
||||
},
|
||||
"azimuthStart": {
|
||||
"tooltip": "The angle in deg at which particles are emitted. Starts in the entity's -z direction, and rotates around its y axis."
|
||||
},
|
||||
"azimuthFinish": {
|
||||
"tooltip": ""
|
||||
},
|
||||
"lightColor": {
|
||||
"tooltip": "The color of the light emitted.",
|
||||
"jsPropertyName": "color"
|
||||
|
|
|
@ -2490,6 +2490,13 @@ var PropertiesTool = function (opts) {
|
|||
}
|
||||
};
|
||||
|
||||
HMD.displayModeChanged.connect(function() {
|
||||
emitScriptEvent({
|
||||
type: 'hmdActiveChanged',
|
||||
hmdActive: HMD.active,
|
||||
});
|
||||
});
|
||||
|
||||
createToolsWindow.webEventReceived.addListener(this, onWebEventReceived);
|
||||
|
||||
webView.webEventReceived.connect(onWebEventReceived);
|
||||
|
|
|
@ -1598,7 +1598,7 @@ input.rename-entity {
|
|||
padding-left: 2px;
|
||||
}
|
||||
|
||||
.createAppTooltip {
|
||||
.create-app-tooltip {
|
||||
position: absolute;
|
||||
background: #6a6a6a;
|
||||
border: 1px solid black;
|
||||
|
@ -1607,17 +1607,16 @@ input.rename-entity {
|
|||
padding: 5px;
|
||||
}
|
||||
|
||||
.createAppTooltip .createAppTooltipDescription {
|
||||
.create-app-tooltip .create-app-tooltip-description {
|
||||
font-size: 12px;
|
||||
font-style: italic;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.createAppTooltip .createAppTooltipJSAttribute {
|
||||
.create-app-tooltip .create-app-tooltip-js-attribute {
|
||||
font-family: Raleway-SemiBold;
|
||||
font-size: 11px;
|
||||
color: #000000;
|
||||
bottom: 0;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
|
|
|
@ -58,15 +58,15 @@ CreateAppTooltip.prototype = {
|
|||
if (!TOOLTIP_DEBUG) {
|
||||
return;
|
||||
}
|
||||
tooltipData = {tooltip: 'PLEASE SET THIS TOOLTIP'};
|
||||
tooltipData = { tooltip: 'PLEASE SET THIS TOOLTIP' };
|
||||
}
|
||||
|
||||
let elementRect = element.getBoundingClientRect();
|
||||
let elTip = document.createElement("div");
|
||||
elTip.className = "createAppTooltip";
|
||||
elTip.className = "create-app-tooltip";
|
||||
|
||||
let elTipDescription = document.createElement("div");
|
||||
elTipDescription.className = "createAppTooltipDescription";
|
||||
elTipDescription.className = "create-app-tooltip-description";
|
||||
elTipDescription.innerText = tooltipData.tooltip;
|
||||
elTip.appendChild(elTipDescription);
|
||||
|
||||
|
@ -77,7 +77,7 @@ CreateAppTooltip.prototype = {
|
|||
|
||||
if (!tooltipData.skipJSProperty) {
|
||||
let elTipJSAttribute = document.createElement("div");
|
||||
elTipJSAttribute.className = "createAppTooltipJSAttribute";
|
||||
elTipJSAttribute.className = "create-app-tooltip-js-attribute";
|
||||
elTipJSAttribute.innerText = `JS Attribute: ${jsAttribute}`;
|
||||
elTip.appendChild(elTipJSAttribute);
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ CreateAppTooltip.prototype = {
|
|||
// show above when otherwise out of bounds
|
||||
elTip.style.top = elementTop - CREATE_APP_TOOLTIP_OFFSET - elTip.clientHeight;
|
||||
} else {
|
||||
// show tooltip on below by default
|
||||
// show tooltip below by default
|
||||
elTip.style.top = desiredTooltipTop;
|
||||
}
|
||||
if ((window.innerWidth + window.pageXOffset) < (desiredTooltipLeft + elTip.clientWidth)) {
|
||||
|
|
|
@ -3165,8 +3165,13 @@ function loaded() {
|
|||
} else if (data.type === 'tooltipsReply') {
|
||||
createAppTooltip.setIsEnabled(!data.hmdActive);
|
||||
createAppTooltip.setTooltipData(data.tooltips);
|
||||
} else if (data.type === 'hmdActiveChanged') {
|
||||
createAppTooltip.setIsEnabled(!data.hmdActive);
|
||||
}
|
||||
});
|
||||
|
||||
// Request tooltips as soon as we can process a reply:
|
||||
EventBridge.emitWebEvent(JSON.stringify({ type: 'tooltipsRequest' }));
|
||||
}
|
||||
|
||||
// Server Script Status
|
||||
|
@ -3397,6 +3402,5 @@ function loaded() {
|
|||
|
||||
setTimeout(function() {
|
||||
EventBridge.emitWebEvent(JSON.stringify({ type: 'propertiesPageReady' }));
|
||||
EventBridge.emitWebEvent(JSON.stringify({ type: 'tooltipsRequest' }));
|
||||
}, 1000);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue