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

deleteview
deleteview { view   } 

Delete the view of the specified .

Notes:
 * 1) Using this command only makes sense if there is at least one Muliti view left. This command has no effect on a Single view.

CELX equivalent:

Based on the observer:deleteview method.


 * Get observer instance of the active view instance within a Multi view and delete is.

obs = celestia:getobserver obs:deleteview

-- OR --


 * Get observer instances of all views and delete the view with identifier .

observers = celestia:getobservers observers[]:deleteview

Example: Split the screen in 4 equal parts and delete view number 3 after 5 seconds.

CEL:

splitview { view 1 type "V" position 0.5 } splitview { view 1 type "H" position 0.5 } splitview { view 2 type "H" position 0.5 } wait { duration 5.0 } deleteview { view 3 }

CELX:

obs = celestia:getobserver obs:splitview("V", 0.5) observers = celestia:getobservers observers[1]:splitview("H", 0.5) observers[2]:splitview("H", 0.5) observers = celestia:getobservers wait(5.0) observers[3]:deleteview

Back to CEL command index