Last active
September 14, 2019 11:20
-
-
Save CrackerHax/18855905c998a2f0dca3 to your computer and use it in GitHub Desktop.
Forced Overlay Test Script for highfidelity.io
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() | |
{ | |
// define colors | |
var black = { red: 0, green:0, blue:0}; | |
var white = { red: 255, green:255, blue:255}; | |
var window = []; | |
function newWindow(posx,posy) | |
{ | |
var elements = []; | |
var element = Overlays.addOverlay("text", { | |
bounds: { x: posx, y: posy, width: 300, height: 120}, | |
backgroundColor: white, | |
color: white, | |
backgroundAlpha: .1, | |
text: "\n This is a test panel", | |
alpha: 1 | |
}); | |
window.push(element); | |
} | |
function cleanup() { | |
closeWindow(window); | |
} | |
function closeWindow(window) | |
{ | |
for(var i = 0; i < window.length; i++) | |
Overlays.deleteOverlay(window[i]); | |
} | |
Script.scriptEnding.connect(cleanup); | |
Window.domainChanged.connect(function() | |
{ | |
Script.stop(); | |
}); | |
newWindow(300, 100); | |
}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Attached to a zone entity. When reloaded, will not delete the old overlay entities as it is supposed to.