Needs a lot of cleanup. Data has been de-duplicated, and where identical copies existed, one of them has been replaced with a symlink. Some files have been excluded, such as binaries, installers and debug dumps. Some of that may still be present.
62 lines
2.5 KiB
JavaScript
62 lines
2.5 KiB
JavaScript
// Testing for overlay tech, etc.
|
|
|
|
Script.include(["pd_hudPanel.js"]);
|
|
|
|
|
|
function scriptEnding()
|
|
{
|
|
hudPanel.deleteOverlays();
|
|
}
|
|
|
|
function onKeyPress(event)
|
|
{
|
|
var offset = {x:10, y:3, z:0};
|
|
var newPos = Vec3.sum(hudPanel.position, offset);
|
|
hudPanel.show();
|
|
//hudPanel.startAnimation();
|
|
}
|
|
|
|
function scriptUpdate(deltaTime)
|
|
{
|
|
hudPanel.scriptUpdate(deltaTime);
|
|
}
|
|
|
|
var blipSound = SoundCache.getSound("http://nerdchallenge.com/hifi/sounds/textBlip1.wav");
|
|
|
|
function createHudPanel()
|
|
{
|
|
var hudPanel = new HudPanel({x:500, y:30}, {x:300, y:420}, {x:10,y:0});
|
|
var titleColor = {red:20, green:20, blue:255};
|
|
var headingsColor = {red:255, green:40, blue:40};
|
|
var textColor = {red:40, green:200, blue:40 };
|
|
|
|
hudPanel.addRectangle("bgRectangle", {x:0, y:0}, hudPanel.size.x, hudPanel.size.y, {red:20, green:20, blue:20} );
|
|
hudPanel.addStaticText("lbl_scanData", "SCAN DATA", {x:0, y:0}, hudPanel.size.x, titleColor );
|
|
hudPanel.addStaticText("lbl_shortName", "SHORT NAME:", {x:0, y:30}, hudPanel.size.x, headingsColor );
|
|
hudPanel.addStaticText("lbl_localName", "LOCAL NAME:", {x:0, y:50}, hudPanel.size.x, headingsColor );
|
|
hudPanel.addStaticText("lbl_description", "DESCRIPTION:", {x:0, y:70}, hudPanel.size.x, headingsColor );
|
|
hudPanel.addStaticText("lbl_notes", "NOTES:", {x:0, y:190}, hudPanel.size.x, headingsColor );
|
|
|
|
hudPanel.addDynamicText("shortName", "Short Latin Name", {x:110, y:30}, hudPanel.size.x, textColor );
|
|
hudPanel.addDynamicText("localName", "Local Name Here!", {x:110, y:50}, hudPanel.size.x, textColor );
|
|
var desc = "This is the long description of something that could go on and on.\nIt can have breaks too!\nReally!";
|
|
hudPanel.addDynamicText("description", desc, {x:0, y:90}, hudPanel.size.x, textColor );
|
|
var notes = "This is some animated text that goes on and on.";
|
|
hudPanel.addDynamicText("notes", notes, {x:0, y:210}, hudPanel.size.x, textColor );
|
|
return hudPanel;
|
|
}
|
|
|
|
var hudPanel = createHudPanel();
|
|
hudPanel.hide();
|
|
hudPanel.setDisplayText("shortName", "Drill residue DReK-11");
|
|
hudPanel.setDisplayText("localName", "Drek!");
|
|
hudPanel.setDisplayText("description", "Common chemical run-off from mining operations that seeps into the topsoil. Toxic to virtually all organic life.");
|
|
hudPanel.setDisplayText("notes", "The non-native flower species Drekanius Aboregalo is one of three known life forms that can safely absorb DRek-11. They are commonly found in and around affected soil.");
|
|
|
|
|
|
Controller.keyPressEvent.connect(onKeyPress);
|
|
Script.scriptEnding.connect(scriptEnding);
|
|
Script.update.connect(scriptUpdate);
|
|
|
|
printDebug("pd_overlayTest LOADED");
|
|
|