labels.ssc   labels.ssc 
// //
// Name: Labels Demo // Name: Labels Demo.
// License: Public Domain // License: Public Domain
// Author: Matthew Gates // Author: Matthew Gates
// Description: Example script to show how to use LabelMgr // Description: Example script to show how to use LabelMgr
// //
// set default view, location and date. // set default view, location and date.
LabelMgr.deleteAllLabels(); LabelMgr.deleteAllLabels();
core.clear("natural"); core.clear("natural");
core.setObserverLocation("York, UnitedKingdom"); core.setObserverLocation("York, UnitedKingdom");
core.setTimeRate(1); core.setTimeRate(1);
skipping to change at line 43 skipping to change at line 43
function commentary_at(text, x, y) function commentary_at(text, x, y)
{ {
var id = LabelMgr.labelScreen(text, x, y, false, 20, "#aaaaaa"); var id = LabelMgr.labelScreen(text, x, y, false, 20, "#aaaaaa");
LabelMgr.setLabelShow(id, true); LabelMgr.setLabelShow(id, true);
core.wait(2); core.wait(2);
LabelMgr.setLabelShow(id, false); LabelMgr.setLabelShow(id, false);
core.wait(1); core.wait(1);
LabelMgr.deleteLabel(id); LabelMgr.deleteLabel(id);
} }
commentary("This script is a test of LabelMgr"); commentary("This script is a test of LabelMgr.");
commentary("Labels can be fixed to screen x,y values..."); commentary("Labels can be fixed to screen x,y values...");
commentary_at("0,0", 0, 0); commentary_at("0,0", 0, 0);
commentary_at("100,100", 100, 100); commentary_at("100,100", 100, 100);
commentary_at("0,400", 0, 400); commentary_at("0,400", 0, 400);
commentary_at("600,20", 600, 20); commentary_at("600,20", 600, 20);
commentary("Or they can be attached to a named object..."); commentary("Or they can be attached to a named object...");
var myOb = "HP 21421"; // Aldebaran var myOb = "HP 21421"; // Aldebaran
var id = LabelMgr.labelObject("A bright star!" , myOb, false, 16, "#aaaaaa" , "S", 10); var id = LabelMgr.labelObject("A bright star!" , myOb, false, 16, "#aaaaaa" , "S", 10);
LabelMgr.setLabelShow(id, true); LabelMgr.setLabelShow(id, true);
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/