mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 20:36:49 +02:00
Fix multiple and malingering tool icons
This commit is contained in:
parent
c201e7b65a
commit
f4b2e399ef
2 changed files with 9 additions and 5 deletions
|
@ -60,7 +60,6 @@ ToolIcon = function (side) {
|
||||||
var handJointIndex,
|
var handJointIndex,
|
||||||
iconProperties;
|
iconProperties;
|
||||||
|
|
||||||
// Joint index.
|
|
||||||
handJointIndex = MyAvatar.getJointIndex(HAND_JOINT_NAME);
|
handJointIndex = MyAvatar.getJointIndex(HAND_JOINT_NAME);
|
||||||
if (handJointIndex === -1) {
|
if (handJointIndex === -1) {
|
||||||
// Don't display if joint isn't available (yet) to attach to.
|
// Don't display if joint isn't available (yet) to attach to.
|
||||||
|
@ -69,10 +68,14 @@ ToolIcon = function (side) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
iconProperties = Object.clone(ICON_PROPERTIES);
|
if (iconOverlay === null) {
|
||||||
iconProperties.parentJointIndex = handJointIndex;
|
iconProperties = Object.clone(ICON_PROPERTIES);
|
||||||
iconProperties.color = ICON_COLORS[icon];
|
iconProperties.parentJointIndex = handJointIndex;
|
||||||
iconOverlay = Overlays.addOverlay(ICON_TYPE, iconProperties);
|
iconProperties.color = ICON_COLORS[icon];
|
||||||
|
iconOverlay = Overlays.addOverlay(ICON_TYPE, iconProperties);
|
||||||
|
} else {
|
||||||
|
Overlays.editOverlay(iconOverlay, { color: ICON_COLORS[icon] });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function clear() {
|
function clear() {
|
||||||
|
|
|
@ -227,6 +227,7 @@
|
||||||
function clear() {
|
function clear() {
|
||||||
leftInputs.setUIEntities([]);
|
leftInputs.setUIEntities([]);
|
||||||
rightInputs.setUIEntities([]);
|
rightInputs.setUIEntities([]);
|
||||||
|
toolIcon.clear();
|
||||||
toolMenu.clear();
|
toolMenu.clear();
|
||||||
createPalette.clear();
|
createPalette.clear();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue