simvx.core.input.state

Input: input state tracker. Instance-based with module-level default.

Module Contents

Functions

current_input

Whose input the ambient Input is reading.

set_active_input

Context manager to set the active Input for the current context.

Data

API

simvx.core.input.state.log

‘getLogger(…)’

simvx.core.input.state.current_input() → simvx.core.input.state._Input[source]

Whose input the ambient Input is reading.

Three answers, in order. Inside a tree’s span, that tree’s: node code reads the tree it belongs to, which is the whole point of the span and the only one of the three on the frame path. Outside a span, the tree most recently activated, because a delivered record belongs to a tree and the process-wide one has nothing delivered to it, so answering from it would read False for ever with nothing to say why. With no tree at all, the process-wide default, which is what a state-only test and a headless backend write.

simvx.core.input.state.set_active_input(instance: simvx.core.input.state._Input)[source]

Context manager to set the active Input for the current context.

simvx.core.input.state.Input: simvx.core.input.state._Input

‘cast(…)’