# {py:mod}`simvx.core.scripted_demo` ```{py:module} simvx.core.scripted_demo ``` ```{autodoc2-docstring} simvx.core.scripted_demo :allowtitles: ``` ## Module Contents ### Classes ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`MoveTo ` - ```{autodoc2-docstring} simvx.core.scripted_demo.MoveTo :summary: ``` * - {py:obj}`Click ` - ```{autodoc2-docstring} simvx.core.scripted_demo.Click :summary: ``` * - {py:obj}`TypeText ` - ```{autodoc2-docstring} simvx.core.scripted_demo.TypeText :summary: ``` * - {py:obj}`PressKey ` - ```{autodoc2-docstring} simvx.core.scripted_demo.PressKey :summary: ``` * - {py:obj}`Wait ` - ```{autodoc2-docstring} simvx.core.scripted_demo.Wait :summary: ``` * - {py:obj}`Assert ` - ```{autodoc2-docstring} simvx.core.scripted_demo.Assert :summary: ``` * - {py:obj}`Do ` - ```{autodoc2-docstring} simvx.core.scripted_demo.Do :summary: ``` * - {py:obj}`Narrate ` - ```{autodoc2-docstring} simvx.core.scripted_demo.Narrate :summary: ``` * - {py:obj}`DemoRunner ` - ```{autodoc2-docstring} simvx.core.scripted_demo.DemoRunner :summary: ``` ```` ### Data ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`log ` - ```{autodoc2-docstring} simvx.core.scripted_demo.log :summary: ``` * - {py:obj}`__all__ ` - ```{autodoc2-docstring} simvx.core.scripted_demo.__all__ :summary: ``` ```` ### API ````{py:data} log :canonical: simvx.core.scripted_demo.log :value: > 'getLogger(...)' ```{autodoc2-docstring} simvx.core.scripted_demo.log ``` ```` ````{py:data} __all__ :canonical: simvx.core.scripted_demo.__all__ :value: > ['MoveTo', 'Click', 'TypeText', 'PressKey', 'Wait', 'Assert', 'Do', 'Narrate', 'DemoRunner'] ```{autodoc2-docstring} simvx.core.scripted_demo.__all__ ``` ```` `````{py:class} MoveTo :canonical: simvx.core.scripted_demo.MoveTo ```{autodoc2-docstring} simvx.core.scripted_demo.MoveTo ``` ````{py:attribute} x :canonical: simvx.core.scripted_demo.MoveTo.x :type: float :value: > None ```{autodoc2-docstring} simvx.core.scripted_demo.MoveTo.x ``` ```` ````{py:attribute} y :canonical: simvx.core.scripted_demo.MoveTo.y :type: float :value: > None ```{autodoc2-docstring} simvx.core.scripted_demo.MoveTo.y ``` ```` ````{py:attribute} duration :canonical: simvx.core.scripted_demo.MoveTo.duration :type: float :value: > 0.5 ```{autodoc2-docstring} simvx.core.scripted_demo.MoveTo.duration ``` ```` ````` `````{py:class} Click :canonical: simvx.core.scripted_demo.Click ```{autodoc2-docstring} simvx.core.scripted_demo.Click ``` ````{py:attribute} x :canonical: simvx.core.scripted_demo.Click.x :type: float :value: > None ```{autodoc2-docstring} simvx.core.scripted_demo.Click.x ``` ```` ````{py:attribute} y :canonical: simvx.core.scripted_demo.Click.y :type: float :value: > None ```{autodoc2-docstring} simvx.core.scripted_demo.Click.y ``` ```` ````{py:attribute} button :canonical: simvx.core.scripted_demo.Click.button :type: int :value: > 1 ```{autodoc2-docstring} simvx.core.scripted_demo.Click.button ``` ```` ````` `````{py:class} TypeText :canonical: simvx.core.scripted_demo.TypeText ```{autodoc2-docstring} simvx.core.scripted_demo.TypeText ``` ````{py:attribute} text :canonical: simvx.core.scripted_demo.TypeText.text :type: str :value: > None ```{autodoc2-docstring} simvx.core.scripted_demo.TypeText.text ``` ```` ````{py:attribute} delay_per_char :canonical: simvx.core.scripted_demo.TypeText.delay_per_char :type: float :value: > 0.05 ```{autodoc2-docstring} simvx.core.scripted_demo.TypeText.delay_per_char ``` ```` ````` `````{py:class} PressKey :canonical: simvx.core.scripted_demo.PressKey ```{autodoc2-docstring} simvx.core.scripted_demo.PressKey ``` ````{py:attribute} key :canonical: simvx.core.scripted_demo.PressKey.key :type: int :value: > None ```{autodoc2-docstring} simvx.core.scripted_demo.PressKey.key ``` ```` ````{py:attribute} hold_duration :canonical: simvx.core.scripted_demo.PressKey.hold_duration :type: float :value: > 0.1 ```{autodoc2-docstring} simvx.core.scripted_demo.PressKey.hold_duration ``` ```` ````` `````{py:class} Wait :canonical: simvx.core.scripted_demo.Wait ```{autodoc2-docstring} simvx.core.scripted_demo.Wait ``` ````{py:attribute} duration :canonical: simvx.core.scripted_demo.Wait.duration :type: float :value: > None ```{autodoc2-docstring} simvx.core.scripted_demo.Wait.duration ``` ```` ````` `````{py:class} Assert :canonical: simvx.core.scripted_demo.Assert ```{autodoc2-docstring} simvx.core.scripted_demo.Assert ``` ````{py:attribute} check_fn :canonical: simvx.core.scripted_demo.Assert.check_fn :type: typing.Any :value: > None ```{autodoc2-docstring} simvx.core.scripted_demo.Assert.check_fn ``` ```` ````{py:attribute} message :canonical: simvx.core.scripted_demo.Assert.message :type: str :value: ```{autodoc2-docstring} simvx.core.scripted_demo.Assert.message ``` ```` ````{py:attribute} actual_fn :canonical: simvx.core.scripted_demo.Assert.actual_fn :type: typing.Any :value: > None ```{autodoc2-docstring} simvx.core.scripted_demo.Assert.actual_fn ``` ```` ````` `````{py:class} Do :canonical: simvx.core.scripted_demo.Do ```{autodoc2-docstring} simvx.core.scripted_demo.Do ``` ````{py:attribute} action :canonical: simvx.core.scripted_demo.Do.action :type: typing.Any :value: > None ```{autodoc2-docstring} simvx.core.scripted_demo.Do.action ``` ```` ````{py:attribute} message :canonical: simvx.core.scripted_demo.Do.message :type: str :value: ```{autodoc2-docstring} simvx.core.scripted_demo.Do.message ``` ```` ````` `````{py:class} Narrate :canonical: simvx.core.scripted_demo.Narrate ```{autodoc2-docstring} simvx.core.scripted_demo.Narrate ``` ````{py:attribute} text :canonical: simvx.core.scripted_demo.Narrate.text :type: str :value: > None ```{autodoc2-docstring} simvx.core.scripted_demo.Narrate.text ``` ```` ````{py:attribute} duration :canonical: simvx.core.scripted_demo.Narrate.duration :type: float :value: > 2.0 ```{autodoc2-docstring} simvx.core.scripted_demo.Narrate.duration ``` ```` ````` `````{py:class} DemoRunner(steps: list, test_mode: bool = False, on_complete: collections.abc.Callable | None = None, speed: float | None = None, speed_mode: int = 0, delay_between_steps: float = 0.15, **kwargs) :canonical: simvx.core.scripted_demo.DemoRunner Bases: {py:obj}`simvx.core.engine.Node` ```{autodoc2-docstring} simvx.core.scripted_demo.DemoRunner ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} simvx.core.scripted_demo.DemoRunner.__init__ ``` ````{py:method} register_step_handler(step_type: type, handler: collections.abc.Callable) :canonical: simvx.core.scripted_demo.DemoRunner.register_step_handler :classmethod: ```{autodoc2-docstring} simvx.core.scripted_demo.DemoRunner.register_step_handler ``` ```` ````{py:property} current_step_index :canonical: simvx.core.scripted_demo.DemoRunner.current_step_index :type: int ```{autodoc2-docstring} simvx.core.scripted_demo.DemoRunner.current_step_index ``` ```` ````{py:property} total_steps :canonical: simvx.core.scripted_demo.DemoRunner.total_steps :type: int ```{autodoc2-docstring} simvx.core.scripted_demo.DemoRunner.total_steps ``` ```` ````{py:property} is_done :canonical: simvx.core.scripted_demo.DemoRunner.is_done :type: bool ```{autodoc2-docstring} simvx.core.scripted_demo.DemoRunner.is_done ``` ```` ````{py:property} failures :canonical: simvx.core.scripted_demo.DemoRunner.failures :type: list[str] ```{autodoc2-docstring} simvx.core.scripted_demo.DemoRunner.failures ``` ```` ````{py:method} process(dt: float) :canonical: simvx.core.scripted_demo.DemoRunner.process ```` ````{py:method} draw(renderer) :canonical: simvx.core.scripted_demo.DemoRunner.draw ```` ````{py:method} run_headless(scene: simvx.core.engine.Node, steps: list, *, speed: float = 50.0, screen_size: tuple[int, int] = (800, 600), max_frames: int = 20000, delay_between_steps: float = 0.0) -> bool :canonical: simvx.core.scripted_demo.DemoRunner.run_headless :classmethod: ```{autodoc2-docstring} simvx.core.scripted_demo.DemoRunner.run_headless ``` ```` ````{py:method} run_visual(scene: simvx.core.engine.Node, steps: list, *, speed: float | None = None, speed_mode: int = 0, title: str = 'Demo', width: int = 800, height: int = 600) :canonical: simvx.core.scripted_demo.DemoRunner.run_visual :classmethod: ```{autodoc2-docstring} simvx.core.scripted_demo.DemoRunner.run_visual ``` ```` ````{py:attribute} script_error_raised :canonical: simvx.core.scripted_demo.DemoRunner.script_error_raised :value: > 'Signal(...)' ```` ````{py:method} __init_subclass__(**kwargs) :canonical: simvx.core.scripted_demo.DemoRunner.__init_subclass__ :classmethod: ```` ````{py:property} name :canonical: simvx.core.scripted_demo.DemoRunner.name :type: str ```` ````{py:property} process_mode :canonical: simvx.core.scripted_demo.DemoRunner.process_mode :type: simvx.core.descriptors.ProcessMode ```` ````{py:method} reset_error() -> None :canonical: simvx.core.scripted_demo.DemoRunner.reset_error ```` ````{py:method} add_child(node: simvx.core.node.Node) -> simvx.core.node.Node :canonical: simvx.core.scripted_demo.DemoRunner.add_child ```` ````{py:method} remove_child(node: simvx.core.node.Node) :canonical: simvx.core.scripted_demo.DemoRunner.remove_child ```` ````{py:method} reparent(new_parent: simvx.core.node.Node) :canonical: simvx.core.scripted_demo.DemoRunner.reparent ```` ````{py:method} get_node(path: str) -> simvx.core.node.Node :canonical: simvx.core.scripted_demo.DemoRunner.get_node ```` ````{py:method} find_child(name: str, recursive: bool = False) -> simvx.core.node.Node | None :canonical: simvx.core.scripted_demo.DemoRunner.find_child ```` ````{py:method} find(node_type: type) -> simvx.core.node.Node | None :canonical: simvx.core.scripted_demo.DemoRunner.find ```` ````{py:method} find_all(node_type: type, recursive: bool = True) -> list :canonical: simvx.core.scripted_demo.DemoRunner.find_all ```` ````{py:property} path :canonical: simvx.core.scripted_demo.DemoRunner.path :type: str ```` ````{py:method} add_to_group(group: str) :canonical: simvx.core.scripted_demo.DemoRunner.add_to_group ```` ````{py:method} remove_from_group(group: str) :canonical: simvx.core.scripted_demo.DemoRunner.remove_from_group ```` ````{py:method} is_in_group(group: str) -> bool :canonical: simvx.core.scripted_demo.DemoRunner.is_in_group ```` ````{py:method} ready() -> None :canonical: simvx.core.scripted_demo.DemoRunner.ready ```` ````{py:method} enter_tree() -> None :canonical: simvx.core.scripted_demo.DemoRunner.enter_tree ```` ````{py:method} exit_tree() -> None :canonical: simvx.core.scripted_demo.DemoRunner.exit_tree ```` ````{py:method} physics_process(dt: float) -> None :canonical: simvx.core.scripted_demo.DemoRunner.physics_process ```` ````{py:method} input_event(event: simvx.core.events.InputEvent) -> None :canonical: simvx.core.scripted_demo.DemoRunner.input_event ```` ````{py:method} input(event: simvx.core.events.TreeInputEvent) -> None :canonical: simvx.core.scripted_demo.DemoRunner.input ```` ````{py:method} unhandled_input(event: simvx.core.events.TreeInputEvent) -> None :canonical: simvx.core.scripted_demo.DemoRunner.unhandled_input ```` ````{py:method} start_coroutine(gen: simvx.core.descriptors.Coroutine) -> simvx.core.descriptors.CoroutineHandle :canonical: simvx.core.scripted_demo.DemoRunner.start_coroutine ```` ````{py:method} stop_coroutine(gen_or_handle) :canonical: simvx.core.scripted_demo.DemoRunner.stop_coroutine ```` ````{py:method} destroy() :canonical: simvx.core.scripted_demo.DemoRunner.destroy ```` ````{py:attribute} queue_free :canonical: simvx.core.scripted_demo.DemoRunner.queue_free :value: > None ```` ````{py:property} tree :canonical: simvx.core.scripted_demo.DemoRunner.tree :type: simvx.core.scene_tree.SceneTree ```` ````{py:method} get_tree() -> simvx.core.scene_tree.SceneTree :canonical: simvx.core.scripted_demo.DemoRunner.get_tree ```` ````{py:method} __getitem__(key: str) :canonical: simvx.core.scripted_demo.DemoRunner.__getitem__ ```` ````{py:method} get_properties() -> dict[str, simvx.core.descriptors.Property] :canonical: simvx.core.scripted_demo.DemoRunner.get_properties :classmethod: ```` ````{py:attribute} get_settings :canonical: simvx.core.scripted_demo.DemoRunner.get_settings :value: > None ```` ````{py:method} __repr__() :canonical: simvx.core.scripted_demo.DemoRunner.__repr__ ```` `````