Celestia/Celx 指令碼/CELX Lua 方法/CEL 命令 cls
外觀
cls { }
清除顯示屏上任何透過 print 命令列印的剩餘文字。
沒有太多使用此命令的必要。
該命令沒有引數。
CELX 等效項-1
基於 celestia:print() 方法。
- 透過列印空白行來清除顯示屏上的任何剩餘文字。
celestia:print("")
CELX 等效項-2
基於 celestia:flash() 方法。
- 透過閃爍空白行來清除顯示屏上的任何剩餘文字。
celestia:flash("")
示例
以下示例在 5 秒內列印文字,但在 2 秒後清除顯示屏。
CEL
print { text "Text to be displayed for 5 sec." row -3 column 1 duration 5 }
wait { duration 2 }
cls { }
wait { duration 3 }
-- 或者 --
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 使用 celestia:print() 方法
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 使用 celestia:flash() 方法
celestia:print("Text to be displayed for 5 sec." , 5.0, -1, -1, 1, 3)
wait(2.0)
celestia:flash("")
wait(3.0)