Celestia/Celx Scripting/CELX Lua Methods/CEL command labels

labels
labels { set|clear  } 

Set (turn on) or clear (turn off) labeling of one or more items.

CELX equivalent-1:

Based on the celestia:hidelabel and celestia:showlabel methods.


 * Enable labeling with celestia:showlabel(  ) method.  describes the type of labels to enable. Multiple label types can be enabled at once by giving multiple arguments to this method, separated with a comma ",". Must be one of:
 * planets, moons, spacecraft, asteroids, comets, stars, galaxies, locations, constellations, i18nconstellations,  openclusters,  nebulae,  dwarfplanets,  minormoons,  globulars.

celestia:showlabel(  )


 * Disable labeling with celestia:hidelabel(  ) method.  describes the type of labels to disable. Multiple label types can be disabled at once by giving multiple arguments to this method, separated with a comma ",". Must be one of:
 * planets, moons, spacecraft, asteroids, comets, stars, galaxies, locations, constellations, i18nconstellations,  openclusters,  nebulae,  dwarfplanets,  minormoons,  globulars.

celestia:hidelabel(  )

CELX equivalent-2:

Based on the celestia:setlabelflags method.

Multiple features can be enabled at once by giving multiple arguments to this method, separated with a comma ",".
 * Use the celestia:setlabelflags {  = boolean } method to enable or disable the rendering of labels. Note the curly braces.  is a table which contains the labelflags as keys and booleans as values for each key. The labelflag keys must be one of:
 * planets, moons, spacecraft, asteroids, comets, stars, galaxies, locations, constellations, i18nconstellations,  openclusters,  nebulae,  dwarfplanets,  minormoons,  globulars.

celestia:setlabelflags{  = false,  = true }

Example: The following examples demonstrate how to clear and set labels.

CEL:

labels { clear "comets|constellations|galaxies|stars" } labels {  set "asteroids|moons|planets|spacecraft" }

CELX with celestia:hidelabel and celestia:showlabel methods:

-- Disable labeling with celestia:hidelabel method. celestia:hidelabel("comets", "constellations", galaxies", "stars") -- Enable labeling with celestia:showlabel method. celestia:showlabel("asteroids", "moons", "planets", "spacecraft")

CELX with celestia:setlabelflags method:

-- Enable and disable the rendering of specific labels. Note the curly braces celestia:setlabelflags{ comets = false, constellations = false, galaxies = false, stars = false, asteroids = true, moons = true, planets = true, spacecraft = true }

Back to CEL command index