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

cls { }

Clears the display screen of any left-over text that was printed via the print command.
There is no much need to use this command.

The command has no arguments.


CELX equivalent-1:

Based on the celestia:print() method.

  • Clear the display screen of any left-over text, by printing a blanc line.
celestia:print("")


CELX equivalent-2:

Based on the celestia:flash() method.

  • Clear the display screen of any left-over text, by flashing a blanc line.
celestia:flash("")

Example:
The following example prints text for 5 seconds, but after 2 seconds the display is cleared.

CEL:

print { text "Text to be displayed for 5 sec." row -3 column 1 duration 5 }
wait  { duration 2 }
cls   { }
wait  { duration 3 }

-- OR --

print { text "Text to be displayed for 5 sec." row -3 column 1 duration 5 }
wait  { duration 2 }
print { text "" }
wait  { duration 3 }

CELX-1 with celestia:print() method:

celestia:print("Text to be displayed for 5 sec." , 5.0, -1, -1, 1, 3)
wait(2.0)
celestia:print("")
wait(3.0)

CELX-2 with celestia:flash() method:

celestia:print("Text to be displayed for 5 sec." , 5.0, -1, -1, 1, 3)
wait(2.0)
celestia:flash("")
wait(3.0)

Back to CEL command index