def selected
bendvy-ecs-core@0.1.0.4 · inspector_event_value.bend:9
import bendvy-ecs-core@0.1.0.4/inspector_event_value.bend as InspectorEventValue
import Base
import bendvy-ecs-core@0.1.0.4/event_runtime.bend as Ev
import bendvy-ecs-core@0.1.0.4/event_stream.bend as Leaf
9
10def selected(~S:Data,~E:Data,allowed:Bool,+stream:Leaf.Stream<S,E>) -> Leaf.Stream<S,E> & Maybe<&2,List<&2,E>>:
11 match allowed stream:
12 case False{} stream:(stream,None{})
13 case True{} Leaf.Stream{domain,+batches,positions,nextReader,frameStart,boundary,capacity,dropped}:(Leaf.Stream{domain,batches,positions,nextReader,frameStart,boundary,capacity,dropped},Some{Ev.values(~E,batches)})