// // Name: State Save Demo // License: Public Domain // Author: Matthew Gates // Description: An example script showing how to use the state_save.inc file // include("../save_state.inc"); include("status_label.inc"); core.moveToAltAzi(20,55); useStatusLabel("State Save Test: ", 50, 50, 16, "#ff0000"); status("functions from save_state.inc"); core.wait(2); status("setting display with: core.clear(starchart)"); core.clear("starchart"); core.wait(2); status("saving state with ID: state1"); saveState("state1"); core.wait(2); status("changing a few settings..."); SolarSystem.setFlagPlanets(false); core.wait(0.2); SolarSystem.setFlagHints(false); core.wait(0.2); SolarSystem.setFlagOrbits(false); core.wait(0.2); GridLinesMgr.setFlagEquatorGrid(false); core.wait(0.2); GridLinesMgr.setFlagMeridianLine(false); core.wait(0.2); ConstellationMgr.setFlagBoundaries(false); core.wait(0.2); ConstellationMgr.setFlagLines(false); core.wait(0.2); ConstellationMgr.setFlagArt(false); core.wait(0.2); LandscapeMgr.setFlagAtmosphere(true); core.wait(0.2); StarMgr.setFlagLabels(true); core.wait(0.2); core.moveToAltAzi(24,55); core.setMountMode("azimuthal"); status("saving state with ID: state2"); saveState("state2"); core.wait(2); status("restoring state: state1"); restoreState("state1"); core.wait(2); status("restoring state: state2"); restoreState("state2"); core.wait(2); status("restoring state: state1"); restoreState("state1"); core.wait(2); status("restoring state: state2"); restoreState("state2"); core.wait(2); status("All done. Bye"); core.wait(2); LabelMgr.deleteAllLabels();