diff --git a/src/components/pin-networked-object-button.js b/src/components/pin-networked-object-button.js index 8f70dee186adc97ab16d49d9f2ca1616cd4f9f07..3b7ae88cc77d697499087033721eee24676fc8e0 100644 --- a/src/components/pin-networked-object-button.js +++ b/src/components/pin-networked-object-button.js @@ -61,6 +61,8 @@ AFRAME.registerComponent("pin-networked-object-button", { const isPinned = this.targetEl.getAttribute("pinnable") && this.targetEl.getAttribute("pinnable").pinned; this.labelEl.setAttribute("text", "value", isPinned ? "un-pin" : "pin"); + this.el.setAttribute("text-button", "backgroundColor", isPinned ? "#fff" : "#ff0520"); + this.el.setAttribute("text-button", "backgroundHoverColor", isPinned ? "#aaa" : "#cc0515"); this.el.parentNode.querySelectorAll(this.data.hideWhenPinnedSelector).forEach(hideEl => { hideEl.setAttribute("visible", !isPinned); diff --git a/src/hub.html b/src/hub.html index 9344cbe2c88cac105507a960fd62cb3c3bd7a1ec..9e63cb70fb431d63ac81a055011bb7996c0676da 100644 --- a/src/hub.html +++ b/src/hub.html @@ -257,8 +257,8 @@ haptic:#player-right-controller; textHoverColor: #fff; textColor: #fff; - backgroundHoverColor: #ff0434; - backgroundColor: #ff3464;" + backgroundHoverColor: #cc0515; + backgroundColor: #ff0520;" slice9=" width: 0.45; height: 0.2; diff --git a/src/utils/media-utils.js b/src/utils/media-utils.js index 7a05a2c725b9ade88eb21bdd0df6e075459f8920..bf84baa92d4736f977677ad3fff31c91f4097f66 100644 --- a/src/utils/media-utils.js +++ b/src/utils/media-utils.js @@ -156,6 +156,7 @@ export function injectCustomShaderChunks(obj) { // hover/toggle state, so for now just skip these while we figure out a more correct // solution. if (object.el.classList.contains("ui")) return; + if (object.el.getAttribute("text-button")) return; object.material = object.material.clone(); object.material.onBeforeCompile = shader => {