146 lines
No EOL
4.4 KiB
HTML
146 lines
No EOL
4.4 KiB
HTML
<!DOCTYPE html>
|
|
<!--
|
|
// lookAtOverlay.html
|
|
//
|
|
// Created by Zach Fox on 2018-07-30
|
|
// Copyright 2018 High Fidelity, Inc.
|
|
//
|
|
// Distributed under the Apache License, Version 2.0.
|
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
-->
|
|
<html>
|
|
<head>
|
|
<title>LookAt Overlay</title>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link href="https://fonts.googleapis.com/css?family=Raleway:300,400,600,700" rel="stylesheet">
|
|
<style>
|
|
body {
|
|
width: 100%;
|
|
margin: 0;
|
|
font-family: 'Raleway', sans-serif;
|
|
font-weight: bold;
|
|
font-size: 38px;
|
|
color: #FFF;
|
|
background-color: #000;
|
|
}
|
|
|
|
input[type=button] {
|
|
font-family: 'Raleway';
|
|
font-weight: bold;
|
|
font-size: 28px;
|
|
text-transform: uppercase;
|
|
vertical-align: top;
|
|
min-width: 120px;
|
|
padding: 0px 18px;
|
|
margin-right: 6px;
|
|
border-radius: 5px;
|
|
border: none;
|
|
color: #fff;
|
|
background-color: #000;
|
|
background: linear-gradient(#343434 20%, #000 100%);
|
|
cursor: pointer;
|
|
}
|
|
|
|
input[type=button].red {
|
|
color: #fff;
|
|
background-color: #94132e;
|
|
background: linear-gradient(#d42043 20%, #94132e 100%);
|
|
}
|
|
|
|
input[type=button].white {
|
|
color: #121212;
|
|
background-color: #afafaf;
|
|
background: linear-gradient(#fff 20%, #afafaf 100%);
|
|
}
|
|
|
|
input[type=button]:enabled:hover {
|
|
background: linear-gradient(#000, #000);
|
|
border: none;
|
|
}
|
|
|
|
input[type=button].red:enabled:hover {
|
|
background: linear-gradient(#d42043, #d42043);
|
|
border: none;
|
|
}
|
|
|
|
input[type=button].white:enabled:hover {
|
|
background: linear-gradient(#fff, #fff);
|
|
border: none;
|
|
}
|
|
|
|
input[type=button]:active {
|
|
background: linear-gradient(#343434, #343434);
|
|
}
|
|
|
|
input[type=button].red:active {
|
|
background: linear-gradient(#94132e, #94132e);
|
|
}
|
|
|
|
input[type=button].white:active {
|
|
background: linear-gradient(#afafaf, #afafaf);
|
|
}
|
|
|
|
input[type=button]:disabled {
|
|
color: #252525;
|
|
background: linear-gradient(#575757 20%, #252525 100%);
|
|
}
|
|
|
|
input[type=button][pressed=pressed] {
|
|
color: #00b4ef;
|
|
}
|
|
|
|
#entityName {
|
|
width: 90%;
|
|
height: 70px;
|
|
margin: 5% 5% 40px 5%;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.actionButton {
|
|
width: 40%;
|
|
height: 70px;
|
|
margin: 0 5%;
|
|
padding: 0;
|
|
display: inline-block;
|
|
}
|
|
</style>
|
|
<script type="text/javascript">
|
|
document.addEventListener("DOMContentLoaded", function (event) {
|
|
EventBridge.scriptEventReceived.connect(function (scriptEvent) {
|
|
var event = JSON.parse(scriptEvent);
|
|
|
|
if (event.method === 'lookAt-Overlay-initializeUI') {
|
|
document.getElementById("entityName").innerHTML = event.entityName;
|
|
document.getElementById("muteButton").disabled = false;
|
|
document.getElementById("ignoreButton").disabled = false;
|
|
}
|
|
});
|
|
EventBridge.emitWebEvent(JSON.stringify({
|
|
method: "lookAt-Overlay-Ready"
|
|
}));
|
|
});
|
|
|
|
function mute() {
|
|
EventBridge.emitWebEvent(JSON.stringify({
|
|
method: "lookAt-Overlay-Mute"
|
|
}));
|
|
}
|
|
|
|
function ignore() {
|
|
EventBridge.emitWebEvent(JSON.stringify({
|
|
method: "lookAt-Overlay-Ignore"
|
|
}));
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<p id="entityName"> </p>
|
|
<div id="buttonContainer">
|
|
<input type="button" class="white actionButton" id="muteButton" value="Mute" onclick="mute()" disabled="disabled">
|
|
<input type="button" class="red actionButton" id="ignoreButton" value="Ignore" onclick="ignore()" disabled="disabled">
|
|
</div>
|
|
</body>
|
|
</html> |